Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Unable to resolve Artifactory dependency

 
Ranch Hand
Posts: 67
1
Spring Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just set up an Artifactory instance on my local machine and deployed a jar to the libs-release repository. I have used the "Set me up" feature within Artifactory to generate my .settings.xml in /home/.m2/. However when I declare the dependency in a projects pom.xml, it is unable to resolve.

.settings.xml



dependency declaration in project pom.xml



I have confirmed that the deployed resource is located at`libs-release-local/com/zeroalpha/struts/struts-el/1.3.8/struts-el-1.3.8.jar`

The error in Eclipse says `Missing artifact com.zeroalpha.struts:struts-el:jar:1.3.8`

I have tried moving the repositories element from the .settings.xml to my own projects pom.xml, but that doesn't work either. Please advise.
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haven't used Artifactory -- sounds like a cool technology! -- but this confuses me: you have a repository setup in the .settings.xml like this:

But your jar is in

   libs-release-local/com/zeroalpha/struts/struts-el/1.3.8/struts-el-1.3.8.jar

So where did the "-local" come from?
 
Zahro Alfelpha
Ranch Hand
Posts: 67
1
Spring Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:where did the "-local" come from?



In Artifactory configuration, you can select which repositories get included as part of another repository. libs-release-local is one of the default parts of libs-release.

So my solution ended up being right-clicking on the Maven Project, selecting "Maven > Update Project", and checking "Force Update of snapshots/release"
 
Knute Snortum
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great!  Thanks for posting the solution.
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
ScroogeXHTML 9.0 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/731949/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic