0

我正在尝试运行代码,但我一直遇到以下错误..

使用 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 
4

1 回答 1

1

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

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

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

${env}.properties

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

mvn [your normal maven arguments] -Denv=something

如果您从任何 IDE 运行它,我确定也有一种方法可以提供这些属性。

于 2013-08-05T17:58:15.553 回答