Reputation: 88
I'm working in a couple of REST API developed with the Spring framework (Spring-boot). My coworkers use the STS IDE to code but I prefer Intellij. The generated JARs are not equivalent in both IDEs.
Everything's perfect until I have to generate the jar to deploy. The Intellij generated jar doesn't work for deployment, but the STS generated jar does. So, I code in Intellij and have to generate the jar from STS, which is very tedious.
From STS, I generate the jar with a simple right click on the project, Run As -> Maven install. The jar size is (for one of the projects) 50.4 MB and it works perfectly when deployed to the server.
For Intellij, I've created an artifact like this
The size of the generated jar is 52.7 MB and it doesn't work when deployed to server.
How can I get equivalent results with both IDEs? How can I check possible discrepancies between jars?
Upvotes: 0
Views: 363
Reputation: 8011
If you are able to build the project using maven command mvn clean install and if you are able to run successfully, then you can also achieve the same thing in Intellij Idea. I provide below the way along with the screen shot.
Once project build is successful, you can make right click on the project and click on "Show in Explorer" and you can find the jar file in the project/target directory.
Upvotes: 1