OK, I should better have RTFM before posting: The solution is in section
"Execution environment" (see
http://ant.apache.org/ivy/history/latest-milestone/osgi/osgi-mapping.html)
After adding the <exclude> tags (see below) everything worked fine.
<dependencies>
<!-- example of a dependency that we can't declare in the
MANIFEST.MF because we want it to be embedded -->
<!--dependency osgi="bundle" org=""
module="org.apache.commons.httpcore" rev="4.1.0"
conf="embedded->default" /-->
<!-- Ivy-Osgi doesn't understand bundle fragment -->
<dependency org="bundle" name="org.eclipse.swt.win32.win32.x86"
rev="3.+" conf="win32->default" />
<dependency org="bundle"
name="org.eclipse.swt.cocoa.macosx.x86_64" rev="3.+"
conf="macos->default" />
<dependency org="bundle" name="org.eclipse.swt.gtk.linux.x86"
rev="3.+" conf="linux->default" />
<!-- exclude execution environment (Java runtime) -->
<exclude org="bundle" module="system.bundle"/>
<exclude org="package" module="javax.crypto"/>
<exclude org="package" module="javax.crypto.spec"/>
<exclude org="package" module="javax.security.auth"/>
<exclude org="package" module="javax.security.auth.callback"/>
<exclude org="package" module="javax.security.auth.login"/>
<exclude org="package" module="javax.security.auth.spi"/>
<exclude org="package" module="org.w3c.dom.events"/>
</dependencies>
Am 21.10.2013 11:00, schrieb Riccardo Foschia:
> Hi,
>
> I'm trying to use Ivy 2.3.0 OSGi support to develop an Eclipse plugin
> and followed exactly the instructions of the sample "Building an Eclipse
> plugin" from the Ivy docs.
>
> When I'm calling ant task ivy:resolve the obr resolver correctly
> resolves recursively a lot of bundles target platform (that acts a obr
> repository like in the Ivy docs), but resolve fails with the following
> output:
>
> ....
> bundle#org.eclipse.equinox.p2.metadata;2.1.0.v20120430-2001 in eclipse
> [ivy:resolve] [2.1.0.v20120430-2001]
> bundle#org.eclipse.equinox.p2.metadata;[2.0.0,3.0.0)
> [ivy:resolve] :: resolution report :: resolve 7063ms :: artifacts dl 140ms
> ---------------------------------------------------------------------
> | | modules || artifacts |
> | conf | number| search|dwnlded|evicted|| number|dwnlded|
> ---------------------------------------------------------------------
> | compile | 164 | 156 | 0 | 0 || 65 | 0 |
> ---------------------------------------------------------------------
> [ivy:resolve] :: problems summary ::
> [ivy:resolve] :::: WARNINGS
> [ivy:resolve] module not found: bundle#system.bundle;[0,)
> [ivy:resolve] ==== eclipse: tried
> [ivy:resolve] module not found: package#javax.crypto;[0,)
> [ivy:resolve] ==== eclipse: tried
> [ivy:resolve] module not found: package#javax.crypto.spec;[0,)
> [ivy:resolve] ==== eclipse: tried
> [ivy:resolve] module not found:
> package#javax.security.auth;[0,)
> [ivy:resolve] ==== eclipse: tried
> [ivy:resolve] module not found:
> package#javax.security.auth.callback;[0,)
> [ivy:resolve] ==== eclipse: tried
> [ivy:resolve] module not found:
> package#javax.security.auth.login;[0,)
> [ivy:resolve] ==== eclipse: tried
> [ivy:resolve] module not found:
> package#javax.security.auth.spi;[0,)
> [ivy:resolve] ==== eclipse: tried
> [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
> [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] :: bundle#system.bundle;[0,): not found
> [ivy:resolve] :: package#org.w3c.dom.events;[3.0.0,4.0.0):
> java.lang.NullPointerException at
> org.apache.ivy.osgi.repo.AbstractOSGiResolver.findResource(AbstractOSGiResolver.java:287)
> [ivy:resolve] :: package#javax.crypto;[0,): not found
> [ivy:resolve] :: package#javax.crypto.spec;[0,): not found
> [ivy:resolve] :: package#javax.security.auth;[0,): not found
> [ivy:resolve] :: package#javax.security.auth.callback;[0,):
> not found
> [ivy:resolve] :: package#javax.security.auth.login;[0,): not
> found
> [ivy:resolve] :: package#javax.security.auth.spi;[0,): not
> found
> [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve]
> [ivy:resolve]
> [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>
> What am I doing wrong? Do I really need an OSGi bundle with the Java
> runtime in my obr repository?
>
>
> Greetings,
> Riccardo
>
--
META-LEVEL Software AG
Saarbrücker Str. 51
66130 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: [email protected]
Web: www.meta-level.de
Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 166667
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats: Reinhard Kuhn