• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven Repo Location

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I have a couple of Maven repo's defined in my pom.xml as below:


I added a new dependency to Struts 2.1.7 and the build simply failed saying that it was not able to find the jar or the pom in http://maven.jahia.org/maven2/com/jhlabs/imaging/01012005 location. Why the heck is this?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even worse is that Maven does not even look into my local repository where I already have most of the jars.... Why is this behavior?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

Which jar does the following maven error refers to?



Is it the velocity 1.6.2? If yes, then I have it already in my local repo and why does Maven not look for it over there?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What the heck is this? Why would this http://repository.springsource.com/maven/bundles/release pull up an error page? Am I ages behind with Maven?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just because of this reason, I had to manually download the jars. I did so for the Struts libraries and when building my project, got the following warning:

[WARNING] The POM for org.apache.struts:struts2-core:jar:2.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.struts:struts2-tiles-plugin:jar:2.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.struts:struts2-spring-plugin:jar:2.2.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.jhlabs:imaging:jar:01012005 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

Which repo location should I add so that these jars and poms are automatically detected and downloaded? Is it the Maven central?
 
Ranch Hand
Posts: 73
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joe,
Thats one hell of a POM! So many repositories Looking at your pom, most of the jars are already in default maven repo. What I'll suggest is you remove all the repository locations from your pom first and try building. Maven will use its default repository which has a "lot" of things including struts jars in your case, and ideally should suffice all your needs. If thats not enough then add the repositories in your pom. As per the maven location, I think you know where to look. If not http://repo1.maven.org/maven2/ redirects to http://search.maven.org/#browse where you can search for struts jars. Hope this helps.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What the *?3$ is this? I'm tring to build the simplest of the Maven project which just has one dependency top Spring 3.0.5-RELEASE and it complains that it cannot find the jar?



 
Pranav Raulkar
Ranch Hand
Posts: 73
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I did some checking which and heres what I found.

In version 3, Spring no longer provides the all-in-one Spring jar! The spring.jar artifact that contained almost the entire framework is no longer provided.
You can confirm this by browsing the spring tree in maven repo http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.springframework%22
So now you'll have to specifically tell maven what part of the spring framework you need as follows -
where ${artifactId} may be any one from the artifact id column from url above ex. spring-webmvc. You'll have to list all that you use.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know that since 3.x.x, Spring jars are much modularized. But the point here is my Maven build does not even download any jars that it finds in the Maven central repository. I double checked my internet connection and it is perfectly fine.
 
Pranav Raulkar
Ranch Hand
Posts: 73
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What about proxy?
Also note that problems may even arise if you are using another repo and it requires authentication, you'll need to provide it in settings.xml in .m2 folder (local repo)
Even after this problem still persists, obvious doubts would be on pom.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not have any repo location defined in my pom.xml or in my settings xml. This really baffles me.
 
reply
    Bookmark Topic Watch Topic
  • New Topic