I'm working on a spring (with maven) custom library project. I can access my library project's version ( say 3.0-SNAPSHOT).
How can I access App's version from library project?
I mean the version of the app that uses my custom library project as a library.
Is it possible to access App's version from library project in Spring(with maven)?
65 views Asked by neelrotno At
3
There are 3 answers
0
On
If your library project references the App root module as a parent:
<parent>
<groupId>app.group.id</groupId>
<artifactId>app</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
You can then reference the project.version property of the app parent in your library with ${project.version} - just make sure you don't have a version defined in the library project otherwise it will use that. If you do want to have a separate library version you can add a property in the parent:
<properties>
<app.version>1.0.0-SNAPSHOT</app.version>
</properties>
and reference it in the library with ${app.version}
Yes, Of course. First, you need set up nexus server for use. Second, you deploy your app to your private nexus server. You can search maven nexus