0

A team member has shared his project with me on bitbucket and he used maven to manage his dependencies. After cloning the repo (using mercurial) into my workspace (Eclipse) and downloading maven, m2e and all the other required set up files i was able to get all of the project libraries except for 4.

After downloading the project, i ran several mvn commands to clean, install and hopefully download these missing jars. When i ran mvn -e command i get this long error that does nothing to help. Do i have to find and download these 4 jars and put them in my maven repo?

Command output: mvn -e

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.769s
[INFO] Finished at: Mon Apr 09 17:42:17 CDT 2012
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Dugsi_Manager: Could not resolve depen
dencies for project org.bixin.dugsi:Dugsi_Manager:war:0.1.0.BUILD-SNAPSHOT: The
following artifacts could not be resolved: org.eclipse.persistence:eclipselink:j
ar:2.2.0, org.eclipse.persistence:javax.persistence:jar:2.0.3, org.vaadin:icepus
h-gwt:jar:0.1.2, org.jqurantree:jquran:jar:1.0.0: Could not find artifact org.ec
lipse.persistence:eclipselink:jar:2.2.0 in spring-maven-release (http://maven.sp
ringframework.org/release) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

EDIT:

I just need to share my local repository with all other team members that clone my project. External jars that dont use maven have to be manually installed into my local repo, this creates a problem because i cant share my local repo? Any ideas

Warz
  • 7,386
  • 14
  • 68
  • 120
  • 1
    Ask you collegue if he has some configuration of repositories in his settings.xml file? – khmarbaise Apr 10 '12 at 18:24
  • Sounds like he manually installed some libraries into his local repository, or is using a artifactory other than Maven-Central (possibly private) that has them, which is not configured in the POM file. – Laurens Holst Apr 11 '12 at 12:56
  • @LaurensHolst You may be right, the colleague of mine mentioned only ever added the last two jars using the mvn install command to his local repository. Those two jars are external jars, if that is the case how should these jars be defined? – Warz Apr 11 '12 at 17:11

1 Answers1

0

You can either install these JARs in your local repository, or setup an own (possibly private) maven repository for you to share with your team. Sonatype provides with Nexus OSS an open-source based software to easily set up a repository (which also proxies remote ones if you like).

Stephan
  • 7,360
  • 37
  • 46
  • Would the repository be hosted on nexus or on my localhost machine. If the latter, how does this affect other team members who want to try to download dependencies when i am offline? – Warz Apr 18 '12 at 17:16
  • The nexus would need to be hostet such that every team member can access it. That way you can manage third party dependencies centrally. – Stephan Apr 18 '12 at 21:36
  • do you have an example of what the pom.xml file would look like after a nexus OSS based repo has been configured. I am very confused by this as this software comes with a Jetty server that needs to be started yet i dont how others would access the files when i am offline. Again i dont have a server ready for this type of environment, were only a small group developers. Is there another option to embed the local repo in a lib directory? – Warz Apr 18 '12 at 23:07
  • Without having a dedicated server accessible, this is not going to work. Maven is just not designed to work with external libraries not coming from one of the (various) repositories. Don't try to fight maven in this regard. In the end, you will loose. – Stephan Apr 19 '12 at 06:06