0

I know that, I can give a fileName for the WAR file using the build/finalName tag in the pom.xml file.

But this will only affect the name of the package created in the target directory (or a specifically given directory using build/directory). It will not affect to the file name in the local repository and remote repositories and they'll always contains the name with version numbers.

Is there any other way to do this as it will affect to the local repository and remote repositories as well?

References : how to Build project with maven without version

Community
  • 1
  • 1
ironwood
  • 8,936
  • 15
  • 65
  • 114

1 Answers1

1

Basically the artifact in the repository is identified by our pom.xml, the group-id and artifact-id. Even we change the finalName, there is no any effect, since our pom.xml still the same.

Imagine that our pom.xml is defined as some-group:foo. Then we change the finalName to bar I've no idea how can we get the some-group:bar from the repository.

There are no any pom.xml which describes about some-group:bar.

Charlee Chitsuk
  • 8,847
  • 2
  • 56
  • 71
  • That means we have to use it with the artifactid and version number right in those scenarioes? So, final name will be useful for manually deployments but if we are using auto deploy we have to use what is given. I have a main problem in the URL to connect to the WAR. – ironwood Apr 21 '15 at 10:40
  • AFAIK, the `Glassfish` has a `glassfish-web.xml` and the `weblogic` also has `weblogic.xml` for identifying the `context-root`. I also use this technique to customize my project `URL`. Please refer to your application server configuration guide. – Charlee Chitsuk Apr 21 '15 at 10:52
  • Yep. That is only one concern Charlee. I didn't ask this question only for that URL issue. I wanted to know whether this naming modification is possible or not with the local/remote repositories. BTW, Thank you very much for the answer and comment. They are very helpful. – ironwood Apr 21 '15 at 11:07