You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefan Armbruster <ml...@armbruster-it.de> on 2008/02/29 23:29:36 UTC

install plugin does not resolve properties in local repo's .pom file

Hi,

when the install plugin creates the .pom file in the local repository along 
with the artifact, property references inside the pom are not replaced.

Example: create a sample webapp project via "mvn archetype:generate", choose 
type 18 (maven-archetype-webapp).

Modify the generated pom.xml to look like this:

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>mygroupid.${client}</groupId>
  <artifactId>myartifactird</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>myartifactird Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <finalName>myartifactird</finalName>
  </build>
</project>

NB, there's a property ${client} in the groupId. When calling
mvn -Dclient=customer_a install
the resulting .war file will be installed in 
M2_repo/mygroupid/customer_a/....
The .pom file in the local repository still has the ${client} property and not 
the resolved value.

Is this a bug? Or can someone point me how to replace this property by its 
value?

Thanks in advance,
Stefan

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