Below is the directory structure of my Spring MVC project. Since the size of the node_modules, I want to exclude the directory during the maven build.
I have tried several methods, but none of them worked for me.
Below is the build part of pom.xml
<build>
<finalName>ROOT</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<excludes>
<exclude>node_modules</exclude>
</excludes>
</configuration>
<version>3.1</version>
</plugin>
</plugins>
Also I tried warSourceExcludes, but also it didn't work.
Please share any of your idea.
Thanks.
Try this :
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<excludes>
<exclude>**/src/main/java/webapp/node_modules/*</exclude>
</excludes>
</configuration>
<version>3.1</version>
</plugin>
</plugins>
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