• Post Reply Bookmark Topic Watch Topic
  • New Topic

Maven Project is not downloading dependent Jar from pom.xml  RSS feed

 
murali jackson
Greenhorn
Posts: 20
  • 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..




 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36659
475
Eclipse IDE Java VI Editor
  • 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
Greenhorn
Posts: 20
  • 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
Marshal
Posts: 36659
475
Eclipse IDE Java VI Editor
  • 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.
 
John Joe
Ranch Hand
Posts: 314
2
Android Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just give it a try

 
murali jackson
Greenhorn
Posts: 20
  • 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
Greenhorn
Posts: 20
  • 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
Marshal
Posts: 36659
475
Eclipse IDE Java VI Editor
  • 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
Greenhorn
Posts: 20
  • 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 ..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!