gpt4 book ai didi

maven - 属性-maven-plugin : The parameters 'files' for goal . .. 丢失

转载 作者:行者123 更新时间:2023-12-04 20:54:51 27 4
gpt4 key购买 nike

我正在使用 Maven 3.0.3。我正在尝试从属性文件中测试读取属性(这是更大努力的一部分,我想首先正确处理这部分)。我的 pom.xml 文件中有这个...

  <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>maven-properties-plugin</artifactId>
<version>1.0</version>
<configuration>
<files>
<file>${basedir}/build.properties</file>
</files>
</configuration>
</plugin>

但遗憾的是,运行“mvn properties:read-project-properties”失败并出现以下错误。我需要如何重新配置​​我正在做的事情? - 戴夫
davea-mbp2:socialmediaproxy davea$ mvn properties:read-project-properties  
[INFO] Scanning for projects...
[WARNING] The POM for org.codehaus.mojo:maven-properties-plugin:jar:1.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:maven-properties-plugin:1.0: Plugin org.codehaus.mojo:maven-properties-plugin:1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:maven-properties-plugin:jar:1.0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building socialmediaproxy 0.1
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.codehaus.mojo:maven-properties-plugin:jar:1.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:maven-properties-plugin:1.0: Plugin org.codehaus.mojo:maven-properties-plugin:1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:maven-properties-plugin:jar:1.0
[INFO]
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default-cli) @ socialmediaproxy ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.355s
[INFO] Finished at: Fri Apr 15 11:01:31 CDT 2011
[INFO] Final Memory: 11M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:read-project-properties (default-cli) on project socialmediaproxy: The parameters 'files' for goal org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:read-project-properties are missing or invalid -> [Help 1]
[ERROR]

最佳答案

我认为您混淆了插件 Artifact 设置。正确的 Artifact 标识符是

<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>

见: Plugin Homepage

关于maven - 属性-maven-plugin : The parameters 'files' for goal . .. 丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5679426/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com