I just found the following issue which could be related:

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

Reinhard

Reinhard Nägele schrieb:
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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



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

Reply via email to