intellij build ignores maven instructions
Answered
I have a maven project. I created the project from sources with an existing pom.
When I compile using mvn clean install from the command line, it creates the jar in the target directory.
When I do a rebuild from intellij, it instead builds everything under m2 repository for the package.
Furthermore, my pom creates a fat jar using maven-shade-plugin which works fine when running from the command line but is not created when running from intellij.
Please sign in to leave a comment.
Build | Make doesn't invoke Maven specific tasks that build jars, etc. Also, for the jar packaging IntelliJ IDEA doesn't create any artifacts by default.
You can run custom Maven targets from the Maven Projects tool window or configure them to run automatically after compilation.
How would I configure this? My use case is that the maven default target (for mvn clean install) creates some files in target.
Is there a way to configure rebuild to run this (I do not want to run mvn clean install after running rebuild....)
Configure mvn install to execute after rebuild: