I use tomcat7-maven-pluginand my web application is stored in src/main/webapp. This is a React application, so I run npm run buildto generate a "compiled" version in src/main/webapp/build. My problem is that whenever I pack webapp, the whole folder is webapppacked (including node_modules...) instead of the folder build.
Here is my plugin configuration:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<port>9090</port>
<webappPath>build</webappPath>
</configuration>
</plugin>
</plugins>
</pluginManagement>
How can I make a plugin a package only webapp/build? Or maybe there is a way to at least exclude from the package node_modules, since all these modules are used only to create this packaged version of my webapp?
source
share