Ответ 1
Вместо этого попробуйте:
<exclude>scripts/**</exclude>
Исключение основано на каталоге, поэтому ваша конструкция исключает
src/main/resources/src/main/resources/scripts
Попытка вывести папку src/main/resources/scripts/
из моей сборки, но следующее не работает:
<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>
Любые идеи?
Вместо этого попробуйте:
<exclude>scripts/**</exclude>
Исключение основано на каталоге, поэтому ваша конструкция исключает
src/main/resources/src/main/resources/scripts
У меня была аналогичная проблема и были обнаружены следующие проблемы:
maven-compiler-plugin
. Для этого добавьте combine.self="override"
в тег configuration
. См. Maven: возможно ли переопределить конфигурацию плагина, уже определенного для профиля в родительском POM.Foo.java
, но в Bar.java
вы import Foo;
, он (попытается) скомпилировать Foo.java
для компиляции Bar.java
.Например:
<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>
<profiles>
<profile>
<id>readBuild</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration >
<excludes>
<exclude>**/com/pyramid/controllers/EntitlementWriteController.java</exclude>
<exclude>**/com/pyramid/controllers/ProductWriteController.java</exclude>
</excludes>
<testExcludes>
<testExclude>**/com/pyramid/controllers/EntitlementWriteControllerTest.java</testExclude>
<testExclude>**/com/pyramid/controllers/ProductWriteControllerTest.java</testExclude>
</testExcludes>
</configuration>
</plugin>
</plugins>
<directory>yourDirectory</directory>
</build>
</profile>