Hi Ivanhoe,
Yep you need to include the equinox common jar in the classpath when
you define the ivy task - I agree this is not that great and I've
added an issue for this to tidy this up (FELIX-1509). The reason for
this dependency is that the eclipse IPath object provides a really
useful way of working with file paths and the IProgressMonitor
provides a useful way to give user feedback. It seems daft to reinvent
the wheel for no reason but my understanding is licensing restrictions
prevent me embedding the eclipse classes in the apache binaries.
In fact for the IPath object I intend to replace this in the medium
term FELIX-1814 with a class that has understanding of the BND path
syntax - i.e. support for {path} and alias=path/to/file. If this is
done then the IProgressMonitor is not that big a deal to reinvent so
this will likely go at the same time.
To see how this is done you could look at the build.xml file here [1]
in essence there is a setup phase in the build that bootstraps the ant
build with the ivy, sigil, eclipse dependencies.
<target name="download-deps" unless="offline">
<property name="deps.loaded" value="true"/>
<mkdir dir="${sigil.jar.dir}"/>
...
<get src="
http://download.eclipse.org/releases/${equinox.release}/plugins/org.eclipse.equinox.common_${equinox.install.version}.jar"
dest="${equinox.common.jar.file}" usetimestamp="true" verbose="true"/>
...
</target>
...
<target name="init-sigil" depends="check-sigil" unless="sigil.loaded">
<antcall target="download-deps" />
<path id="sigil.lib.path">
<fileset dir="${sigil.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="sigil.lib.path"/>
...
</target>
Clear as mud? ;)
Regards,
Dave
[1] http://chronological-thought.googlecode.com/svn/trunk/starwars/build.xml
On Wed, Dec 16, 2009 at 5:34 PM, Ivanhoe Abrahams
<[email protected]> wrote:
> Hi
>
> I have downloaded sigil ivy plugin and have followed the installation/setup
> to the point where I want to run the ant build.
> However I get the below exception when I build. I know that I need to
> include the equinox common jar in the classpath but I cant figure out how to
> do this.
>
> Any help will be a ppreciated
> Thanx Ivanhoe
>
>
> <EXCEPTION SNIPPET>
> Buildfile: build.xml
>
> ivy-taskdefs:
> [echo] Loading Ivy ...
>
> load-ivy:
>
> buildlist:
> [ivy:buildlist] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/::
> [ivy:buildlist] :: loading settings :: file =
> C:\osgi\nebula\settings\ivysettings.xml
>
> BUILD FAILED
> java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IPath
> at
> org.apache.felix.sigil.config.BldProject.<init>(BldProject.java:80)
> at org.apache.felix.sigil.config.BldFactory.load(BldFactory.java:80)
> at
> org.apache.felix.sigil.config.BldFactory.getProject(BldFactory.java:35)
> </EXCEPTION SNIPPET>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]