$ mvn p2:site ... [info] [JAR] jakarta.activation-1.2.1.jar [info] Resolving artifact=[javax.mail:dsn:1.4] transitive=[true] source=[false] Downloading: http://maven.aliyun.com/nexus/content/groups/public/javax/mail/dsn/1.4/dsn-1.4.pom Downloading: http://repository.ops4j.org/maven2/javax/mail/dsn/1.4/dsn-1.4.pom [WARNING] The POM for javax.mail:dsn:jar:1.4 is missing, no dependency information available Downloading: http://maven.aliyun.com/nexus/content/groups/public/javax/mail/dsn/1.4/dsn-1.4.jar Downloading: http://repository.ops4j.org/maven2/javax/mail/dsn/1.4/dsn-1.4.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:32 min [INFO] Finished at: 2022-04-28T17:17:07+08:00 [INFO] Final Memory: 24M/344M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.3.0:site (default-cli) on project external-dependencies: Execution default-cli of goal org.reficio:p2-maven-plugin:1.3.0:site failed: java.lang.RuntimeException: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact javax.mail:dsn:jar:1.4 in alimaven (http://maven.aliyun.com/nexus/content/groups/public/) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
0x01 拜师学艺
在 stackoverflow 以及 github 上找到如下方法:
1 2 3 4
Regarding to "https://stackoverflow.com/questions/53687816/dependency-javax-mailmail1-4-not-found", "javax.mail:dsn:jar:1.4" is not in maven public repo due to license restrictions. Workaround, download "javax.mail:dsn:jar:1.4" from https://www.oracle.com/technetwork/java/javamail/index-138643.html and then install it to ur local repo via: