atom feed8 messages in org.apache.maven.usersRe: Pom Parent Version Properties
FromSent OnAttachments
JanSep 24, 2009 9:01 am 
Stephen ConnollySep 24, 2009 9:26 am 
Albert KuruczSep 24, 2009 9:57 am 
Lacoste, Dana (TSG Software San Diego)Sep 24, 2009 10:01 am 
Albert KuruczSep 24, 2009 10:28 am 
Stephen ConnollySep 24, 2009 2:19 pm 
paulvSep 29, 2009 2:18 pm 
Albert KuruczSep 29, 2009 2:53 pm 
Subject:Re: Pom Parent Version Properties
From:Stephen Connolly (step@gmail.com)
Date:Sep 24, 2009 9:26:53 am
List:org.apache.maven.users

2009/9/24 Jan <ragh@gmail.com>:

Hi All,

I have multimodule project so i defined a root pom which has entry like <project>    <modelVersion>4.0.0</modelVersion>  <groupId>Admin</groupId>  <artifactId>ProjetA</artifactId>  <version>${releaseNumber}</version> ..... .... <modules>  <module>my-modA</module> <module>my-modB</module> <module>my-modC</module> <module>my-modD</module>

then in child pom i refer my pom like

<project>    <modelVersion>4.0.0</modelVersion>    <parent>        <groupId>Admin</groupId>        <artifactId>ProjectA</artifactId>        <version>${releaseNumber}</version>        <relativePath>${basedir}/../pom.xml</relativePath>    </parent>

now when i run mvn -DreleaseNumber="55.0.0.0" clean install from the root level everything works fine,

everything working fine is a bug. i.e. property substitution should not be allowed in /project/parent/(groupId|artifactId|version) or in /project/(groupId|artifactId|version)

it is parsing the ${releaseNumber}, but when i just want to compile only my-modD its not working,${releaseNumber} is notbeing parsed ie.  if i execute the same mvn command from the my-modD folder directly its giving me an Error like

This is F.A.D.

Downloading: http://repo1.maven.org/maven2/Admin/ProjectA/${releaseNumber}/ProjectA-${releaseNumber}.pom [DEBUG] Unable to locate resource in repository org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository        at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:139)        at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)        at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:546)        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:427)        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:382)        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)

::::::::::::::::::::::::::::::: [INFO]

------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO]

------------------------------------------------------------------------ [INFO] Failed to resolve artifact.

GroupId: Admin ArtifactId: ProjectA Version: ${releaseNumber}

Reason: Unable to download the artifact from any repository

 Admin:ProjectA:pom:${releaseNumber}

from the specified remote repositories:  central (http://repo1.maven.org/maven2)

Is there any other ways to pass this version as a parameter or it has to be hardcoded??

hardcoded.

Please help