Trying to exlcude a folder src/main/resources/scripts/ from my build but the following does not work:
<build> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>src/main/resources/scripts/</exclude> </excludes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <excludes> <exclude>src/main/resources/scripts/</exclude> </excludes> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build> Any ideas?
Instead try:
<exclude>scripts/**</exclude> The exclude is based on directory, so your construction would exclude
src/main/resources/src/main/resources/scripts
I had a similar problem and found the following issues:
maven-compiler-plugin. For this, add combine.self="override" to the configuration tag. See Maven : Is it possible to override the configuration of a plugin already defined for a profile in a parent POM Foo.java, but in Bar.java you import Foo; it will (try to) compile Foo.java to compile Bar.java.For example:
<profiles> <profile> <id>myId</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration combine.self="override"> <excludes> <exclude>**/some/full/directory/*</exclude> <exclude>**/some/single/File.java</exclude> </excludes> </configuration> </plugin> </plugins> </build> </profile>
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