0
votes

I have Parent Project with pom, defining applicationversion of my child projects in it.

group id: myproject artifactid: parent version: 1 defined Property application version: 1.2 ...

I have child projects Which inherits applicationVersion from parent pom.

When ever Build Engineer change the application version(to 1.3) in parent pom, it will be deployed to our inhouse-repository.(These repositories are configured in .m2/setting.xml)

But in my local repository(desktop .m2/). it is showing the same old application version(1.2). If i delete the parent in my local repository and runs, then it is fetching the parent pom from inhouse-repository. Now, parent pom shows the updated application version.

so, How to update my parent pom in my local repository with inhouse-repository parent pom every time when changes done by build engineer in parentpom.

1
possible duplicate of Force maven updategclaussn
The core question is exactly the same: How to force maven to update dependencies? Please have a look at the question and the accepted answer (see comment above!)gclaussn
Yes. It solves my problem. it updates all my dependencies everytime. But i need my parent pom alone should be updated.Bhimaraju Pukkalla

1 Answers

1
votes

If you want to update a single dependency in your local repository. Run following command:

mvn dependency:get -Dartifact=<groupId>:<artifactId>:<version>