You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Morgovsky, Alexander (US - Glen Mills)" <am...@deloitte.com> on 2006/10/28 17:12:25 UTC

Inherited property resolution

I have a parent project which defines a test_version property, and a
child project which attempts to this property, which is the version of
the application in this case.  However, when doing a build, the
test_version property of the parent element does not get resolved.  I
get this error.  May someone please help me with this scenario?  Thanks
in advance for your help.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: test
ArtifactId: test
Version: ${test_version}

Reason: Unable to download the artifact from any repository

  test:test:pom:${test_version}

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent:
test:test for projec
t: test_sub_a:test_sub_a:pom:${test_version}

Parent project test:

<project>
	<artifactId>test</artifactId>
   	<groupId>test</groupId>
	<version>1.0.0</version>
	<modelVersion>4.0.0</modelVersion>
	<modules>
  		<module>test_sub_a</module>
  	</modules>
  	<packaging>pom</packaging>
	<properties>
		<test_version>1.0.0</test_version>
	</properties>
</project>

Child project test_sub_a:

<?xml version="1.0" encoding="UTF-8"?>
<project>
	<artifactId>test_sub_a</artifactId>
   	<groupId>test_sub_a</groupId>
	<version>${test_version}</version>
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>test</groupId>
		<artifactId>test</artifactId>
		<version>${test_version}</version>
	</parent>
  	<packaging>pom</packaging>
</project> 


This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law.  If you are not the intended recipient, you should delete this message. 


Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]