• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant + Ivy: Add 3rd party stuff to shared repository

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a pre-established project that originally had all jars checked in with the project. We are in the process of retrofitting this project to make use of Ivy for dependency management. For most of the jars utilized, I was able to locate them on ibiblio, and so the public resolver works just fine. However, there are a handful of jars that I cannot locate publicly. Example: 1.) I just haven't looked hard enough, 2.) the jar is under US export control so isn't exposed on a public repository, or 3.) the jar is a patch release - the unpatched version exists, but not the patch.

Ideally, I'd like to push these extra jars to our Enterprise repository (shared). I can change the settings so that Ant will use the public repository and then fall back on the shared repository. That should allow the projects to be 3rd-party-jar clean and let Ivy do the heavy lifting.

My problem is that I don't know how to take a jar and upload it to a repository. The <ivy:publish> target looks promising but seems to be geared toward pushing artifacts up - the jars here aren't really artifacts. I'm trying to create a one-time-use thing to push the extra libs up to the repository.

Here's example:
Output:
BUILD FAILED
impossible to publish artifacts for javax.resource#connector;working@jbennett: java.lang.IllegalStateException: bad
ivy file for javax.resource#connector;working@jbennett: C:\MyWorkspace\MyProject\thirdparty\lib\connector-1_5.jar: java.text.ParseException: [[Fatal Error
] connector-1_5.jar:1:1: Content is not allowed in prolog. in file:/C:/MyWorkspace/MyProject/thirdparty/lib/connector-1_5.jar
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a similar issue to yours as I am migrating builds from Ant to Ant and Ivy. I solved it by creating an internal centralized Maven Repository using Artifactory (www.jfrog.org) and importing all of the jar files that are needed by my application in one place. Another Maven repository to consider is Nexus, http://nexus.sonatype.org/.

Using an internal centralized Maven repository gives me 2 benefits, speed of downloading jar files and control of what products and versions the other developers can use. I removed the external links from the ivysettings.xml file. If you still require external public access, Artifactory provides proxies and caching of external Maven repositories. I used the code on Peter Pilgrim's site to speed up the population of the internal repository, http://www.jroller.com/peter_pilgrim/entry/building_an_enterprise_repository_with.

You may be able to use some of his work to help build your internal Ivy repository.
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic