Frequently Asked Questions
I have a problem with ivy, how can I get more information about what it is doing ?
The first thing to do for trouble shooting ivy is to increase your ant message level. Use -verbose to have verbose messages, and -debug or -d to have debug messages.Ivy seems to fail connecting to ibiblio...
First, check if the ibiblio site is ok with your favorite browser. If the site is ok, maybe it's a problem of proxy configuration. Set your ANT_OPTS environment variable to configure your proxy if you have one. For instance:set ANT_OPTS=-Dhttp.proxyHost=monproxy -Dhttp.proxyPort=3128If it still doesn't work, maybe it's your dependency file which is not ok. Check if the module name you depend on is actually a name of directory under www.ibiblio.org/maven/. If this is the case, check if the jar with a name like [module]-[revision].jar is present under the jars directory of this module on ibiblio. For instance: www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.jar
If this is the case, check your ivy configuration to see if you actually use the ibiblio resolver.
Finally, you can check if the files were not downloaded but corrupted (Ivy has no md5 checking for the moment) by checking your lib directory and opening the jars if any with an unzip program.
If you still have problems post on the forum mentioning your OS, your version of ant, your version of ivy, your configuration file and your ivy file.
Ivy beginners questions
What if I do not want to put my library files in the lib directory ?
No problem, you just have to set an ant property:<property name="ivy.lib.dir" value="pathtomylibdir"/>
What if I do not want the revision of the files I retrieve to appear in the file name ?
A typical question for people using an IDE like eclipse and often changing dependency revision: it's a bit boring to change your IDE project just to tell him to use comp-build2596.jar instead of comp-build2595.jar, when you have already changed your ivy file (and even if you haven't changed it, if you use the continuous integration feature !). No problem, you have a total control on the files retrieved using the pattern attribute in the retrieve task:Here is the default pattern:
<ivy:retrieve pattern="${ivy.lib.dir}/[artifact]-[revision].[type]"/>
And here is one which do not suffix file name with dependency revision:
<ivy:retrieve pattern="${ivy.lib.dir}/[artifact].[type]"/>
And one which makes your lib directory seem like the ibiblio repository:
<ivy:retrieve pattern="${ivy.lib.dir}/[module]/[type]s/[artifact]-[revision].[type]"/>
Not too difficult, and really flexible, isn't it ? And check the retrieve task
reference documentation to learn more about it...
What if I do not find the component I depend on in the maven ibiblio repository, or if i cannot access it ?
The maven ibiblio repository is interesting to use because it exists, but it have some limitations, which might make you consider using a different repository for retrieving your dependencies.No problem, ivy proposes other way to resolve your dependencies. For the moment, here are the possibilities:
- the maven ibiblio repository
- a central file based repository (using OS file sharing mechanism)
- any url based repository (http, ftp, ...)
- any repository for which you are able to write a DependencyResolver
- any combination of them
The comments are owned by the poster. We aren't responsible for their content.
| Poster | Thread |
|---|





