Maven Custom Parent property from Module

2013-11-25 Thread Panciz
I cant access, from a Maven module, to a property defined in the properties
section of the parent. As a matter of fact When I launch the build below the
warName is the default one.

This is the parent Pom


modelVersion4.0.0/modelVersion
groupIdcom.speed.pms/groupId
artifactIdPMS-Main/artifactId
version1.0.0/version
packagingpom/packaging
namePMS Main Build Project/name

properties
context-rootPMS-CUSTOM/context-root
/properties
 modules
module../PMS-WEB/module
 /modules


And this is the module

...
artifactIdPMS-WEB/artifactId
packagingwar/packaging
namePMS-WEB Webapp/name
properties
project.build.sourceEncodingUTF-8/project.build.sourceEncoding
web.resource.dirsrc/main/webapp/web.resource.dir
/properties
build
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
version2.4/version
configuration

warName${context-root}/warName
webResources
resource
directory${web.resource.dir}/directory
/resource
/webResources
/configuration
/plugin


While I can use the ${project.parent.arctifactId} property. I try also
${project.parent.properties.context-root} but without success. It should be
simple but I cant understand Which is my errror? Shouldn't be the properties
inherited from the parent in a Module?

Davide



--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Maven Custom Parent property from Module

2013-11-25 Thread Milos Kleint
does your child project reference the parent using the parent
element? in the correct version?

Milos

On Mon, Nov 25, 2013 at 9:57 AM, Panciz dav.pole...@gmail.com wrote:
 I cant access, from a Maven module, to a property defined in the properties
 section of the parent. As a matter of fact When I launch the build below the
 warName is the default one.

 This is the parent Pom

 
 modelVersion4.0.0/modelVersion
 groupIdcom.speed.pms/groupId
 artifactIdPMS-Main/artifactId
 version1.0.0/version
 packagingpom/packaging
 namePMS Main Build Project/name

 properties
 context-rootPMS-CUSTOM/context-root
 /properties
  modules
 module../PMS-WEB/module
  /modules
 

 And this is the module

 ...
 artifactIdPMS-WEB/artifactId
 packagingwar/packaging
 namePMS-WEB Webapp/name
 properties
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
 web.resource.dirsrc/main/webapp/web.resource.dir
 /properties
 build
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 version2.4/version
 configuration

 warName${context-root}/warName
 webResources
 resource
 directory${web.resource.dir}/directory
 /resource
 /webResources
 /configuration
 /plugin
 

 While I can use the ${project.parent.arctifactId} property. I try also
 ${project.parent.properties.context-root} but without success. It should be
 simple but I cant understand Which is my errror? Shouldn't be the properties
 inherited from the parent in a Module?

 Davide



 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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


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



Re: Maven Custom Parent property from Module

2013-11-25 Thread Panciz
Yes I do . Actually in the previous post I omit the parent declaration the
complete child header is:

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion

 parent
groupIdcom.speed.pms/groupId
artifactIdPMS-Main/artifactId
version1.0.0/version
  /parent

artifactIdPMS-WEB/artifactId
packagingwar/packaging
namePMS-WEB Maven Webapp/name

dependencies

/dependencies
build

finalNamePMS-WEB/finalName
plugins

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
version2.4/version
configuration

warName${context-root}/warName
webResources
resource

directory${web.resource.dir}/directory
/resource
/webResources
/configuration
/plugin
   /plugins
  /build
  /project

Davide



--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488p5776490.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Maven Custom Parent property from Module

2013-11-25 Thread Anders Hammar
It should work. Maybe it's something with the war plugin.
What version av Maven are you on btw?

/Anders


On Mon, Nov 25, 2013 at 10:22 AM, Panciz dav.pole...@gmail.com wrote:

 Yes I do . Actually in the previous post I omit the parent declaration the
 complete child header is:

 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion

  parent
 groupIdcom.speed.pms/groupId
 artifactIdPMS-Main/artifactId
 version1.0.0/version
   /parent

 artifactIdPMS-WEB/artifactId
 packagingwar/packaging
 namePMS-WEB Maven Webapp/name

 dependencies
 
 /dependencies
 build

 finalNamePMS-WEB/finalName
 plugins
 
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 version2.4/version
 configuration

 warName${context-root}/warName
 webResources
 resource

 directory${web.resource.dir}/directory
 /resource
 /webResources
 /configuration
 /plugin
/plugins
   /build
   /project

 Davide



 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488p5776490.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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




Re: Maven Custom Parent property from Module

2013-11-25 Thread Milos Kleint
while your module../PMS-WEB/module section in parent pom
references the child in the same directory, your
parent/relativePath is undefined, therefore expecting the parent
to be one level up, not on the same level.

Please check documentation for maven model + see the effective pom to
see if the property is actually defined.

milos

On Mon, Nov 25, 2013 at 10:22 AM, Panciz dav.pole...@gmail.com wrote:
 Yes I do . Actually in the previous post I omit the parent declaration the
 complete child header is:

 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion

  parent
 groupIdcom.speed.pms/groupId
 artifactIdPMS-Main/artifactId
 version1.0.0/version
   /parent

 artifactIdPMS-WEB/artifactId
 packagingwar/packaging
 namePMS-WEB Maven Webapp/name

 dependencies
 
 /dependencies
 build

 finalNamePMS-WEB/finalName
 plugins
 
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 version2.4/version
 configuration

 warName${context-root}/warName
 webResources
 resource
 
 directory${web.resource.dir}/directory
 /resource
 /webResources
 /configuration
 /plugin
/plugins
   /build
   /project

 Davide



 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488p5776490.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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


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



Re: Maven Custom Parent property from Module

2013-11-25 Thread Panciz
Apache Maven 3.1.0
Java version: 1.7.0_40





--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488p5776493.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Maven Custom Parent property from Module

2013-11-25 Thread Anders Hammar
Try Maven 3.0.4 instead and see if that works. If so, please try Maven
3.1.1 and verify that it still works.

/Anders


On Mon, Nov 25, 2013 at 10:49 AM, Panciz dav.pole...@gmail.com wrote:

 Apache Maven 3.1.0
 Java version: 1.7.0_40





 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488p5776493.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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




Re: Maven Custom Parent property from Module

2013-11-25 Thread Panciz
OK adding the relativePath../PMS-Main/relativePath to the child pom.xml
everything works.

Thanks for the quick reply.

Davide



--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488p5776499.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Maven Custom Parent property from Module

2013-11-25 Thread Stephen Connolly
Well you do know all bets are off if you are using non-SNAPSHOT versions
for anything but a release build


On 25 November 2013 10:19, Panciz dav.pole...@gmail.com wrote:

 OK adding the relativePath../PMS-Main/relativePath to the child pom.xml
 everything works.

 Thanks for the quick reply.

 Davide



 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Maven-Custom-Parent-property-from-Module-tp5776488p5776499.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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