What are possible causes of the following maven warning:
Overriding profile: null (source: pom) with new instance from source: pom
I ve tried commenting out my entire default profile as the warning mentions "profile", but that didn t help. I ve also tried commenting out my reporting options and the warning still shows up.
I ve ran maven with the -X
flag and the warning shows up immediately after my hamcrest dependency is brought in, but commenting it out doesn t eliminate the warning.
EDIT: additional information per request:
Output from mvn help:active-profiles
:
Active Profiles for Project com.sophware.XXX:main:jar:0.0.1-SNAPSHOT :
The following profiles are active:
- default (source: pom)
Output from mvn help:all-profiles
:
[INFO] Listing Profiles for Project: com.sophware.XXX:main:jar:0.0.1-SNAPSHOT
Profile Id: default (Active: true , Source: pom)
default
is indeed the id of the profile that I use in my pom. At this point, I only have one profile, although I expect to add more in the future.
Resolution:
Peter was right about the problem. The problem stems from not having an id
element within a maven profile. In my case, a pom file was being pulled in because of my miglayout dependency.
Upon looking through the dependent pom s, I found that miglayout, indeed, does not use id
s in its profiles:
<profile>
<activation>
<os>
<family>windows</family>
<arch>x86</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.eclipse.swt.win32.win32</groupId>
<artifactId>x86</artifactId>
<version>3.3.0-v3346</version>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
There s a number of other profiles missing id
s as well as well, each of which cause the warning to be present.