You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Joel COSTIGLIOLA (Services DPT SYSTEME D INFORMATION METIER)" <jo...@ext.anpe.fr> on 2007/08/14 15:05:19 UTC
multi-module project generates invalid pom ?
Hi there,
I have been reporting few weeks ago some VERY annoying warning like this
one :
[WARNING] POM for 'sapiens:SapiensCommonsCore:pom:2.6.0:test' is
invalid. It will be ignored for artifact resolution. Reason: Failed to
validate POM for project sapiens:SapiensCommonsCore at Artifact
[sapiens:SapiensCommonsCore:pom:2.6.0:test]
I haven't found any good explanation in maven mailing list archive but I
think I may have the reason of such annoying warnings. To explain it I
must give the context when it happens.
I have a maven2 project called SapiensSpringCommon depending on
sapiens:SapiensCommonsCore test jar. SapiensCommonsCore is a module of
sapiens a maven2 multi-module project of mine.
When I install sapiens modules in my local repository everything runs
fine (no error, no warning).
Warnings arise when I compile SapiensSpringCommon which depends on a
child module of sapiens project (that is SapiensCommonsCore).
I firstly examined SapiensCommonsCore generated pom, and it seems ok (I
have successfully run "mvn validate" on it both in the project directory
and in my local repository).
Then I began modifying the SapiensCommonsCore generated pom (i.e.
SapiensCommonsCore-2.6.0.pom) of my local repository until warnings
disappears from SapiensSpringCommon compilation phase.
It appears that deleting parent section did it.
To conclude, it seems that multi-module produces invalid pom (or
validate phase is not clever enough to validate dependancies on artefact
of a multi-module project).
What do you think ? maybe I just use badly maven ...
Is there a way to fix that ?
Regards,
Joel
FYI here's SapiensCommonsCore-2.6.0.pom version NOT producing warnings
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>sapiens</groupId>
<artifactId>SapiensCommonsCore</artifactId>
<packaging>jar</packaging>
<version>2.6.0</version>
<name>Sapiens Core</name>
<!-- build and dependencies section omitted -->
</project>
Here's SapiensCommonsCore-2.6.0.pom original version (PRODUCING
warnings)
<project>
<parent>
<groupId>sapiens</groupId>
<artifactId>SocleSapiens</artifactId>
<version>2.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>SapiensCommonsCore</artifactId>
<packaging>jar</packaging>
<name>Sapiens Core</name>
<dependencies>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</dependency>
</dependencies>
<!-- build section omitted -->
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: multi-module project generates invalid pom ?
Posted by "Joel COSTIGLIOLA (Services DPT SYSTEME D INFORMATION METIER)" <jo...@ext.anpe.fr>.
Just want to add that SapiensSpringCommon, despite his name, is not a module of sapiens !
It's just a project depending on sapiens child module SapiensCommonsCore.
Hope things are clearer now
-----Message d'origine-----
De : Joel COSTIGLIOLA (Services DPT SYSTEME D INFORMATION METIER) [mailto:joel.costigliola@ext.anpe.fr]
Envoyé : mardi 14 août 2007 15:05
À : Maven Users List
Objet : multi-module project generates invalid pom ?
Hi there,
I have been reporting few weeks ago some VERY annoying warning like this
one :
[WARNING] POM for 'sapiens:SapiensCommonsCore:pom:2.6.0:test' is
invalid. It will be ignored for artifact resolution. Reason: Failed to
validate POM for project sapiens:SapiensCommonsCore at Artifact
[sapiens:SapiensCommonsCore:pom:2.6.0:test]
I haven't found any good explanation in maven mailing list archive but I
think I may have the reason of such annoying warnings. To explain it I
must give the context when it happens.
I have a maven2 project called SapiensSpringCommon depending on
sapiens:SapiensCommonsCore test jar. SapiensCommonsCore is a module of
sapiens a maven2 multi-module project of mine.
When I install sapiens modules in my local repository everything runs
fine (no error, no warning).
Warnings arise when I compile SapiensSpringCommon which depends on a
child module of sapiens project (that is SapiensCommonsCore).
I firstly examined SapiensCommonsCore generated pom, and it seems ok (I
have successfully run "mvn validate" on it both in the project directory
and in my local repository).
Then I began modifying the SapiensCommonsCore generated pom (i.e.
SapiensCommonsCore-2.6.0.pom) of my local repository until warnings
disappears from SapiensSpringCommon compilation phase.
It appears that deleting parent section did it.
To conclude, it seems that multi-module produces invalid pom (or
validate phase is not clever enough to validate dependancies on artefact
of a multi-module project).
What do you think ? maybe I just use badly maven ...
Is there a way to fix that ?
Regards,
Joel
FYI here's SapiensCommonsCore-2.6.0.pom version NOT producing warnings
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>sapiens</groupId>
<artifactId>SapiensCommonsCore</artifactId>
<packaging>jar</packaging>
<version>2.6.0</version>
<name>Sapiens Core</name>
<!-- build and dependencies section omitted -->
</project>
Here's SapiensCommonsCore-2.6.0.pom original version (PRODUCING
warnings)
<project>
<parent>
<groupId>sapiens</groupId>
<artifactId>SocleSapiens</artifactId>
<version>2.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>SapiensCommonsCore</artifactId>
<packaging>jar</packaging>
<name>Sapiens Core</name>
<dependencies>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</dependency>
</dependencies>
<!-- build section omitted -->
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org