I have a multimodule project and one module is a web app and the second one has a custom assembly.
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>src</descriptorRef>
</descriptorRefs>
<formats><format>jar</format></formats>
</configuration>
<executions>
<execution>
<id>cfg-src</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
Basically I need this archive to contain maven project with sources and maven structure, no binaries etc. When I assemble WAR with maven i.e. mvn package, everything is fine. I use "src" classifier in dependcy. My WAR contains the jar with correct assembly. But when I deploy WAR with Intellij Idea (I created tomcat run config) assembly config of the project is ignored and I an incorrect one. How do I make Idea not to ignore assembly plugin. Please let me know if I'm clear.
If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.
Add Maven supportIn the Project tool window, right-click your project and select Add Framework Support. In the dialog that opens, select Maven from the options on the left and click OK. IntelliJ IDEA adds a default POM to the project and generates the standard Maven layout in Project tool window.
IntelliJ does not run mvn package
when you deploy your webapp in Tomcat. It runs its custom Make and Build artifact actions.
You can change this behavior by going into Run/Debug configurations dialog and setting Run Maven Goal (package in your case) as a Before launch action instead of Make and Build artifact.
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With