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 <[email protected]>
Antwort an:     Maven Users List <[email protected]>
An:     Maven Users List <[email protected]>


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: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to