0

We have a corporate library used by several of our products that is distributed using our Artifactory server and Ivy in Eclipse. The library is in active development.

In the past (before Ivy), we just added the library project from Eclipse workspace into the product's build path in Eclipse. That was great because we could update the library and we could immediately try it on our local machines. We also saw if there are any problems and so on.

The problem now is, some people complained that Eclipse sometimes uses the .jar file from Ivy instead of our included library project in the build path.

Is there a way to tell Ivy (or Eclipse) that X.jar is actually project X in workspace? And more importantly, that it should use the workspace project instead of jar for build? Or what should we do in such situation?

Miroslav
  • 444
  • 1
  • 7
  • 21

1 Answers1

0

First of all I would recommend using a Maven repository to manage all shared dependencies. There are several good repository managers you could use: Nexus, Artifactory or Archiva.

In your ivy file you could then use a dynamic revision number to pull down the latest version of the shared dependency:

<dependency org="my.corporate" name="library" rev="latest.integration"/>

Finally, copying files around to local workspaces is far too error prone, but if you're deadset in doing it that way take a look at the following answer for details on how to pull libraries from a local directory

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • I guess sometimes you should change your templates, @mark-oconnor :) Here it clearly broke, TS already uses Artifactory. – JBaruch Sep 23 '15 at 18:30
  • @JBaruch Ahhh, yes I missed the mention of Artifactory... I was distracted by the copying of jars between Eclipse workspaces, which doesn't make sense to me if a Maven repo is available. – Mark O'Connor Sep 24 '15 at 01:23