一千萬個為什麽

搜索

properties-maven-plugin:缺少目標的參數'files'

我正在使用Maven 3.0.3。我正在嘗試從屬性文件中測試讀取屬性(這是更大努力的一部分,我希望首先使這一部分正確)。我在我的pom.xml文件中有這個...

  
    org.codehaus.mojo
    maven-properties-plugin
    1.0
    
      
        ${basedir}/build.properties
      
    
  

但遺憾的是,運行“mvn屬性: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] 

最佳答案

我認為你混淆了插件工件設置。正確的工件標識符是

org.codehaus.mojo
properties-maven-plugin
1.0-alpha-2

See: Plugin Homepage

轉載註明原文: properties-maven-plugin:缺少目標的參數'files'