Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Maven configuration  RSS feed

 
Shrikant Kulkarni
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have downloaded and installed maven1.0.2. I put maven1.0.2/lib in the classpath and maven1.0.2/bin in the path of the system. But when i run the maven from console where my project.xml is present, i got errors like
"Attempting to download servletapi-2.3.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.3.jar]: java.net.ConnectException: Connection refused: connect
WARNING: Failed to download servletapi-2.3.jar."

Like this some errors are coming. Basically these are the jar files(servletapi-2.3.jar) on which the application is dependent and which are mentioned in project.xml as a dependency.
I have also put these all these jar files in system classpath, but still the error persist.

So can any one help me in finding out the root cause of the problem.
Thanks well in advance.
Shrikant
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That problem is caused by Maven not being able to form a TCP connection to the ibiblio Maven repository. You have two options:
1) fix the network connection
2) manually get the .jar file in question from somewhere and place it into your local Maven repository
 
Shrikant Kulkarni
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lasse Koskela,
I have installed Maven in C:\Program Files\Apache Software Foundation\Maven 1.0.2 directory structure. As per your second suggestion, where i should I place the Jar files which it is looking for(Ex: servletapi-2.3.jar)?
It should be in lib/bin or in some other directory inside Maven_Home?

Pls help.

Shrikant
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Ant, Maven and Other Build Tools...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66255
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"shrikant ks",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
KArol Muszynski
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> As per your second suggestion, where i should I place the Jar files which it is looking for(Ex: servletapi-2.3.jar)?

It should be in the folder where the Maven Repository is. One of the installation steps is to create this repository using script: install_repo.bat REPO_FOLDER

So, you should copy servletapi-2.3.jar to REPO_FOLDER/servletapi/jars/servletapi-2.3.jar

Hint: On the http://www.ibiblio.org/maven/ You can find default directory structure for most known libraries.

Best Regards
KArol Muszynski
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!