Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread laredotornado
. Is there any way I can replace that with something that will be automatically inherited from the parent? Thanks, - Dave -- View this message in context: http://old.nabble.com/Maven-2%3A--How-can-I-avoid-hard-coding-the-version-multiple-times--tp26576290p26576290.html Sent from the Maven - Users mailing

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread Joe Hindsley
Hi Dave, If you want to inherit the parent's groupId and version values, you simply remove them from the child's pom definition. In your case, the child pom would look like: parent groupIdMyco.galc.capitol.tours/groupId artifactIdMyco-galc-capitol-tours/artifactId

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread Arnaud HERITIER
-SNAPSHOT hard-coded a couple of times in my webapp/pom.xml. Is there any way I can replace that with something that will be automatically inherited from the parent? Thanks, - Dave -- View this message in context: http://old.nabble.com/Maven-2%3A--How-can-I-avoid-hard-coding-the-version

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread Wayne Fay
You'll notice I have 1.0-SNAPSHOT hard-coded a couple of times in my webapp/pom.xml.  Is there any way I can replace that with something that will be automatically inherited from the parent? If you're using the release plugin, this is not generally a problem. So, what is your reason behind

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread Johannes Schneider
You have several possibilities. - define properties and use them (properties...) - use dependencyManagement for multi module projects - avoid defining a own version in multi module projects (inherits the parent pom) Don't know your use case. But one of those methods should solve it. Sincerly,

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread laredotornado
: users-h...@maven.apache.org -- View this message in context: http://old.nabble.com/Maven-2%3A--How-can-I-avoid-hard-coding-the-version-multiple-times--tp26576290p26577009.html Sent from the Maven - Users mailing list archive at Nabble.com

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread Joe Hindsley
Dave, Yes. Child poms should always explicitly name their parents. The reason for this is that you might have a parent pom that exists in the repository and not in your directory structure. In order for maven to be able to find that pom, it will need the repository 'coordinates'. An example

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread Baptiste MATHUS
webapp/pom.xml. Is there any way I can replace that with something that will be automatically inherited from the parent? Thanks, - Dave -- View this message in context: http://old.nabble.com/Maven-2%3A--How-can-I-avoid-hard-coding-the-version-multiple-times--tp26576290p26576290.html

Re: Maven 2: How can I avoid hard-coding the version multiple times?

2009-11-30 Thread Arnaud HERITIER
the parent? Thanks, - Dave -- View this message in context: http://old.nabble.com/Maven-2%3A--How-can-I-avoid-hard-coding-the-version-multiple-times--tp26576290p26576290.html Sent from the Maven - Users mailing list archive at Nabble.com