Friday, June 20, 2014

Resolving log4j 1.2.15 dependencies in Maven

Recently I was configuring log4j 1.2.15 in Maven and I found it weird when Maven complaining this in my pom.xml.
ArtifactTransferException: Failure to transfer com.sun.jdmk:jmxtools:jar:1.2.1 from https://maven-repository.dev.java.net/nonav/repository was cached in the local repository, resolution will not be reattempted until the update interval of java.net has elapsed or updates are forced. Original error: Could not transfer artifact com.sun.jdmk:jmxtools:jar:1.2.1 from/to java.net (https://maven-repository.dev.java.net/nonav/repository): No connector available to access repository java.net (https://maven-repository.dev.java.net/nonav/repository) of type legacy using the available factories AsyncRepositoryConnectorFactory, WagonRepositoryConnectorFactory
ArtifactTransferException: Failure to transfer com.sun.jmx:jmxri:jar:1.2.1 from https://maven-repository.dev.java.net/nonav/repository was cached in the local repository, resolution will not be reattempted until the update interval of java.net has elapsed or updates are forced. Original error: Could not transfer artifact com.sun.jmx:jmxri:jar:1.2.1 from/to java.net (https://maven-repository.dev.java.net/nonav/repository): No connector available to access repository java.net (https://maven-repository.dev.java.net/nonav/repository) of type legacy using the available factories AsyncRepositoryConnectorFactory, WagonRepositoryConnectorFactory
ArtifactTransferException: Failure to transfer javax.jms:jms:jar:1.1 from https://maven-repository.dev.java.net/nonav/repository was cached in the local repository, resolution will not be reattempted until the update interval of java.net has elapsed or updates are forced. Original error: Could not transfer artifact javax.jms:jms:jar:1.1 from/to java.net (https://maven-repository.dev.java.net/nonav/repository): No connector available to access repository java.net (https://maven-repository.dev.java.net/nonav/repository) of type legacy using the available factories AsyncRepositoryConnectorFactory, WagonRepositoryConnectorFactory
Missing artifact com.sun.jdmk:jmxtools:jar:1.2.1
Missing artifact com.sun.jmx:jmxri:jar:1.2.1
Missing artifact javax.jms:jms:jar:1.1
Googling around found out that log4j is having dependencies on jmxri, jmxtools, and jms. Unfortunately there are some licensing issue from SUN that I must exclude those dependencies when retrieving log4j from Maven. This is how things get done in my pom.xml.
        
         log4j
         log4j
         1.2.15
         
          
           com.sun.jdmk
           jmxtools
       
       
               javax.jms
               jms
       
       
        com.sun.jmx
           jmxri
       
         
        

No comments: