maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Amshoff (JIRA)" <>
Subject [jira] Created: (MNG-2632) Setting property in profiles is not evaluated for POM validation
Date Thu, 26 Oct 2006 12:51:03 GMT
Setting property in profiles is not evaluated for POM validation

                 Key: MNG-2632
             Project: Maven 2
          Issue Type: Bug
          Components: POM
    Affects Versions: 2.0.4
         Environment: WinXP
            Reporter: Christoph Amshoff

There seems to be a problem concerning POM validation and setting properties in profiles.xml:
when I set a property in my profiles.xml it is not evaluated for POM validation in a multi
module build. 

The details: My project C depends on module B, which itself is a child of module A. Module
A defines a system scope dependency like this: 


The path to 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 
Validation Errors: 
[DEBUG] For dependency Dependency {groupId=db2, artifactId=db2, version=8.2, type=jar}: system-scoped
must specify an absolute path systemPath. 

I'm using a profiles.xml section like this one: 


which is triggered by -Denv=nb, and this activation is working fine since 'help:effective-pom'
is correctly showing me something like 


So the profiles.xml seems to be evaluated correctly, but the property is not used for validating
the POM of dependent modules.

And yes, 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... 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message