maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Nägele <reinhard.naeg...@mgm-tp.com>
Subject [Fwd: Weird property replacement issue in Maven 2.1.0]
Date Mon, 20 Apr 2009 06:31:16 GMT
Hello,

Unfortunately, I got no response on the user list, so I'm forwarding 
this to the dev list now. I think this is a critical regression and 
opened a JIRA ticket for it.

http://jira.codehaus.org/browse/MNG-4140

Reinhard

-------- Original-Nachricht --------
Betreff: 	Weird property replacement issue in Maven 2.1.0
Datum: 	Wed, 15 Apr 2009 13:39:12 +0200
Von: 	Reinhard Nägele <reinhard.naegele@mgm-tp.com>
Antwort an: 	Maven Users List <users@maven.apache.org>
An: 	Maven Users List <users@maven.apache.org>


Hello,

I guess I spotted a bug in Maven 2.1.0. In a pom, which is intended to 
be used as a parent pom, we have the following profile. The profile is 
used to copy artifacts to Luntbuild's publish directory.

<profile>
 <id>luntbuild</id>
 <build>
   <plugins>
     <plugin>
       <artifactId>maven-dependency-plugin</artifactId>
       <executions>
         <execution>
           <id>copy</id>
           <phase>deploy</phase>
           <goals>
             <goal>copy</goal>
           </goals>
           <configuration>
             <artifactItems>
               <artifactItem>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>${project.artifactId}</artifactId>
                 <version>${project.version}</version>
                 <type>${project.packaging}</type>
               </artifactItem>
             </artifactItems>
             <outputDirectory>${artifactsDir}</outputDirectory>
           </configuration>
         </execution>
       </executions>
     </plugin>
   </plugins>
 </build>
</profile>

When I deploy the pom, ${project.version} is replaced with the pom's 
version (1 in this case) and ends up in Nexus as follows:

<artifactItem>
 <groupId>${project.groupId}</groupId>
 <artifactId>${project.artifactId}</artifactId>
 <version>1</version>
 <type>${project.packaging}</type>
</artifactItem>

This only happens with Maven 2.1.0. Maven 2.0.10 does not replace 
${project.version}. This is really weird because ${project.version} is 
used in other places throughout the pom (e. g. jar plugin config), where 
it is not replaced. Is there some special treatment to the version tag?

Should I open a JIRA for this?

Reinhard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message