You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/07/28 16:21:05 UTC
[jira] Closed: (MAVEN-1408) POM variables inheritance problem
Message:
The following issue has been closed.
Resolver: Carlos Sanchez
Date: Wed, 28 Jul 2004 10:20 AM
Unexpected error evaluating expression
java.lang.ClassCastException
at org.apache.maven.MavenUtils.integrateMapInContext(MavenUtils.java:820)
at org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:240)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:144)
at org.apache.maven.MavenUtils.getProject(MavenUtils.java:123)
at org.apache.maven.MavenUtils.getProjects(MavenUtils.java:290)
at org.apache.maven.jelly.tags.maven.ReactorTag.getSortedProjects(ReactorTag.java:400)
at org.apache.maven.jelly.tags.maven.ReactorTag.doTag(ReactorTag.java:296)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:634)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
at org.apache.maven.cli.App.doMain(App.java:486)
at org.apache.maven.cli.App.main(App.java:1215)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MAVEN-1408
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-1408
Summary: POM variables inheritance problem
Type: Bug
Status: Closed
Priority: Major
Resolution: DUPLICATE
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven
Versions:
1.1
Assignee:
Reporter: Anthony FIRKA
Created: Tue, 27 Jul 2004 1:13 PM
Updated: Wed, 28 Jul 2004 10:20 AM
Environment: Fedora Core release 2, Kernel 2.6.6-1.435.2.3 (i686), Sun J2SDK 1.4.2_05.
Description:
Hello everybody,
We've got there a strange behavior since we've migrated our Linux box, something wrong with the POM variables inheritance.
Our project is made of around 10 sub-projects, linked together, and the build is done using a Maven reactor. As each sub-project JAR must have a same version number, we've defined a global variable into our top build.properties file, and we use Jelly like that into the sub-projects POMs:
<dependency>
...
<version>${context.getVariable('global.project.version')}</version>
</dependency>
When we need to generate a snapshot version of our project, we call a custom goal which first alter the global variable version, then call the reactor.
It was working like a charm, with all the Maven versions we've tried (beta9, rc1, rc3 and final). But when we're building a snapshot on our new Linux development server, and only for the deepest reactor sub-project element (calculated according the sub-project dependencies), our global version variable keeps his build.properties value, not the altered one.
I've written a short sample, joined into the sampleFiles.zip archive. Using maven-1.0-final on our old server (a RedHat 9 box, kernel 2.4, i686, with Sun JDK 1.4.2_05) or on our workstations (WinNT 4 SP6a, Sun JDK 1.4.2_04), we've got this output :
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0
Starting the reactor...
Our processing order:
Test Project (main)
Sub-Test Project A
Sub-Test Project B
Sub-Test Project C
+----------------------------------------
| Processing Test Project (main)
| Memory: 2M/3M
+----------------------------------------
+----------------------------------------
| Processing Sub-Test Project A
| Memory: 2M/3M
+----------------------------------------
+----------------------------------------
| Processing Sub-Test Project B
| Memory: 2M/3M
+----------------------------------------
Tentative de téléchargement de subTestProjectA-SNAPSHOT.jar.
ATTENTION: Impossible de télécharger subTestProjectA-SNAPSHOT.jar.
+----------------------------------------
| Processing Sub-Test Project C
| Memory: 2M/3M
+----------------------------------------
Tentative de téléchargement de subTestProjectA-SNAPSHOT.jar.
ATTENTION: Impossible de télécharger subTestProjectA-SNAPSHOT.jar.
Tentative de téléchargement de subTestProjectB-SNAPSHOT.jar.
ATTENTION: Impossible de télécharger subTestProjectB-SNAPSHOT.jar.
BUILD SUCCESSFUL
Total time: 7 seconds
Finished at: Tue Jul 27 18:01:25 CEST 2004
Which is correct because Maven tries to download the SNAPSHOT JARs. But on our new server (a Fedora Core 2 box, kernel 2.6.6-1.435.2.3, i686, Sun JDK 1.4.2_05), we've got this :
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0
Starting the reactor...
Our processing order:
Test Project (main)
Sub-Test Project A
Sub-Test Project B
Sub-Test Project C
+----------------------------------------
| Processing Test Project (main)
| Memory: 2M/3M
+----------------------------------------
+----------------------------------------
| Processing Sub-Test Project A
| Memory: 2M/3M
+----------------------------------------
+----------------------------------------
| Processing Sub-Test Project B
| Memory: 2M/3M
+----------------------------------------
Tentative de téléchargement de subTestProjectA-SNAPSHOT.jar.
ATTENTION: Impossible de télécharger subTestProjectA-SNAPSHOT.jar.
+----------------------------------------
| Processing Sub-Test Project C
| Memory: 2M/3M
+----------------------------------------
Tentative de téléchargement de subTestProjectA-1.0.0.jar.
ATTENTION: Impossible de télécharger subTestProjectA-1.0.0.jar.
Tentative de téléchargement de subTestProjectB-1.0.0.jar.
ATTENTION: Impossible de télécharger subTestProjectB-1.0.0.jar.
BUILD SUCCESSFUL
Total time: 5 seconds
Finished at: Tue Jul 27 18:27:31 CEST 2004
You see ? For the Sub-Test Project C, our variable value hasn't changed... It's really strange. Have you got an idea ? Is something wrong with the 2.6 kernel new threads management ?
Thanks for your help,
Anthony --
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org