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

You would think that this would be terribly easy, but it isn’t. It took several attempts before I figured out what they wanted. Too bad their contextual help doesn’t give you the details.

Select the “Deploy” tab from the top, then select the “Artifacts Bundle” tab from the left. Choose the file you want, then hit deploy.

The tricky part is that they expect very specific things from the file. In my case, I was trying to import the artifact corresponding to

<dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjtools</artifactId>
    <version>1.6.11</version>
</dependency>

What they don’t tell you is that the name of the file will be part of the groupId. So I ended up with an archive named org.zip. The contents of the archive were:
/aspectj
     /aspectjtools
          /1.6.11
               aspectjtools-1.6.11.jar
               aspectjtools-1.6.11.jar.sha1
               aspectjtools-1.6.11.pom
               aspectjtools-1.6.11.pom.sha1

In hindsight, I might have been able to name the archive org.aspectj.aspectjtools, then inside I could have multiple version directories, each containing their respective artifacts.

January 17th, 2013

Posted In: Maven

Tags: , , , ,

Leave a Comment

LinkedIn Auto Publish Powered By : XYZScripts.com