I want to have a JAR file repository on my local network so all other Eclipse users use the same JAR files in Repository for their dependencies. I don't want Maven or Ant, I just want to use Ivy to share my JAR files, how do I do this? which XML file should I use? Can't find a simple solution online.
Asked
Active
Viewed 306 times
0
-
The best way to manage a shared repository is to install something like Sonatype Nexus. The alternative is of course ivy which can build and use a repository, but which require a shared ivy settings file. For an example see: http://stackoverflow.com/questions/1200762/good-ivy-tutorial-for-local-repository/2279596#2279596 This example can be expanded to use alternative resolvers like ssh or sftp for operation over a network – Mark O'Connor Oct 26 '15 at 06:45
1 Answers
0
For start here is an example of ivy.xml file
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info
organisation="[your organization]"
module="your module[for example commons-io]"
status="integration">
</info>
<publications>
<artifact name="[your jar name]" ext="jar"/>
</publications>
Second an important step is creating an ivy.settings file.
<ivysettings>
<resolvers>
<filesystem name="public">
<ivy pattern="/path/to/my/public/rep/[organisation]/[module]/ivy-[revision].xml" />
<artifact pattern="/path/to/my/public/rep/[organisation]/[module]/[artifact]-[revision].[ext]" />
</filesystem>
</resolvers>
</ivysettings>
This is just part of the ivy.setting file and the resolver name should represent your own repository for publications and downloading jars from your local network . Read more about Adjusting ivy settings on http://ant.apache.org/ivy/history/2.1.0/tutorial/defaultconf.html . How ever ivy can't do the publish work for you ,and you will have to use ant just small build.xml file . Read on apache site http://ant.apache.org/ivy/history/2.2.0/use/publish.html
I hope it will be helpful.

Rami Loiferman
- 853
- 1
- 6
- 22