You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by to...@gi-de.com on 2010/11/18 11:14:50 UTC

${project.scm.tag} could not be resolved in multimodule build

Hi, 

I couldnĀ“t resolve ${project.scm.tag} in a multimodule build:

when calling mvn clean install -Prelease (to test the release profile) a 
file named "version.properties" gets always filtered to:

# Buildversion 
productVersion=HEAD

I expected productVersion=TEST-TAG instead.

My parent pom.xml is like:

<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>com.gide</groupId>
        <artifactId>maven-release-test</artifactId>
        <packaging>pom</packaging>
        <version>1.7-SNAPSHOT</version> 
        <name>maven-release-test</name>

        <scm>
            <connection>scm:clearcase:load 
/3fetest/reinhart/maven-release-test</connection>
            <developerConnection>scm:clearcase:load 
/3fetest/reinhart/maven-release-test</developerConnection>
            <tag>TEST-TAG</tag>
            <url></url>
          </scm> 

        <properties> 
                <!-- default at local buildtime -->
 
<productVersion>local-build-${user.name}-${maven.build.timestamp}.9999</productVersion> 
 
        </properties> 

        <profiles>
                <profile> 
                        <id>release</id>
                        <properties>
                                <!-- could be used at mvn release:perform 
-->
                                <!-- will set productVersion to the 
current (released)project.scm.tag -->
 <productVersion>${project.scm.tag}</productVersion> 
                        </properties>
                </profile>
        </profiles>
        <modules>
                <module>maven-release-test-child</module>
        </modules>
</project>

And my child pom.xml is:

<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>com.gide.maven-release-test</groupId>
        <artifactId>maven-release-test-child</artifactId>
        <packaging>jar</packaging>
        <name>maven-release-test-child</name>
        <description>check the release profile activation</description>

        <parent>
                <groupId>com.gide</groupId>
                <artifactId>maven-release-test</artifactId>
                <version>1.7-SNAPSHOT</version>
                <relativePath>../pom.xml</relativePath>
        </parent>

        <build>
                <resources>
                        <resource>
                                <directory>src/main/resources</directory>
                                <filtering>true</filtering>
                        </resource>
                </resources>
        </build>
</project>

=> For ClearCase, we have only one <scm> definition in the parent pom.xml 
- all child modules will be loaded by this configSpec

Could anyone help me, how to resolve ${project.scm.tag} properly ?

Thanx a lot, 

Torsten