2

Folks,

We are inheriting version of parent POM.xml and using it in the child.

e.g we have following in the pom.xml of the child.

 <parent>
    <groupId>com.maventest</groupId>
    <artifactId>myproject</artifactId>
    <relativePath>../main/pom.xml</relativePath>
    <version>${my-project-version}</version>
</parent>

1) Version ${my-project-version} is dynamic and coming from pom.xml of parent

2) We want to also build child module independently of parent and hence we want to ignore this parent tag altogether while building child module independently is it possible?

user1927808
  • 577
  • 1
  • 10
  • 23
  • did you check [this](http://stackoverflow.com/questions/1501294/maven-skip-parent-project-build) – Yuri G. May 21 '15 at 12:47
  • 1
    looks like **build child modules independently from parent** is the same as **skip parent project build** – Yuri G. May 21 '15 at 13:06
  • Problem for us is we define above ()tag in child pom.xml it is looking for artifact com.maventest:myproject:pom:${my-project-version} when we run child build independently. We cannot pass the parameter from command line as it is inside tag. so it will not be replaced. – user1927808 May 21 '15 at 13:29
  • looks like you are trying to solve another problem in non convient way. check the [Versions Maven Plugin](http://mojo.codehaus.org/versions-maven-plugin/set-mojo.html) may be it can help you – Yuri G. May 21 '15 at 13:55
  • It did not help. Problem is we have multiple war file. We have parent POM and for WAR we have two child modules. This is quite practical that we want to build WAR file independently and give it to some other team. At the same time we want to control the version from parent POM. – user1927808 May 21 '15 at 14:03

0 Answers0