Hi,
I face a strange problem concerning POM validation and setting properties in
profiles.xml...
My project C depends on module B, which itself is a child of module A.
Module A defines a system scope dependency like this:
<dependency>
<groupId>db2</groupId>
<artifactId>db2</artifactId>
<version>8.2</version>
<scope>system</scope>
<systemPath>${path.db2jar}</systemPath>
</dependency>
The path do db2.jar depends on the developer's machine and is specified in
the profiles.xml, toghether with other settings. Both A and B are building
and deploying fine.
Now, when I try to build C, it complains about missing definition for
'path.db2jar':
[WARNING] POM for '...B:pom:4.4.0-SNAPSHOT:compile' is invalid. It will be
ignored for artifact resolution. Reason: Failed to validate POM
[DEBUG] Reason: Failed to validate POM
[DEBUG]
Validation Errors:
[DEBUG] For dependency Dependency {groupId=db2, artifactId=db2, version=8.2,
type=jar}: system-scoped dependency must specify an absolute path
systemPath.
I'm using a profiles.xml section like this one:
<profile>
<id>env-nb</id>
<activation>
<property>
<name>env</name>
<value>nb</value>
</property>
</activation>
<properties>
<path.db2jar>c:/programme/IBM/SQLLIB/java/db2java.zip</path.db2jar>
...
</properties>
</profile>
which is triggered by -Denv=nb, and this is working fine since
'help:effective-pom' is showing me something like
<properties>
<path.db2jar>c:/programme/IBM/SQLLIB/java/db2java.zip</path.db2jar>
...
</properties>
So the profiles.xml seems to be evaluated correctly, but the property is not
used for validating the POM of dependent modules???
The strange thing is, when I run Maven without the profiles.xml, but with
specifying the property on command line (like '-Dpath.db2jar=...'), all is
working fine! But that's not exactly what we want, since profiles are meant
to encapsulate those kind of settings...
Any idea? Please help!!!
Thanks,
Christoph.
--
View this message in context:
http://www.nabble.com/Setting-property-in-profiles-not-evaluated-for-POM-validation--tf2429572.html#a6774088
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]