. 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
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
-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
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
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,
: 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
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
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
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