如何解决无法执行目标org.apache.maven.plugins:maven-resources-plugin

时间:2013-08-05 17:51:22

标签: java hibernate maven netbeans-7

我正在尝试运行代码,但我遇到了以下错误.. 使用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 个答案:

答案 0 :(得分:1)

你在那里的路径中未解决的引用:

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

建议maven项目要求将属性“env”设置为某个东西,可能是* .properties文件名。由于您没有提供/设置此属性,因此它保持原样并且您的项目无法找到名为

的文件
${env}.properties

如果从命令行运行maven,则可以将属性设置为与任何java属性相同:

mvn [your normal maven arguments] -Denv=something

如果你从任何IDE运行它,我确定有一种提供属性的方法。

相关问题