0

OK, so i'm using the maven-war-plugin to build my war, which works fine. I also have it setup to generate a -classes.jar.

When i run the build, both the war and -classes.jar gets copied into my .m2 repo, which takes up a lot of space.

I would like for only the classes-jar to get copied. Howver, setting the maven-install-plugin to "skip" skips both war and the classes-jar.

Is there a way for me to configure the war build so that only the classes jar gets copied into the repo?

Thanks in advance

Mathias
  • 3,879
  • 5
  • 36
  • 48
  • 1. Why do you need the `-classes.jar`? It is not recommended to use it as dependency. Instead, common classes should go into a separate JAR 2. I cannot really image that this WAR can really clutter your local repository unless it is hundreds of MB (which in itself would be a bad smell). 3. The answer is probably no, but as your approach does not seem right, it would be better to explain what you are planning to do so that we can help you find a better approach. – J Fabian Meier Sep 07 '21 at 11:38
  • It's not a dependency it's for an legacy integration test project. Well, so it's a dependency, but only for the test-project – Mathias Sep 07 '21 at 12:22
  • 1
    Can you explain to me why the WAR causes issues regarding disk space? – J Fabian Meier Sep 07 '21 at 12:42
  • ok.. it doesn't cause issues, per se. I just like to have things clean, i couldn't figure out how to do it so i asked a question here. I wasn't expecting the Spanish Inquisition. – Mathias Sep 07 '21 at 12:53
  • 1
    I am not the Spanish Inquisition ... if people are asking "strange" questions, I'd like to figure out the reason behind it. BTW I would recommend just to leave it as it is. – J Fabian Meier Sep 07 '21 at 13:30
  • https://blog.soebes.de/blog/2021/01/30/questions-over-questions/ – khmarbaise Sep 07 '21 at 15:17
  • Oh, i've never read that before in my life. OK, my harddrive is 1TB and i'm not currently running out of diskspace. Also, i had cornflakes for breakfast. :) – Mathias Sep 08 '21 at 05:35

0 Answers0