TAGS :Viewed: 19 - Published at: a few seconds ago

[ How to access a custom jar file from artifactory ]

When I am deploying a custom jar file i.e. name1.3.jar as maven artifact, it changes the jar name with name1.3-name1.3.jar, I really don't want to change the name, so I un-checked the "Deploy as maven artifact" and set the target path to name/1.3/name1.3.jar. Now when I try to get the dependency tag to access this jar file, it doesn't give me an option, I tried as per tutorial but it failed to find the file. Here is my dependency tag.

<dependency org="name" rev="1.3"> 
  <artifact name="name1.3.jar"/> 
</dependency>

I have only one resolver in my ivysetting.xml file, should I need one more?

<resolvers>
 <ibiblio name="main" m2compatible="true" root="http://abcd.com/libs-release />
  <filesystem name="public">
    <ivy pattern="${opt_dir}/ivys/ivy-[revision].xml" />
    <artifact pattern="${opt_dir}/[revision]/[artifact]-[revision].[ext]" />
  </filesystem>

Thanks

Answer 1


You are using an m2compatible resolver and therefore the artifact path should be maven2 compatible. This means the the both the org and artifact should be present in the path. You should deploy this artifact to name/name/1.3/name1.3.jar

The dependency should be:

<dependency org="name" name="name" rev="1.3">
  <artifact name="name" type="jar"/>
</dependency>