Not able to download jar using maven dependency and getting error No class found
See original GitHub issueHi, I am trying to use this library. For this, I have included dependency in my maven project.
<dependency>
<groupId>com.cdancy</groupId>
<artifactId>jenkins-rest</artifactId>
<version>0.0.14</version>
</dependency>
However, I was getting missing artifact error. So I just saw in .m2 folder and found there is no jar. Only 4 other files were there. So I downloaded JAR manually and added in class path. Now, I added basic code that is given in READ.md. Then I am getting following error :
Exception in thread "main" java.lang.NoClassDefFoundError: org/jclouds/apis/ApiMetadata
at com.ks.App.main(App.java:13)
Caused by: java.lang.ClassNotFoundException: org.jclouds.apis.ApiMetadata
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
NoClassDefFoundError on Maven dependency - Stack Overflow
By default, Maven doesn't bundle dependencies in the JAR file it builds, and you're not providing them on the classpath when you're trying ......
Read more >Geotools with maven: java.lang.noclassdeffounderror while ...
I have to notice that during the build there was error messages about all GTs jars: [WARNING] The POM for org.geotools:gt-shapefile:jar:sources: ...
Read more >Maven Getting Started Guide
The first time you execute this (or any other) command, Maven will need to download all the plugins and related dependencies it needs...
Read more >3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile...
Read more >Spring Boot, Maven and Eclipse Errors and TroubleShooting ...
Q : How can you always exclude a specific jar using Maven Exclusions? ... ClassNotFoundException; Q : Why are we not using Gradle?...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shubhashi88 according to the maven error log, the groupId of the jenkins-rest dependency seems wrong: you are using
jenkins-rest
and the README states to usecom.cdancy
I suggest you to declare the jenkins-rest dependency in your pom.xml file as in the following@shubhashi88 according to your maven logs, maven is unable to find the lib, probably because your local maven installation is not aware of the JCenter repository (or you use a corporate repository manager not aware of it)
Please add the JCenter repository to your pom.xml or local settings.xml with something like in the following Resources: https://maven.apache.org/guides/introduction/introduction-to-repositories.html