Intellij Idea ignoring maven build plugin

I have a project with multiple modules and one module is a web application and the other is a custom one.

           <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 a maven project with maven sources and framework, no binaries, etc. When I build WAR with maven i.e. Mvn, it's okay. I am using src classifier depending. My WAR contains a jar with the correct build. But when I deploy WAR with Intellij Idea (I created tomcat run config) the project build config is ignored and I am wrong. How to make Idea ignore plugin assembly. Please let me know if I am clear.

+3


source to share


1 answer


IntelliJ won't start mvn package

when deploying your webapp to Tomcat. It does its custom Make and Build artifact actions.

You can change this behavior by going to the Run / Debug Configuration dialog box and choosing Run Maven Goal (package in your case) as a Before Run action instead of Make and Build Artifact.



Hope it helps

+4


source







All Articles