简体   繁体   中英

Apache maven plugin upgrade

I've seen here ( https://issues.apache.org/jira/browse/MJARSIGNER-17 ) that the Maven Jar Signer Plugin has a new version which solves the proxy issue.

In Ubuntu 14.04, I have Maven installed

> uname -a
Linux jenkins 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: /usr/share/maven3
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.19.0-25-generic", arch: "amd64", family: "unix"

My pom.xml is here: /var/lib/jenkins/workspace/DEV-Snooper

How can I tell to MAVEN to download the latest version of the plugin and using it?

Thanks! Riccardo

** EDIT: moved to Maven 3.3.9 ***

** Edit: my pom.xml **

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.6</version>
            ...
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jarsigner-plugin</artifactId>
            <version>1.4</version>
            ...
        </plugin>
            ...
    </plugins>
</build>

First of all, (my personal recommendation) -- consider upgrading to the latest Maven (3.3.9).

Secondly, the answer to your question: in your pom.xml (or respective parent pom.xml ) define the version of the maven-jar-plugin :

<project>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                ...
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jarsigner-plugin</artifactId>
                <version>1.4</version>
            </plugin>
        </plugins>
    </build>
    ...
</project>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM