gpt4 book ai didi

Maven - 从构建中排除文件夹

转载 作者:行者123 更新时间:2023-12-01 16:40:01 24 4
gpt4 key购买 nike

尝试从我的构建中排除文件夹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 - 从构建中排除文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25262794/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com