mrstampy / Stampy

Java implementation of the STOMP 1.2 specification
67 stars 22 forks source link

Problem with Ivy #12

Open pedro-w opened 7 years ago

pedro-w commented 7 years ago

I am not an expert with Ivy but I had trouble with building a freshly checked out copy of the software. In build.xml is the target

<target name="resolve">
    <ivy:resolve file="${basedir}/ivy.xml"/>
</target>

As I understand it, ivy:resolve downloads and resolves the deps into its cache directory. The task should be ivy:retrieve which resolves and then copies the files into the project's lib directory.

david-gaarsoe commented 6 years ago

Just built successfully from source on the command line after doing all of the following. Note that the ant build files expect all dependent jars to magically show up in a "lib" subdirectory. The following gets you there:

  1. download and unzip ant
  2. download ivy, unzip, then copy ivy-2.5.0-rc1.jar to ANT_HOME/lib
  3. download maven ant task jar to ANT_HOME/lib from [here] (http://www.apache.org/dyn/closer.cgi/maven/ant-tasks/2.1.3/binaries/maven-ant-tasks-2.1.3.jar)
  4. manually

    mkdir mrstampy-Stampy-8e0618d/lib

  5. edit mrstampy-Stampy-8e0618d/build.properties adding path entry to mrstampy-Stampy-8e0618d/lib

    ivy.default.ivy.user.dir=C:/tmp/mrstampy-Stampy-8e0618d/lib

  6. set ANT_HOME environment and add ANT_HOME/bin to PATH
  7. run ant from command line: "ant"
pedro-w commented 6 years ago

Thanks, David. I have not become an expert in Ivy since Sep 2016! But as I understand it, setting ivy.default.ivy.user.dir is 'tricking' Ivy into storing its cached files in Stampy's lib directory. So it may work, but seems a bit unsatisfactory to me. Is this the normal way of doing things with Ivy?