Maven failed to resolve dependencies - javax.activation

两盒软妹~` 提交于 2019-12-01 16:46:40

The artifact you need is javax.activation:activation:jar:1.0.2 (pay attention to the jar part), while the artifact you have in your repo is javax.activation:activation:pom:1.0.2. Either place a jar one into your repo or add <classifier>pom</classifier> to your <dependency>.

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

Add dependency to your pop.xml file

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!