maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baz <bazthe...@gmail.com>
Subject Can i use variables within the <parent><artifactId> section?
Date Wed, 21 May 2008 02:02:12 GMT
All,

I am trying to define a variable that i can use on command line to rename
all artifacts (build type) during the build. Something like "mvn clean
install -DbuildType="-Debug"".

I made the change and it works if I build from the parent directory level.
However, it does not the sub directory level. When execute the above command
in the CHILD directory level, Maven does not translate ${buildType} to
"-Debug", it just leave it as "${buildType}. As a result, it fails because
it looking for "xxx-yyy-zzz${buildType}-fullbuild" instead of
"xxx-yyy-zzz-Debug-fullbuild".

Please see the code below.

Is there any Maven statement that help me to achieve what I want to do?

Thanks.

A.

PARENT:

  <groupId>com.xxx.yyy.aaa</groupId>
  <artifactId>xxx-yyy-zzz${buildType}-fullbuild</artifactId>
   <version>1.0.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>xxx-yyy-zzz${buildType}-fullbuild (branch:${scm.branch})</name>


CHILD:

  <parent>
    <groupId>com.xxx.yyy.aaa</groupId>
    <artifactId>xxx-yyy-zzz${buildType}-fullbuild</artifactId>
    <version>1.0.0-SNAPSHOT</version>
  </parent>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message