pom.xml 片段:
<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources/${dbEnv}/</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<webResources>
<resource>
<directory>src\WEB-INF\</directory>
<targetPath>WEB-INF</outputDirectory>
<includes>
<include>*.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
我希望这会将文件 /src/WEB-INF/jboss-web.xml 复制到 /target/blahblahblah/WEB-INF/
问题是它不会将其创建为 .xml 文件,而是创建一个名为 jboss-web.xml 的目录
我该如何解决这个问题?我在 RHEL 8.7 和 maven 3.5.4.
它在 Windows 上正常工作。