This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse integrated with Maven - how to download libraries from global reopsitory using Eclipse IDE

 
Witold Marshal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to download some libraries (jars) from remote global repository but without adding them as dependecies to Maven Project in Eclipse.
I thought thta it is possible through Eclipse menu:
File>>Import >>Maven>>Materialize Maven Project from SCM >> Add (Maven Artifacts)
Then in artifact window I lookup for needed jar library i global repository. I choose one and hit finish. Some sha1 and pom files are downloaded to repository's folder automatically created for that project.

Next I try to install artifact:
File>>Import >>Maven>>Install or deploy an artifact to Maven reository
In the opened window I browse the pom file that was downloaded in previous step. I hit "finish". After this a jar file with appropriate name is created but it is not a jar indeed. It is wery small and winrar shows error while I'm tying to open it. It says that this is not a jar library.

Does anybody know how to do it properly?
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to deploy the true jar file, which if you don't have a pom it will create one based
on your artifactId, version etc.

Deploying the pom itself, does not magically create the jar for you.

WP
 
Witold Marshal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was expecting that Eclipse would download the necessary library jar from repository as Maven does it when it downloads dependencies. I thought that pom contains necessary information for downloading that jar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic