Question

I'm having an issue getting an ant/ivy build and eclipse/ivyde build to work well with each other.

Here's my setup, where 'git_root' is different for each developer:

/{git_root} |
             -/projectA
             -/B  |
                   - projectB1
                   - projectB2
             -ivy_build |
                        - ivy_settings.xml
                        - local_repository

my ivy_settings.xml contains a FileSystem resolver that must, of course, use absolute paths.

e.g.:

<filesystem name="local">
  <ivy pattern="${repository.dir}/[module]/ivy.xml" />
  <artifact pattern="${repository.dir}/[module]/[artifact].[ext]" />
</filesystem>

so now how do I define {repository.dir} in such a way to make both ant happy and ivyde/eclipse happy?

Was it helpful?

Solution

I normally use the ivy.settings.dir property which resolves to the directory local to the ivy settings file:

<filesystem name="myrepos">
    <artifact pattern="${ivy.settings.dir}/local_repository/[organisation]/[artifact]-[revision].[ext]" />
</filesystem>

OTHER TIPS

The way I usually deal with it is using a property file to be edited by each developer. In that property file I will expect the repository.dir property to be set.

In order to do I usually check in the svn/git repo a ivysettings.local-sample.properties. This file would contain the expected properties with values to be completed.

Each developer will checkout the sample file and do a copy of it to ivysettings.local.properties. Then they edit the file to set their paths on their file system.

And in the ivysettings.xml just add:

<properties file="ivysettings.local.properties" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top