Java Ninja Chronicles By Norris Shelton

Things I learned in the pursuit of code

The benefit of having a local Maven repository is that only one developer suffers the delay of the network traffic requests to repo1. If you have a local maven repository and your developers have mirrors setup in their settings.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
            <id>artifactory</id>
            <mirrorOf>*</mirrorOf>
            <url>http://artifactory.cdinteractive.com:8080/artifactory/repo</url>
            <name>Artifactory</name>
        </mirror>
    </mirrors>
</settings>

March 3rd, 2014

Posted In: Maven

Tags: , , , , ,

One Comment

mvn versions:display-dependency-updates

The output is useful, but you still need to interpret it. In this case, there is a beta library that is suggested. Not.

INFO] ------------------------------------------------------------------------
[INFO] Building igs 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.1:display-dependency-updates (default-cli) @ igs ---
[INFO] The following dependencies in Dependency Management have newer versions:
[INFO]   commons-collections:commons-collections ............ 3.2.1 -> 20040616
[INFO]   org.hibernate:hibernate-validator ......... 5.0.1.Final -> 5.1.0.Beta1
[INFO]
[INFO]

In this case, a library with a version number that doesn’t follow the normal version patters is mistakenly noted as a newer version.

[INFO] ------------------------------------------------------------------------
[INFO] Building assets 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.1:display-dependency-updates (default-cli) @ assets ---
[INFO] The following dependencies in Dependency Management have newer versions:
[INFO]   commons-collections:commons-collections ............ 3.2.1 -> 20040616
[INFO]   org.hibernate:hibernate-validator ......... 5.0.1.Final -> 5.1.0.Beta1
[INFO]
[INFO]

February 7th, 2014

Posted In: Maven

Tags: , , , ,

Leave a Comment

LinkedIn Auto Publish Powered By : XYZScripts.com