how can I tell ant to find Ivy's jar in my own lib? ant just kept looking at it's home folder even when I've explicitly told it to find the jar somewhere else.
相关问题
- How can I have my ant task pass or fail based on t
- Ant inheriting Maven properties
- How can I zip multiple folders individually with a
- Class in jar not found at runtime, but was used to
- Regex to select last line in a multi-line string
相关文章
- Passing command line arguments to Java via ant bui
- ANT - Could not load a dependent class com/jcraft/
- How to set up an IntelliJ Idea Scala project to re
- library resolve to a path with no project.properti
- ant file that depends on another ant file
- android-sdk/tools/ant/build.xml:698: null returned
- ant jar's mainclass
- Integrate Ant builder into Eclipse: Error “Variabl
I would recommend removing the ivy jar from the ANT home directory. (For some very odd reason it's not normally packaged with ANT).
Instead I recommend including a special task to ensure ivy is installed.
Analysis
The ANT manual outlines the order in which jars a loaded by ANT at startup.
This will always happen and unfortunately it won't matter what you do inside your build file.....
Jars in the ANT_HOME/lib
In my opinion, putting jars in the ANT_HOME effectively creates a bespoke installation of ANT. It makes your projects less portable across machines, and the customizations are frequently forgotten and undocumented.
So if you have control over the build server I would recommend removing any ANT tasks your find here.
Jars in the ${user.home}/.ant/lib
Placing jars here is less objectionable for the following reasons
You can place Ivy binaries in some folder inside you project folder. For example, in my case, it's etc/build/. I put where ivy.jar and jsch.jar.
After that provide the correct namespace in project defenfition and load Ivy.