You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ra...@jpmchase.com on 2006/03/22 22:32:37 UTC

Passing Version number thru properties in depdency section

Hi All,

As i'm not getting much reponse on my earlier post, here i'm posting again 
the same question

i already tried

1. Passing proj.version thru system property as -Dproj.version
2. First did mvn install on Module-A then tried 



I have some weird problem in may be pom inheritance

This is what my dirctory structure

Project
    Module A
        SubModule-A
                        |-pom.xml
       |-pom.xml

     Module B
        SubModule-B
                        |- pom.xml
          |-pom.xml
|-pom.xml

lets say i have SubModule-A has a dependency in my SubModule-B

in my SubModule-B pom.xml i have
                <dependency>
                        <groupId>Project.ModuleA</groupId>
                        <artifactId>SubModule-A</artifactId>
                        <version>${proj.version}</version>
                        <type>jar</type>
                        <scope>provided</scope>
                </dependency>
 

here ${proj.version} comes from my .m2>settings.xml

When i run mvn deploy from top level (ie) c:\project everything works fine

but when i just want to deploy lets say Module B then when i ran mvn 
deploy from c:\project\ModuleB

its giving me error

   Downloading: http://Mycompany.repository.com/Project/Module 
A/${proj.version}/Module-A-${proj.version}.pom
[WARNING] Unable to get resource from repository Dev-Repo 
(http://Mycompany.repository.com)
Downloading: http://repo1.maven.org/maven2/Project/Module 
A/${proj.version}/Module-A-${proj.version}.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: Project
ArtifactId: Module-A
Version: ${proj.version}

Reason: Unable to download the artifact from any repository

  Project.Module A:pom:${proj.version}

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  Dev-Repo (http://Mycompany.repository.com)


Any suggestion??


Thanks,
Raghu 

Re: Passing Version number thru properties in depdency section

Posted by -- jarl <tt...@gmail.com>.
I have also tried this and came to the same conclusion - properties in the
version tag are not expanded. I dont know if this is intended behaviour.

-- jarl

--
View this message in context: http://www.nabble.com/Passing-Version-number-thru-properties-in-depdency-section-t1326797.html#a3644433
Sent from the Maven - Users forum at Nabble.com.


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