You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marshall Schor <ms...@schor.com> on 2008/02/25 22:10:55 UTC
maven resolution of properties and inheritance - not working for
first part of maven processing (when it "scans for projects")?
I am using a maven setup with the following structure:
top-level: pom
|
+---- sub-level pom
|
+---- sub-sub-project pom(s)
The lower level poms specify their super poms as the one that is one
level above them; this 3 level structure is in place to allow factoring
out common parts of the build information at 2 different levels.
Can someone confirm the following, which I have discovered via slow
experimentation:
Even though the maven documentation says "groupId:artifactId:version are
all required fields (although, groupId and version need not be
explicitly defined if they are inherited from a parent - more on
inheritance later)." in http://maven.apache.org/pom.html#Maven_Coordinates,
the groupId appears to *not* be an inheritable item for the first
part of maven processing, where it is "scanning for projects"
Also, in this first part of maven processing, it appears that
<properties> are not substituted.
The evidence I have for these comes from failures in maven building; I
ran with the --debug flag. Here's the case where a ${variable} isn't
being substituted, and the groupId was omitted (expecting it to default
from the parent).
C:\a\Eclipse\3.3\apache\uimaj>mvn install --debug
+ Error stacktraces are turned on.
Maven version: 2.0.7
Java version: 1.6.0_02
OS name: "windows xp" version: "5.1" arch: "x86"
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents
and Settings\Administrator\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from:
'c:\p\Maven\maven-2.0.7\bin\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[DEBUG] Searching for parent-POM:
org.apache.uima:uimaj-eclipse-plugins::2.3.0.incubating-SNAPSHOT of
project: null:uimaj-ep-debug:bundle:null in relative path:
../uimaj/eclipse-plugin-superPom
[DEBUG] Path specified in <relativePath/>
(../uimaj/eclipse-plugin-superPom) is a directory. Searching for
'pom.xml' within this directory.
[DEBUG] Invalid parent-POM referenced by relative path
'../uimaj/eclipse-plugin-superPom' in parent specification in
null:uimaj-ep-debug:bundle:null:
Specified:
org.apache.uima:uimaj-eclipse-plugins::2.3.0.incubating-SNAPSHOT
Found:
null:uimaj-eclipse-plugins:pom:${uimaj-release-eclipse-version}
The "Found" is showing "null" for the groupId, where I had expected it
to be the groupId from the parent. The version string I expected to be
substituted from the ${uimaj-release-eclipse-version} variable.
Should this be working, or is it working as designed?
-Marshall
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org