Can't you use the release plugin ? It will automatically update it for you
....

Arnaud

On Nov 27, 2007 7:41 PM, Enrique Gaona <[EMAIL PROTECTED]> wrote:

>
>
> Greets,
>
> I have a big maven project  that has about 300 pom files in it.
>  Currently,
> the <version> is hardcoded on all the pom.xml files and moving from one
> version to another is a PITA.   My question is, what's the best way of
> doing away with the hardcoded value and moving to a variable where it can
> be set in the parent pom.   Right now, I'm experimenting by setting
> version
> to <version>${build_version}</version>  and added in my parent pom
> <properties><build_version>2.2</build_version></properties>.      For the
> most part, this works fine, but  there are some sub-components in the
> project where ${build_version} is not getting expanded, which is quite
> annoying, to say the least.
>
> Here's a sample output where the variable is not getting expanded.
>
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] Building CSDPRoleMappingPortlet
> [INFO]    task-segment: [clean, antrun:run, install, rpm:rpm]
> [INFO]
>
> ----------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory
>
> /home/egaona/projects/csdp_build/sources/csdp/com.ibm.csdp.pm.selfcare/CSDPRoleMappingPortlet/target
> [INFO] Deleting directory
>
> /home/egaona/projects/csdp_build/sources/csdp/com.ibm.csdp.pm.selfcare/CSDPRoleMappingPortlet/WebContent/WEB-INF/classes
> [INFO] Deleting directory
>
> /home/egaona/projects/csdp_build/sources/csdp/com.ibm.csdp.pm.selfcare/CSDPRoleMappingPortlet/target/test-classes
> Downloading:
>
> ftp://ausgsa.austin.ibm.com/projects/c/csdpbuildrepository/maven/repository/com/ibm/csdp/prereq/com.ibm.csdp.prereq/${csdp_version}/com.ibm.csdp.prereq-${csdp_version}.pom<ftp://ausgsa.austin.ibm.com/projects/c/csdpbuildrepository/maven/repository/com/ibm/csdp/prereq/com.ibm.csdp.prereq/$%7Bcsdp_version%7D/com.ibm.csdp.prereq-$%7Bcsdp_version%7D.pom>
> [WARNING] Unable to get resource from repository csdpFtpRepository
> (
> ftp://ausgsa.austin.ibm.com/projects/c/csdpbuildrepository/maven/repository
> )
> Downloading:
>
> ftp://ausgsa.ibm.com/projects/c/csdpbuildrepository/maven/repository/com/ibm/csdp/prereq/com.ibm.csdp.prereq/${csdp_version}/com.ibm.csdp.prereq-${csdp_version}.pom<ftp://ausgsa.ibm.com/projects/c/csdpbuildrepository/maven/repository/com/ibm/csdp/prereq/com.ibm.csdp.prereq/$%7Bcsdp_version%7D/com.ibm.csdp.prereq-$%7Bcsdp_version%7D.pom>
> [WARNING] Unable to get resource from repository csdpFtpRepository
> (ftp://ausgsa.ibm.com/projects/c/csdpbuildrepository/maven/repository)
> Downloading:
>
> http://ausgsa.ibm.com/projects/c/csdpbuildrepository/maven/repository/com/ibm/csdp/prereq/com.ibm.csdp.prereq/${csdp_version}/com.ibm.csdp.prereq-${csdp_version}.pom<http://ausgsa.ibm.com/projects/c/csdpbuildrepository/maven/repository/com/ibm/csdp/prereq/com.ibm.csdp.prereq/$%7Bcsdp_version%7D/com.ibm.csdp.prereq-$%7Bcsdp_version%7D.pom>
> [WARNING] Unable to get resource from repository csdpRepository
> (http://ausgsa.ibm.com/projects/c/csdpbuildrepository/maven/repository)
> Downloading:
>
> http://www.ibiblio.net/pub/packages/maven2/com/ibm/csdp/prereq/com.ibm.csdp.prereq/${csdp_version}/com.ibm.csdp.prereq-${csdp_version}.pom<http://www.ibiblio.net/pub/packages/maven2/com/ibm/csdp/prereq/com.ibm.csdp.prereq/$%7Bcsdp_version%7D/com.ibm.csdp.prereq-$%7Bcsdp_version%7D.pom>
> [WARNING] Unable to get resource from repository central
> (http://repo1.maven.org/maven2)
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> GroupId: com.ibm.csdp.prereq
> ArtifactId: com.ibm.csdp.prereq
> Version: ${csdp_version}
>
> Reason: Unable to download the artifact from any repository
>
>  com.ibm.csdp.prereq:com.ibm.csdp.prereq:pom:${csdp_version}
>
> from the specified remote repositories:
>  Maven Snapshots (http://snapshots.maven.codehaus.org/maven2/),
>  central (http://repo1.maven.org/maven2),
>  csdpRepository
> (http://ausgsa.ibm.com/projects/c/csdpbuildrepository/maven/repository),
>  csdpFtpRepository
> (
> ftp://ausgsa.austin.ibm.com/projects/c/csdpbuildrepository/maven/repository
> )
>
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 minute 21 seconds
> [INFO] Finished at: Tue Nov 27 12:36:55 CST 2007
> [INFO] Final Memory: 11M/30M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Any ideas?  Thanks.
>
> Enrique
>



-- 
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..........................................................
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...........................................................

Reply via email to