我想對copie文件比較我的配置文件標識符。Maven文件複製錯誤
我推出這個命令:
mvn -Pprod install
我有這樣的錯誤:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.4:copy-resources (copy-web.xml) on proj ect apex: Execution copy-web.xml of goal org.apache.maven.plugins:maven-resources-plugin:2.4:copy-resources failed: base dir D:\workspace\apex\src\main\webapp\WEB-INF\web.prod.xml is not a directory -> [Help 1]
我的pom.xml:
<properties>
<webXmlFile>web.xml</webXmlFile>
<profileVersion>defaultVersion</profileVersion>
</properties>
<profiles>
<profile>
<id>dev</id>
<properties>
<profileVersion>DEV</profileVersion>
<webXmlFile>web.dev.xml</webXmlFile>
</properties>
</profile>
<profile>
<id>preprod</id>
<properties>
<profileVersion>PREPROD</profileVersion>
<webXmlFile>web.preprod.xml</webXmlFile>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<profileVersion>PROD</profileVersion>
<webXmlFile>web.prod.xml</webXmlFile>
</properties>
</profile>
</profiles>
<build>
<finalName>app-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy-web.xml</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${basedir}/target/classes/WEB-INF</outputDirectory>
<resources>
<resource>
<directory>/src/main/webapp/WEB-INF/${webXmlFile}</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
...
...
...
的「不是目錄」的消息是很清楚,我:)在資源你通過一個文件的目錄,所以它是抱怨(無論它是值得的,我不是downvoter) –
@ A.DiMatteo是的,這對我來說很清楚,但如何傳遞我的文件? – Mercer