You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2006/03/05 04:13:14 UTC
[jira] Closed: (MINSTALL-15) Use ${variables} in dependencies
doesn't work when pom is installed in the local repository
[ http://jira.codehaus.org/browse/MINSTALL-15?page=all ]
Brett Porter closed MINSTALL-15:
--------------------------------
Assign To: Brett Porter
Resolution: Won't Fix
this is by design. the repository pom is not meant to be interpolated, and profiles should not be used to influence a released pom
> Use ${variables} in dependencies doesn't work when pom is installed in the local repository
> -------------------------------------------------------------------------------------------
>
> Key: MINSTALL-15
> URL: http://jira.codehaus.org/browse/MINSTALL-15
> Project: Maven 2.x Install Plugin
> Type: Bug
> Environment: maven-install-plugin 2.1
> Reporter: Jean-Michel TourniƩ
> Assignee: Brett Porter
> Attachments: MyProject.zip
>
>
> I have a pom, which use variables :
> - myproject.ver : the current version of the project
> - commons-io.ver : the version of commons-io, used by the project
> I define a profile file :
> {code:xml}
> <properties>
> <myproject.ver>12.12</myproject.ver>
> <commons-io.ver>1.0</commons-io.ver>
> </properties>
> {code}
>
> This is my pom:
> {code:xml}
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>test</groupId>
> <artifactId>MyProject</artifactId>
> <packaging>jar</packaging>
> <version>${myproject.ver}</version>
> <name>MyProject</name>
> <dependencies>
> <!-- commons-io -->
> <dependency>
> <groupId>commons-io</groupId>
> <artifactId>commons-io</artifactId>
> <version>${commons-io.ver}</version>
> <type>jar</type>
> <scope>compile</scope>
> </dependency>
> </dependencies>
>
> </project>
> {code}
> When I buil my project by mvn install, I have in my target directory, the file exported-pom.xml, where variable are expanded :
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>test</groupId>
> <artifactId>MyProject</artifactId>
> <name>MyProject</name>
> <version>12.12</version>
> <dependencies>
> <dependency>
> <groupId>commons-io</groupId>
> <artifactId>commons-io</artifactId>
> <version>1.0</version>
> <scope>compile</scope>
> </dependency>
> </dependencies>
> <properties>
> <commons-io.ver>1.0</commons-io.ver>
> <myproject.ver>12.12</myproject.ver>
> </properties>
> </project>
> {code}
> But in my repository, the file MyProject-12.12.pom, contain *$\{commons-io.ver\}* instead of '1.0'.
> {code:xml}
> <?xml version="1.0"?>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>test</groupId>
> <artifactId>MyProject</artifactId>
> <name>MyProject</name>
> <version>12.12</version>
> <dependencies>
> <dependency>
> <groupId>commons-io</groupId>
> <artifactId>commons-io</artifactId>
> <version>${commons-io.ver}</version>
> <scope>compile</scope>
> </dependency>
> </dependencies>
> <distributionManagement>
> <status>deployed</status>
> </distributionManagement>
> </project>
> {code}
> When I use my project as a dependencie of another projet, mvn attempt to download artifact :
> {code}
> http://repo1.maven.org/maven2/commons-io/commons-io/${commons-io.ver\}/commons-io-$\{commons-io.ver\}.pom
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org