Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Problem with connector plug-in dependency on org.eclipse.mylyn.web.core

You are most likely running into this bug:

157375: PDE should support building against nested JARs
https://bugs.eclipse.org/bugs/show_bug.cgi?id=157375

A possible workaround that I have seen is to add the httpclient jar to your 
plug-in and specify it as an extra class path entry in the build.properties. 
The jar is only used for compiling and not needed during runtime if a 
dependency on org.eclipse.mylyn.web.core is specified in your plug-in.

It might also work to extract the org.eclipse.mylyn.web.core plug-in to avoid 
nested jars.

If you don't need the utility classes for httpclient that are provided by 
org.eclipse.mylyn.web.core you can also consider consuming httpclient from 
the org.apache.commons.httpclient Orbit bundle. For Mylyn 3.0 all 3rd party 
library dependencies are consumed from Orbit bundles which do not nest jars 
but contain class files or are unpacked (e.g. org.apache.axis) when 
installed.

Steffen


On Monday 08 September 2008, Tom Bryan (tombry) wrote:
> Let's say I have a connector plug-in, MyConnector, that needs
> org.apache.commons.httpclient.
>
> My plan:
>
> Add org.eclipse.mylyn.web.core as a required plug-in of MyConnector.
>
> Since org.eclipse.mylyn.web.core already exports
> org.apache.commons.httpclient, it seemed reasonable to use that library
> instead of adding the JAR to my own feature.
>
>
> The problem:
>
> If I try to create this plug-in dependency to the host/target
> environment's binary installation of Mylyn, MyConnector gets compile
> time errors, such as "The import org.apache cannot be resolved."
>
> I can only build MyConnector if I also check out the
> org.eclipse.mylyn.web.core project into my workspace.
>
> I'm not an expert on plug-in dependencies and build paths, so I don't
> know whether this is expected behavior.  I'm looking through the Eclipse
> help right now to see how Require-Bundle, Export-Package, and
> Bundle-Classpath are supposed to work.
>
>
> I anticipate one of three solutions:
>
> 1) Building against the binary plug-in should work, but I made a mistake
> somewhere.  Please help.  :)
>
> 2) The only way to make this work is to check out
> org.eclipse.mylyn.web.core into my workspace.  I'm trying to avoid that
> since it means that my continuous integration server will need to check
> out the Mylyn code for every build, which seems wasteful.
>
> 3) If connectors are not supposed to depend on
> org.eclipse.mylyn.web.core just to use one of the libraries it provides,
> then I could just bundle up org.apache.commons.httpclient myself.
>
>
> Thanks.
>
> --
> Tom Bryan <tombry@xxxxxxxxx>
> Cisco Systems
> _______________________________________________
> mylyn-integrators mailing list
> mylyn-integrators@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylyn-integrators



-- 
Steffen Pingel - steffenp@xxxxxx - http://steffenpingel.de


Back to the top