2013-08-05 161 views
0

我試圖運行的代碼,但我一直在experienceing這下面的錯誤..如何解決無法執行目標org.apache.maven.plugins:Maven的資源 - 插件

使用JBoss 4.0.5服務器,Netbeans 7

任何人都可以請幫我解決這個問題嗎?

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project plant: Error loading property file 'C:\Documents and Settings\xxxxx\My Documents\NetBeansProjects\plant\src\main\filters\${env}.properties' -> [Help 1] 

To see the full stack trace of the errors, re-run Maven with the -e switch. 
Re-run Maven using the -X switch to enable full debug logging. 

For more information about the errors and possible solutions, please read the following articles: 
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

回答

1

路徑未解決的參考你必須有:

src\main\filters\${env}.properties 

表明Maven項目需要財產「ENV」設置爲東西,可能是的* .properties文件名。因爲你不是提供/設置該屬性則保持原樣和你的項目未能找到一個名爲

${env}.properties 

如果您選擇在命令行運行Maven,你可以設置爲任意的Java屬性的屬性相同的文件:

mvn [your normal maven arguments] -Denv=something 

如果你從任何IDE運行它,我肯定還有一種方法來提供屬性。

+0

謝謝!我將它更改爲POM.xml中的本地文件「 src/main/filters/local.properties」並且能夠構建War文件 – user2653936

+0

@ user2653936 - 非常歡迎。如果我的答案確實解決了您的問題,請您將其標記爲答案?謝謝 :-) – radai

相關問題