Frequently Asked Questions

How can i configure a new repository?

Reporitories are defined in the resolvers node of an ivysettings file.
Each dependency resolver is identified by its name, given as an attribute.
The child tag used for the dependency resolver must be equal to a name of a dependency resolver type (either built-in or added with the typedef tag).

Ivy comes with a set of built-in dependency resolvers able to answer to the most common needs like (non exhaustive) : Example
<resolvers>
<filesystem name="1" cache="cache-1">
<ivy pattern="${ivy.settings.dir}/1/[organisation]/[module]/ivys/ivy-[revision].xml"/>
<artifact pattern="${ivy.settings.dir}/1/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
<chain name="chain1">
<resolver ref="1"/>
<ivyrep name="ivyrep"/>
</chain>
<chain name="chain2" returnFirst="true" dual="true">
<resolver ref="1"/>
<ibiblio name="ibiblio"/>
</chain>
</resolvers>
Defines a filesystem resolver, named '1', which is then used in two chains, the first which seconds the filesystem resolver with an ivyrep resolver, and second which seconds the filesystem resolver with an ibiblio resolver, and which returns the first module found, and uses the whole chain to download artifacts (see corresponding resolvers documentation for details about them). Resolver 1 will use a cache named 'cache-1' which should have been defined under the caches element.
You can find more details here

Does EasyAnt support Maven repositories?

Yes you can use Maven-like repositories by configuring an ibiblio resolver.
<ibiblio name="my-maven-repository" m2compatible="true"/>

How can i reuse my maven local repository

If you find yourself wanting to reuse artifacts that you already have locally in your Maven2 repository, then you can add this line to your ivysettings :
<ibiblio name="maven-local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>

Can i publish to a maven repository?

No, unfortunately this feature will be available in 0.8 release.

How can i disable a module?

You can disable a module by setting a magic property composed with the following syntax like : Example :
Suppose we have a plugin declared like
<plugin org="mycompany" module="foobar" rev="0.1" as="myalias"/>
You can disable the plugin by setting one of the following property to true:
> easyant -Dskip.mycompany#foobar;0.1=true
or
> easyant -Dskip.myalias=true

How can i generate publish a javadoc.jar ?

To generate the javadoc you have to declare the plugin in your module.ivy file.
  <ea:plugin module="javadoc" rev="0.1" as="javadoc" />
This plugin provides a few targets related to the javadoc.
Then you can ask easyant that you want the javadoc to be part of your project lifecycle. For example you may want to generate and publish a javadoc.jar.
This can be done by using bindtarget like this :
  <ea:bindtarget target="javadoc:package" tophase="package" />
What happens behind ? The javadoc:package target is attached to package phase. The jar is produced, if we're in a publication context (when calling publish-local, publish-shared, release) the right informations are generated on the published module.ivy file.

I have an existing ant distribution installed can i reused it ?

Since EasyAnt 0.8, we use an ant distribution shipped with easyant by default.

If you want to reuse your own ant installation you will add the "--use-custom-ant-" argument on the command line.
  > easyant --use-custom-ant
Then, if ANT_HOME environment variable is correctly set or if you have a standard ant installation, easyant will use it.

If your ant distribution is 1.8.0 or higher, you can reuse it.
Otherwise you can't because EasyAnt uses features introduced in ant 1.8 (like include / extentionOf).

I have files in my $HOME/.ant/lib directory that seems to be in conflict with easyant. How can i avoid this ?

You just need to use the "-nouserlib" option
exemple :
  > easyant -nouserlib

Why does EasyAnt uses two ivy instance?

As you should know EasyAnt uses ivy as a dependency manager.
EasyAnt uses two ivy instance :
  1. used to resolve/retrieve EasyAnt modules (which can be buildtypes/ plugins or skeletons) dependencies
  2. used to resolve/retrieve project dependencies
There is a strong separation of context, this means that plugins dependencies will not be polluting your project.
Both instance are configurable.