Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven failed to resolve dependencies - javax.activation

Tags:

maven-2

maven

I have a working maven web application which uses many jars. Trying to add javax.activation and do a mvn clean install fails.

I get "Failed to execute goal on project xxx: Could not resolve dependencies for project javax.activation:activation:jar:1.0.2 in central (http://build02.efollett.com:8081/artifactory/libs-release)

When I check my maven repository I see the activation jar there. For example, navigating to C:\Users\me.m2\repository\javax\activation\activation\1.0.2 I see the following.

activation-1.0.2.jar.lastUpdated
activation-1.0.2.pom
activation-1.0.2.pom.sha1
activation-1.0.2.pom.tmp.sha1.tmp

My colleague is using the same settings.xml and I have compared my local pom.xml to the version in cvs. They are all the same! Any thoughts on what I am missing?

Thanks for your help.

like image 497
Carl Avatar asked Jan 03 '13 17:01

Carl


2 Answers

Add dependency to your pop.xml file

<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>

like image 89
Sachin Singh Avatar answered Sep 18 '22 10:09

Sachin Singh


Sun will not allow Maven to redistribute its binaries, including JavaMail JAR and Activation JAR. Instead, all users must install Sun binaries manually by downloading them from Sun's website and running the mvn install command.

1. Download Java Activation Framework

http://www.oracle.com/technetwork/java/javase/jaf-136260.html

and then

http://download.oracle.com/otn-pub/java/jaf/1.0.2-fcs/jaf-1_0_2-upd2.zip

2. Extract "jaf-1.0.2"

3. Run at folder "jaf-1.0.2"

mvn install:install-file -Dfile=activation.jar -DgroupId=javax.activation -DartifactId=activation -Dversion=1.0.2 -Dpackaging=jar

like image 36
pinei Avatar answered Sep 18 '22 10:09

pinei