You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2008/10/13 18:33:54 UTC

Fixed generation of thirdparty-library bundle classpath

I've fixed the generation of the thirdparty-library bundle .classpath, 
so the PDE should not hang anymore when you load it into your Eclipse 
workspace.

Here's the current scheme, which seems to work well:

- Third party JARs are placed under thirdparty-library/lib by the 
Tuscany Maven bundle plugin.

- That bundle's Manifest is generated by the plugin as well.

- The .classpath points to these JARs under lib instead of the JARs in 
the Maven repos.

- Loading that project in your workspace will allow the PDE to resolve 
all bundle imports of these third party packages.

Another option would be to generate an Eclipse update site with one 
bundle per third-party JAR and ask the developer to add that update site 
to his PDE's 'target platform', but that seems more complicated, and 
will make it more difficult to see what the third-party JARs are as they 
won't show in your Eclipse workspace.

Hope this helps.
-- 
Jean-Sebastien

Re: Fixed generation of thirdparty-library bundle classpath

Posted by Jean-Sebastien Delfino <js...@gmail.com>.
On Thu, Oct 16, 2008 at 8:47 AM, Raymond Feng <en...@gmail.com> wrote:

> Hi,
>
> I'm seeing a few issues with the different versions of the same third party
> jars pulled in.
>
> 1) Tuscany module A depends on geronimo-jta_1.1_spec-1.1.1.jar  (which is
> an OSGi bundle). The maven bundle plugin generate an Import-Package like
>   javax.transaction;version="1.1".
>
> 2) thirdparty-library pulls in geronimo-jta_1.1_spec-1.1.1.jar and
> geronimo-jta_1.0.1B_spec-1.1.jar. It produces an Export-Package like:
>   javax.transaction;version="1.1", javax.transaction;version="1.0" (I'm not
> sure if it's valid to have one bundle exports two different versions of the
> same package)
>
> This causes OSGi dependency resolution errors.
>
> Thanks,
> Raymond
>
>
I can think of two ways to handle this case:
a) pick one version and stick to it, that's what we've done until now in our
distros
b) make these jars individual bundles and change thirdparty-library to an
Eclipse updatesite (and point your PDE to it)

-- 
Jean-Sebastien

Re: Fixed generation of thirdparty-library bundle classpath

Posted by Raymond Feng <en...@gmail.com>.
Hi,

I'm seeing a few issues with the different versions of the same third party 
jars pulled in.

1) Tuscany module A depends on geronimo-jta_1.1_spec-1.1.1.jar  (which is an 
OSGi bundle). The maven bundle plugin generate an Import-Package like
    javax.transaction;version="1.1".

2) thirdparty-library pulls in geronimo-jta_1.1_spec-1.1.1.jar and 
geronimo-jta_1.0.1B_spec-1.1.jar. It produces an Export-Package like:
    javax.transaction;version="1.1", javax.transaction;version="1.0" (I'm 
not sure if it's valid to have one bundle exports two different versions of 
the same package)

This causes OSGi dependency resolution errors.

Thanks,
Raymond

--------------------------------------------------
From: "Jean-Sebastien Delfino" <js...@apache.org>
Sent: Monday, October 13, 2008 9:33 AM
To: <de...@tuscany.apache.org>
Subject: Fixed generation of thirdparty-library bundle classpath

> I've fixed the generation of the thirdparty-library bundle .classpath, so 
> the PDE should not hang anymore when you load it into your Eclipse 
> workspace.
>
> Here's the current scheme, which seems to work well:
>
> - Third party JARs are placed under thirdparty-library/lib by the Tuscany 
> Maven bundle plugin.
>
> - That bundle's Manifest is generated by the plugin as well.
>
> - The .classpath points to these JARs under lib instead of the JARs in the 
> Maven repos.
>
> - Loading that project in your workspace will allow the PDE to resolve all 
> bundle imports of these third party packages.
>
> Another option would be to generate an Eclipse update site with one bundle 
> per third-party JAR and ask the developer to add that update site to his 
> PDE's 'target platform', but that seems more complicated, and will make it 
> more difficult to see what the third-party JARs are as they won't show in 
> your Eclipse workspace.
>
> Hope this helps.
> -- 
> Jean-Sebastien