我的/src/main/resources
文件夹中有 3 个资源:
┓ src/main/resources
┣━━━ magnetDatabase.csv
┣━━━ windingDatabase.csv
┗━━━ logo.png
当我运行mvn exec:java
所有资源时,除了windingDatabase.csv
似乎被移动到target/classes
.
我的相关部分pom.xml
如下:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>my.main.class</mainClass>
</configuration>
</plugin>
...
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>magnetDatabase.csv</include>
<include>windingDatabase.csv</include>
<include>logo.png</include>
</includes>
</resource>
</resources>
对于两者exec:exec
,exec:java
它不会复制这一个资源文件?我检查了文件的名称,它是正确的。我一直不得不手动复制它,这很烦人