• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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: 6041
157
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: 6041
157
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!