0
votes

I have to use a snapshot version of parent pom from my remote corporate repository and the structure is not similar to maven multi module(parent pom not in root directory), when building my project I received following error,

Non-resolvable parent POM for com.company.group

I tried adding empty </relativePath> path in my pom that didn't work, maven was not looking beyond my local repository.

Next I enabled <snapshots> in settings.xml that too didn't worked. Finally I copied repositories in setting.xml to pom then maven picked up the parent pom, but I felt bit odd in adding in pom.xml and wanted cleaner approach, also wanted to know why maven didn't picked up the setting.xml.

1

1 Answers

0
votes

My setting.xml was having two profiles and the profile having snapshots enabled was not used by maven.

I made the snapshots enabled profile default as below and maven started picking up the remote parent pom.

  <activation>
        <activeByDefault>true</activeByDefault>
  </activation>