• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Maven Project is not downloading dependent Jar from pom.xml

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to learn Maven Project by writing basic program.
I have added slf4j as dependency in the pom.xml. But when i give mvn install or mvn compile in the command line, it is not even trying to download the jar from repository and throws class not found exception.
Not sure what is the mistake im doing, please throw some light..




 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That dependency looks right. Can you run Maven in debug mode (-X -e flags) and show the output?

Note that a "class not found" error is an actual runtime error. You are getting an actual missing dependency error.

Also note that the URL property is meant to be the URL for your project. It's optional but if you are using it, it wouldn't be the Maven URL.
 
murali jackson
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:That dependency looks right. Can you run Maven in debug mode (-X -e flags) and show the output?

Note that a "class not found" error is an actual runtime error. You are getting an actual missing dependency error.

Also note that the URL property is meant to be the URL for your project. It's optional but if you are using it, it wouldn't be the Maven URL.




Hi Jeanne,

Thanks for the advise ...

As you said  the URL is optional and I dont need that now.
I have ran the compile in debug mode, please find the output below.





 
Jeanne Boyarsky
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

murali jackson wrote:I have ran the compile in debug mode, please find the output below.


What do you mean by "running the compile"?

Have you tried running mvn clean install in debug mode? That's where it would show the attempted (or failed attempted) download of the dependency.
 
Ranch Hand
Posts: 570
3
Android Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just give it a try

 
murali jackson
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:

murali jackson wrote:I have ran the compile in debug mode, please find the output below.


What do you mean by "running the compile"?

Have you tried running mvn clean install in debug mode? That's where it would show the attempted (or failed attempted) download of the dependency.



Hi Jeanne,

Now its working, I don't know for sure what mistake I did before. Downloaded Maven again and ran the same command now its working..

Thanks very much for assisting me on this ...


 
murali jackson
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

John Joe wrote:Just give it a try



Its working now John I have posted the status in the above thread.
Thanks !!!
 
Jeanne Boyarsky
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad to hear it is working now. I suspect your settings.xml got corrupted if a reinstall fixed the problem.
 
murali jackson
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Glad to hear it is working now. I suspect your settings.xml got corrupted if a reinstall fixed the problem.



Ok Jeane ..
 
grapes are vegan food pellets. Eat this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic