maven-deploy-plugin和spring-boot

时间:2017-11-16 23:09:36

标签: spring maven spring-boot

当我使用任何版本的spring-boot-starter-parent大于1.2.8.RELEASE时, maven-deploy-plugin Maven发布期间无法正常工作如何解决此问题?在1.2.8.RELEASE之后发生了一些事情,因为这个问题是一致和令人沮丧的。我在下面列出了一些信息和日志,以显示其内容。

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <!--<version>1.4.4.RELEASE</version> Bad version -->
    <!--<version>1.3.3.RELEASE</version> Bad version -->
    <!--<version>1.3.0.RELEASE</version> Bad version -->

    <version>1.5.8.RELEASE</version> <!-- Also bad. :-( -->

    <!--<version>1.2.8.RELEASE</version> Good version -->
    <!--<version>1.2.6.RELEASE</version> Good version -->
    <!--<version>1.2.1.RELEASE</version> Good version -->
</parent>

在Jenkins Maven发布过程中,我得到了这个,并且它发生在1.2.8之后的每个版本的spring-boot中.RELEASE:

[INFO] [INFO] ---------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ---------------------------------------------------------
[INFO] [INFO] Total time: 5.897s
[INFO] [INFO] Finished at: Thu Nov 16 14:17:25 PST 2017

[INFO] [INFO] Final Memory: 42M/277M
[INFO] [INFO] ---------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-
deploy-plugin:2.8.2:deploy (default-deploy) on project md5checksum-
microservice: Execution default-deploy of goal 
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy failed: An 
API incompatibility was encountered while executing 
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy: 
java.lang.NoSuchMethodError: 
  org.eclipse.aether.spi.connector.ArtifactUpload.setListener(Lorg/eclipse/aether/transfer/TransferListener;)Lorg/eclipse/aether/spi/connector/ArtifactUpload;
[INFO] [ERROR] -----------------------------------------------------
[INFO] [ERROR] realm =    plugin>org.apache.maven.plugins:maven-deploy-
plugin:2.8.2
[INFO] [ERROR] strategy = 
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[INFO] [ERROR] urls[0] = 
file:/home/jenkins/.m2/repository/org/apache/maven/plugins/maven-
deploy-plugin/2.8.2/maven-deploy-plugin-2.8.2.jar
[INFO] [ERROR] urls[1] = file:/home/jenkins/.m2/repository/backport-
util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-
3.1.jar
[INFO] [ERROR] urls[2] = 
file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-
interpolation/1.11/plexus-interpolation-1.11.jar
[INFO] [ERROR] urls[3] = 
file:/home/jenkins/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[INFO] [ERROR] urls[4] = 
file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-
utils/3.0.15/plexus-utils-3.0.15.jar
[INFO] [ERROR] Number of foreign imports: 1
[INFO] [ERROR] import: Entry[import  from realm ClassRealm[maven.api, 
parent: null]]

不确定是否有人想看到这个,但这是我的pom.xml的关键部分:

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-exec</artifactId>
        <version>1.3</version>
    </dependency>

    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.4</version>
    </dependency>

    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.8.2</version>
    </dependency>

    <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>rest</artifactId>
        <version>5.2.2</version>
    </dependency>

    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.6.2</version>
    </dependency>

    <dependency>
        <groupId>org.codehaus.jettison</groupId>
        <artifactId>jettison</artifactId>
        <version>1.3.5</version>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.8.6</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>4.3.4.RELEASE</version>
    </dependency>

    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.8.7</version>
        <scope>test</scope>
    </dependency>

    <!--<dependency>-->
    <!--<groupId>org.jmockit</groupId>-->
    <!--<artifactId>jmockit</artifactId>-->
    <!--<version>1.22</version>-->
    <!--<scope>test</scope>-->
    <!--</dependency>-->

    <dependency>
        <groupId>org.easymock</groupId>
        <artifactId>easymock</artifactId>
        <version>3.4</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.10.19</version>
        <scope>test</scope>
    </dependency>

</dependencies>

<build>

    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
        </resource>
    </resources>

    <plugins>

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.3</version>
        </plugin>

    </plugins>

</build>

0 个答案:

没有答案