You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Salvador Diaz <sd...@m6.fr> on 2008/04/09 10:47:47 UTC
Invalid POM - Ignored for artifact resolution - Bug ?
Hello all,
This is my first message in the mailing list so please bear with me if I
lack clarity or I infringe any rule.
So the problem I'm having is that I'm getting this message when running
mvn eclipse:eclipse on my project (we have one core project and several
others depending on that one):
[WARNING] POM for
'myproject:com.mycompany.core:pom:0.21.0SNAPSHOT:compile' is invalid. It
will be ignored for artifact resolution. Reason: Failed to validate POM
for project ${myproject.groupId}:com.mycompany.core at Artifact
[myproject:com.mycompany.core:pom:0.21.0SNAPSHOT:compile]
the variable ${myproject.groupId} is defined in my ~/.m2/settings.xml
and it is used in several poms throughout our projects like this:
For the pom in the core project:
...
<groupId>${myproject.groupId}</groupId>
<artifactId>com.mycompany.core</artifactId>
<version>${myproject.version}</version>
...
For the pom in other projects depending on the core project:
...
<dependencies>
<dependency>
<groupId>${myproject.groupId}</groupId>
<artifactId>com.mycompany.core</artifactId>
<version>${myproject.version}</version>
</dependency>
...
Now when I run mvn install on the core project the jar gets installed in
my local repository and the pom still references those variables so when
I run mvn eclipse:eclipse on one of the projects depending on the core
project I get the error above and the dependency resolution doesn't
work. The problem is (I think) that the variable ${myproject.groupId} is
resolved when it is declared in a pom.xml in one of my projects but it
isn't resolved when it is declared in a *.pom in the repository. Is this
the expected behavior? If so, how can I force maven to replace the
variable with its value when installing the jar into the repository ?
Many thanks to everyone, I hope I was clear enough.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org