2013-08-05 49 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

相关问题