0

I am running Ivy as a standalone (therefore, no Ant). I need to override the property for the directory in which Ivy expect to find the produced artifacts. I ran Ivy with -debug and saw it has the following property ivy.distrib.dir=${ivy.project.dir}/distrib. I tried passing in -Divy.distrib.dir=target as well as -args -Divy.distrib.dir=target, but none of that worked. I've also tried overriding it in both the ivysettings.xml and the ivy.xml. Clearly, there must be a way to do it...?

carlspring
  • 31,231
  • 29
  • 115
  • 197
  • possible duplicate of [How do I get Ivy to copy the dependencies to the lib directory when using it from the command line?](http://stackoverflow.com/questions/3256273/how-do-i-get-ivy-to-copy-the-dependencies-to-the-lib-directory-when-using-it-fro) – Mark O'Connor Jan 29 '13 at 19:55
  • This is absolutely not the case. Please, do not mark it as closed. – carlspring Jan 29 '13 at 20:15
  • I have an artifact produced by another tool and placed under the `target` directory. I want Ivy to look there when looking for artifacts to publish. – carlspring Jan 29 '13 at 20:17
  • You never stated that you were using ivy to publish artifacts.... In that case check this answer for an example: http://stackoverflow.com/questions/1200762/good-ivy-tutorial-for-local-repository/2279596#2279596 – Mark O'Connor Jan 29 '13 at 20:29
  • Oddly enough, that was what I was following. However, I am afraid you have not read my question in full -- I have the produced artifacts placed under the `target` directory. Ivy is looking for them in `distrib/jars`. I would like to override this location. Any advice...? – carlspring Jan 29 '13 at 21:33
  • 1
    Use the "publishpattern" command-line parameter to specify the location of the artifacts. This is combined with the "publications" section of the ivy file to determine what is published by the module. (For the record, I did read your question and still have no idea what you're trying to do with the "ivy.distrib.dir" property) – Mark O'Connor Jan 29 '13 at 23:15
  • Thanks, that's what I needed. It did not become immediately clear from the example you showed, as it was pointing to a location under `src` which is not really the place one would expect to be finding the binaries. – carlspring Jan 30 '13 at 09:41

1 Answers1

2

Use the "publishpattern" command-line parameter to specify the location of the artifacts. This is combined with the "publications" section of the ivy file to determine what is published by the module.

See the following answer for a working example:

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185