Just created one simple Maven project to test the log4j, simply add one dependency called log4j. the run mvn dependency:resolve, get an error that might brings you here.
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project log4jexample: Could not resolve dependencies for project com.androidyou.test:log4jexample:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.sun.jdmk:jmxtools:jar:1.2.1, com.sun.jmx:jmxri:jar:1.2.1: 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-repositor y.dev.java.net/nonav/repository) of type legacy using the available factories WagonRepositoryConnectorFactory -> [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. |
Pom.xml
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmEBazrh0hHr0giP03KiKWv-KjedNaeErWyaS_eeSyP2iQUkuxZvyuEVhet96ZYh7UoG2GVURLa9nfWCp4F5-fUPZlBo92VJa1mFyER6_N9bPvgFKSMtX7Flqkjmi9byHdkHWqJGbfEgY/?imgmax=800)
And the fix is easy, change the version 1.2.15->1.2.16 or 17
![image image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKCDJKbePrMyoBKEXidgztuu7QrB9H9bu-yodNaRjAXnsBPhhIZPuFYXuULeRL2fCL4OgXl1cn-Ah0QEr6bBL-1h0FNXV9NWdygHcl72e5hGaxaPwtup9OsdKtr0YuLOaQ3WjLgXfhSCU/?imgmax=800)
No comments:
Post a Comment