【问题标题】:Maven-plugin-plugin default-descriptor error message after upgrade to 3.1.1升级到 3.1.1 后的 Maven-plugin-plugin default-descriptor 错误消息
【发布时间】:2013-11-08 20:52:44
【问题描述】:

我正在将系统的 Maven 运行时从 3.0.5 升级到 3.1.1,并尝试像往常一样使用 mvn clean install 构建我的项目。使用较旧的 Maven 运行时,构建总是会成功。但是,我现在在构建过程中总是收到此错误消息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (default-descriptor) on project XYZ: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor failed: 48188 -> [Help 1]

我认为这可能是由于我的依赖项和插件已过时,所以我运行mvn versions:use-latest-versions 来更新我的 pom.xml 版本。那仍然没有解决这个问题。有什么想法吗?


更新

根据大众需求,我的 pom.xml 文件如下所示。请注意,所有依赖项和插件版本都由 mvn versions:use-latest-versions 更新,除了 Sitebricks 和 qdox,因为我不想将重大更改集成到我的项目中。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.my.company</groupId>
    <artifactId>my-own-project</artifactId>
    <version>1.0.1-SNAPSHOT</version>
    <name>My Cool Maven Plugin</name>
    <packaging>maven-plugin</packaging>
    <distributionManagement>
    <repository>
            <id>someID</id>
            <url>http://some.url.com</url>
    </repository>
    </distributionManagement>   
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>
    <dependencies>
        <dependency>
        <groupId>org.freemarker</groupId>
        <artifactId>freemarker</artifactId>
        <version>2.3.20</version>
    </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.11</version>
        </dependency>
        <dependency>
            <groupId>com.google.sitebricks</groupId>
            <artifactId>sitebricks</artifactId>
            <version>0.8.5</version>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.qdox</groupId>
            <artifactId>qdox</artifactId>
            <version>1.12</version>
        </dependency>
        <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.8.7</version>
        <scope>test</scope>
    </dependency>
    </dependencies>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <effort>Max</effort>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.4</version>
            </plugin>
        </plugins>
    </reporting>
</project>

【问题讨论】:

标签: java maven plugins dependencies


【解决方案1】:

通过配置升级和使用以下依赖项解决了我的问题:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
               <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
               <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
            <execution>
                <id>mojo-descriptor</id>
                <goals>
                    <goal>descriptor</goal>
                </goals>
            </execution>
        </executions>
      </plugin>

【讨论】:

【解决方案2】:

我遇到了完全相同的问题,并尝试了可能重复的Basic maven plugin project not working, Mojo plugin descriptors not generating 中提供的所有提示,但没有任何效果。最终结果证明库com.ibm.icu:icu4j 的旧版本2.6.1 由其他一些第3 方模块使用负责。我完全摆脱了 icu4j 依赖项,此后 maven-plugin-plugin 运行没有问题。

【讨论】:

  • 这对我有用。不过,smartics.eu 的链接已失效。
  • 确实已经死了,所以我删除了它,因为它只是一个额外的参考,
猜你喜欢
  • 2017-01-21
  • 1970-01-01
  • 2015-11-19
  • 2021-10-26
  • 2020-07-06
  • 1970-01-01
  • 2016-03-09
  • 1970-01-01
相关资源
最近更新 更多