Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Plugin binary folder cause dependent plugins export to fail
Plugin binary folder cause dependent plugins export to fail [message #328255] Tue, 20 May 2008 11:53 Go to next message
Frederic Conrotte is currently offline Frederic ConrotteFriend
Messages: 125
Registered: July 2009
Senior Member
Dear all,

I have plugin A which
- contains some classes in folder classes/
- expose them to other plugins using Export-Packages statement
- has the classes on its classpath as "class folder"

In the workspace, plugin B imports those classes and use them, no issue.

Now if I try to export plugin B as "deployable plugin", PDE fails to
build Plugin B because it cannot resolves binary classes for plugin A.

Plugin B export works only if binary classes are packaged as JAR in
plugin A.

I found a trace of the issue on news.eclipse.tools in 2001 :
http://dev.eclipse.org/newslists/news.eclipse.tools/msg03906 .html

I failed to find corresponding issue in Bugzilla, is it a known bug ?

Frederic
Re: Plugin binary folder cause dependent plugins export to fail [message #328258 is a reply to message #328255] Tue, 20 May 2008 12:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Frederic,

I wonder what your build.properties for A looks like? In particular, I
wonder if you've properly specified to include the classes folder int he
binary result.


Frederic Conrotte wrote:
> Dear all,
>
> I have plugin A which
> - contains some classes in folder classes/
> - expose them to other plugins using Export-Packages statement
> - has the classes on its classpath as "class folder"
>
> In the workspace, plugin B imports those classes and use them, no issue.
>
> Now if I try to export plugin B as "deployable plugin", PDE fails to
> build Plugin B because it cannot resolves binary classes for plugin A.
>
> Plugin B export works only if binary classes are packaged as JAR in
> plugin A.
>
> I found a trace of the issue on news.eclipse.tools in 2001 :
> http://dev.eclipse.org/newslists/news.eclipse.tools/msg03906 .html
>
> I failed to find corresponding issue in Bugzilla, is it a known bug ?
>
> Frederic
Re: Plugin binary folder cause dependent plugins export to fail [message #328259 is a reply to message #328258] Tue, 20 May 2008 12:40 Go to previous messageGo to next message
Frederic Conrotte is currently offline Frederic ConrotteFriend
Messages: 125
Registered: July 2009
Senior Member
Ed,

Thanks for your answer.

Plugin A is about exposing javax.transaction classes to other OSGi bundles.

classes are contained in javax/transaction and javax/transaction/xa folders

Basically yes plugin A list the classes folder in "bin.includes"

bin.includes = META-INF/,\
.,\
javax/

Plugin A .classpath file expose binary classes from its root:

<classpathentry exported="true" kind="lib" path=""/>

Am I missing something ?

Frederic


Ed Merks a écrit :
> Frederic,
>
> I wonder what your build.properties for A looks like? In particular, I
> wonder if you've properly specified to include the classes folder int he
> binary result.
>
>
> Frederic Conrotte wrote:
>> Dear all,
>>
>> I have plugin A which
>> - contains some classes in folder classes/
>> - expose them to other plugins using Export-Packages statement
>> - has the classes on its classpath as "class folder"
>>
>> In the workspace, plugin B imports those classes and use them, no issue.
>>
>> Now if I try to export plugin B as "deployable plugin", PDE fails to
>> build Plugin B because it cannot resolves binary classes for plugin A.
>>
>> Plugin B export works only if binary classes are packaged as JAR in
>> plugin A.
>>
>> I found a trace of the issue on news.eclipse.tools in 2001 :
>> http://dev.eclipse.org/newslists/news.eclipse.tools/msg03906 .html
>>
>> I failed to find corresponding issue in Bugzilla, is it a known bug ?
>>
>> Frederic
Re: Plugin binary folder cause dependent plugins export to fail [message #328260 is a reply to message #328259] Tue, 20 May 2008 12:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Frederic,

Comments below.


Frederic Conrotte wrote:
> Ed,
>
> Thanks for your answer.
>
> Plugin A is about exposing javax.transaction classes to other OSGi
> bundles.
>
> classes are contained in javax/transaction and javax/transaction/xa
> folders
>
> Basically yes plugin A list the classes folder in "bin.includes"
>
> bin.includes = META-INF/,\
> .,\
> javax/
Do you have a javax folder in your project's root? What does your
BundleClassPath looks like in the MANIFEST.MF?
>
> Plugin A .classpath file expose binary classes from its root:
>
> <classpathentry exported="true" kind="lib" path=""/>
Have you been fiddling directly with the project's Properties...? When
building plugins, all changes to the classpath should be done by editing
the MANIFEST.MF not via the project's properties..
>
> Am I missing something ?
>
> Frederic
>
>
> Ed Merks a écrit :
>> Frederic,
>>
>> I wonder what your build.properties for A looks like? In particular,
>> I wonder if you've properly specified to include the classes folder
>> int he binary result.
>>
>>
>> Frederic Conrotte wrote:
>>> Dear all,
>>>
>>> I have plugin A which
>>> - contains some classes in folder classes/
>>> - expose them to other plugins using Export-Packages statement
>>> - has the classes on its classpath as "class folder"
>>>
>>> In the workspace, plugin B imports those classes and use them, no
>>> issue.
>>>
>>> Now if I try to export plugin B as "deployable plugin", PDE fails to
>>> build Plugin B because it cannot resolves binary classes for plugin A.
>>>
>>> Plugin B export works only if binary classes are packaged as JAR in
>>> plugin A.
>>>
>>> I found a trace of the issue on news.eclipse.tools in 2001 :
>>> http://dev.eclipse.org/newslists/news.eclipse.tools/msg03906 .html
>>>
>>> I failed to find corresponding issue in Bugzilla, is it a known bug ?
>>>
>>> Frederic
Re: Plugin binary folder cause dependent plugins export to fail [message #328261 is a reply to message #328260] Tue, 20 May 2008 13:11 Go to previous messageGo to next message
Frederic Conrotte is currently offline Frederic ConrotteFriend
Messages: 125
Registered: July 2009
Senior Member
Ed,

Answers below as well.

FYI I'm using Eclipse 3.3.1

Frederic

Ed Merks a écrit :
> Frederic,
>
> Comments below.
>
>
> Frederic Conrotte wrote:
>> Ed,
>>
>> Thanks for your answer.
>>
>> Plugin A is about exposing javax.transaction classes to other OSGi
>> bundles.
>>
>> classes are contained in javax/transaction and javax/transaction/xa
>> folders
>>
>> Basically yes plugin A list the classes folder in "bin.includes"
>>
>> bin.includes = META-INF/,\
>> .,\
>> javax/
> Do you have a javax folder in your project's root?
Yes I do

> What does your BundleClassPath looks like in the MANIFEST.MF?
It includes only the plugin's root (I think it could even be skipped as
it's added by default)

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_12-b04 (Sun Microsystems Inc.)
Bundle-Name: Java Transaction API
Bundle-ClassPath: .
Bundle-ManifestVersion: 2
Bundle-SymbolicName: javax.transaction
Export-Package: javax.transaction;version="1.0.1",javax.transaction.xa
;version="1.0.1"
Bundle-Version: 1.0.1.200805201053



>>
>> Plugin A .classpath file expose binary classes from its root:
>>
>> <classpathentry exported="true" kind="lib" path=""/>
> Have you been fiddling directly with the project's Properties...? When
> building plugins, all changes to the classpath should be done by editing
> the MANIFEST.MF not via the project's properties..
I used the Manifest editor.

>>
>> Am I missing something ?
>>
>> Frederic
>>
>>
>> Ed Merks a écrit :
>>> Frederic,
>>>
>>> I wonder what your build.properties for A looks like? In particular,
>>> I wonder if you've properly specified to include the classes folder
>>> int he binary result.
>>>
>>>
>>> Frederic Conrotte wrote:
>>>> Dear all,
>>>>
>>>> I have plugin A which
>>>> - contains some classes in folder classes/
>>>> - expose them to other plugins using Export-Packages statement
>>>> - has the classes on its classpath as "class folder"
>>>>
>>>> In the workspace, plugin B imports those classes and use them, no
>>>> issue.
>>>>
>>>> Now if I try to export plugin B as "deployable plugin", PDE fails to
>>>> build Plugin B because it cannot resolves binary classes for plugin A.
>>>>
>>>> Plugin B export works only if binary classes are packaged as JAR in
>>>> plugin A.
>>>>
>>>> I found a trace of the issue on news.eclipse.tools in 2001 :
>>>> http://dev.eclipse.org/newslists/news.eclipse.tools/msg03906 .html
>>>>
>>>> I failed to find corresponding issue in Bugzilla, is it a known bug ?
>>>>
>>>> Frederic
Re: Plugin binary folder cause dependent plugins export to fail [message #328266 is a reply to message #328261] Tue, 20 May 2008 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------080905000301010303090103
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Frederic,

I expect your .classpath to look like this:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="con"
path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/J2SE-1.5 "/>
<classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

For us the build.properties looks like this:

bin.includes = about.html,\
.,\
plugin.properties,\
plugin.xml,\
model/,\
META-INF/,\
schema/
src.includes = about.html
source.. = src/
output.. = bin/
exclude.. = **/doc-files/**

I'm confused about that "classes" folder you mentioned. So I get the
sense that something fishy is going on with your classpath related to
this javax thing. I think you should be specifying that it's part of
the output.. rather than what you've done...


Frederic Conrotte wrote:
> Ed,
>
> Answers below as well.
>
> FYI I'm using Eclipse 3.3.1
>
> Frederic
>
> Ed Merks a
Re: Plugin binary folder cause dependent plugins export to fail [message #328302 is a reply to message #328266] Wed, 21 May 2008 08:04 Go to previous messageGo to next message
Frederic Conrotte is currently offline Frederic ConrotteFriend
Messages: 125
Registered: July 2009
Senior Member
Ed,

I should have done this from the beginning, show us the code ;)

I zipped the 2 plugins (A and B), you'll find them here:
http://www.covariance.lu/docs/eclipse.platform/Plugin_binary _folder_test.zip

the TransactionConsumer plugin imports classes from the
javax.transaction plugin.

When exporting the TransactionConsumer plugin, PDE (of Eclipse v3.3.1)
produces a logs.zip containing the following compiling error:

# 21/05/08 9:52:55 CEST
# Eclipse Java Compiler 0.780_R33x, 3.3.1, Copyright IBM Corp 2000,
2007. All rights reserved.
----------
1. ERROR in
(...snip...)\TransactionConsumer\src\org\example\Transaction Consumer.java
(at line 3)
import javax.transaction.TransactionManager;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import javax.transaction.TransactionManager cannot be resolved
----------
2. ERROR in
(...snip...)\TransactionConsumer\src\org\example\Transaction Consumer.java
(at line 7)
public TransactionConsumer(TransactionManager aTransactionManager) {
^^^^^^^^^^^^^^^^^^
TransactionManager cannot be resolved to a type
----------
2 problems (2 errors)

Though in the workspace, TransactionConsumer.java compiles.

Frederic

Ed Merks a écrit :
> Frederic,
>
> I expect your .classpath to look like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> <classpathentry kind="src" path="src/"/>
> <classpathentry kind="con"
> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/J2SE-1.5 "/>
> <classpathentry kind="con"
> path="org.eclipse.pde.core.requiredPlugins"/>
> <classpathentry kind="output" path="bin"/>
> </classpath>
>
> For us the build.properties looks like this:
>
> bin.includes = about.html,\
> .,\
> plugin.properties,\
> plugin.xml,\
> model/,\
> META-INF/,\
> schema/
> src.includes = about.html
> source.. = src/
> output.. = bin/
> exclude.. = **/doc-files/**
>
> I'm confused about that "classes" folder you mentioned. So I get the
> sense that something fishy is going on with your classpath related to
> this javax thing. I think you should be specifying that it's part of
> the output.. rather than what you've done...
>
>
> Frederic Conrotte wrote:
>> Ed,
>>
>> Answers below as well.
>>
>> FYI I'm using Eclipse 3.3.1
>>
>> Frederic
>>
>> Ed Merks a écrit :
>>> Frederic,
>>>
>>> Comments below.
>>>
>>>
>>> Frederic Conrotte wrote:
>>>> Ed,
>>>>
>>>> Thanks for your answer.
>>>>
>>>> Plugin A is about exposing javax.transaction classes to other OSGi
>>>> bundles.
>>>>
>>>> classes are contained in javax/transaction and javax/transaction/xa
>>>> folders
>>>>
>>>> Basically yes plugin A list the classes folder in "bin.includes"
>>>>
>>>> bin.includes = META-INF/,\
>>>> .,\
>>>> javax/
>>> Do you have a javax folder in your project's root?
>> Yes I do
>>
>> > What does your BundleClassPath looks like in the MANIFEST.MF?
>> It includes only the plugin's root (I think it could even be skipped
>> as it's added by default)
>>
>> Manifest-Version: 1.0
>> Ant-Version: Apache Ant 1.7.0
>> Created-By: 1.5.0_12-b04 (Sun Microsystems Inc.)
>> Bundle-Name: Java Transaction API
>> Bundle-ClassPath: .
>> Bundle-ManifestVersion: 2
>> Bundle-SymbolicName: javax.transaction
>> Export-Package: javax.transaction;version="1.0.1",javax.transaction.xa
>> ;version="1.0.1"
>> Bundle-Version: 1.0.1.200805201053
>>
>>
>>
>>>>
>>>> Plugin A .classpath file expose binary classes from its root:
>>>>
>>>> <classpathentry exported="true" kind="lib" path=""/>
>>> Have you been fiddling directly with the project's Properties...?
>>> When building plugins, all changes to the classpath should be done by
>>> editing the MANIFEST.MF not via the project's properties..
>> I used the Manifest editor.
>>
>>>>
>>>> Am I missing something ?
>>>>
>>>> Frederic
>>>>
>>>>
>>>> Ed Merks a écrit :
>>>>> Frederic,
>>>>>
>>>>> I wonder what your build.properties for A looks like? In
>>>>> particular, I wonder if you've properly specified to include the
>>>>> classes folder int he binary result.
>>>>>
>>>>>
>>>>> Frederic Conrotte wrote:
>>>>>> Dear all,
>>>>>>
>>>>>> I have plugin A which
>>>>>> - contains some classes in folder classes/
>>>>>> - expose them to other plugins using Export-Packages statement
>>>>>> - has the classes on its classpath as "class folder"
>>>>>>
>>>>>> In the workspace, plugin B imports those classes and use them, no
>>>>>> issue.
>>>>>>
>>>>>> Now if I try to export plugin B as "deployable plugin", PDE fails
>>>>>> to build Plugin B because it cannot resolves binary classes for
>>>>>> plugin A.
>>>>>>
>>>>>> Plugin B export works only if binary classes are packaged as JAR
>>>>>> in plugin A.
>>>>>>
>>>>>> I found a trace of the issue on news.eclipse.tools in 2001 :
>>>>>> http://dev.eclipse.org/newslists/news.eclipse.tools/msg03906 .html
>>>>>>
>>>>>> I failed to find corresponding issue in Bugzilla, is it a known bug ?
>>>>>>
>>>>>> Frederic
>
Re: Plugin binary folder cause dependent plugins export to fail [message #328327 is a reply to message #328302] Wed, 21 May 2008 16:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Frederic,

It sounds like you're using a different JDK in that case. Not sure how
to control that...


Frederic Conrotte wrote:
> Ed,
>
> I should have done this from the beginning, show us the code ;)
>
> I zipped the 2 plugins (A and B), you'll find them here:
> http://www.covariance.lu/docs/eclipse.platform/Plugin_binary _folder_test.zip
>
>
> the TransactionConsumer plugin imports classes from the
> javax.transaction plugin.
>
> When exporting the TransactionConsumer plugin, PDE (of Eclipse v3.3.1)
> produces a logs.zip containing the following compiling error:
>
> # 21/05/08 9:52:55 CEST
> # Eclipse Java Compiler 0.780_R33x, 3.3.1, Copyright IBM Corp 2000,
> 2007. All rights reserved.
> ----------
> 1. ERROR in
> (...snip...)\TransactionConsumer\src\org\example\Transaction Consumer.java
> (at line 3)
> import javax.transaction.TransactionManager;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The import javax.transaction.TransactionManager cannot be resolved
> ----------
> 2. ERROR in
> (...snip...)\TransactionConsumer\src\org\example\Transaction Consumer.java
> (at line 7)
> public TransactionConsumer(TransactionManager aTransactionManager) {
> ^^^^^^^^^^^^^^^^^^
> TransactionManager cannot be resolved to a type
> ----------
> 2 problems (2 errors)
>
> Though in the workspace, TransactionConsumer.java compiles.
>
> Frederic
>
> Ed Merks a écrit :
>> Frederic,
>>
>> I expect your .classpath to look like this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <classpath>
>> <classpathentry kind="src" path="src/"/>
>> <classpathentry kind="con"
>>
>> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/J2SE-1.5 "/>
>>
>> <classpathentry kind="con"
>> path="org.eclipse.pde.core.requiredPlugins"/>
>> <classpathentry kind="output" path="bin"/>
>> </classpath>
>>
>> For us the build.properties looks like this:
>>
>> bin.includes = about.html,\
>> .,\
>> plugin.properties,\
>> plugin.xml,\
>> model/,\
>> META-INF/,\
>> schema/
>> src.includes = about.html
>> source.. = src/
>> output.. = bin/
>> exclude.. = **/doc-files/**
>>
>> I'm confused about that "classes" folder you mentioned. So I get
>> the sense that something fishy is going on with your classpath
>> related to this javax thing. I think you should be specifying that
>> it's part of the output.. rather than what you've done...
>>
>>
>> Frederic Conrotte wrote:
>>> Ed,
>>>
>>> Answers below as well.
>>>
>>> FYI I'm using Eclipse 3.3.1
>>>
>>> Frederic
>>>
>>> Ed Merks a écrit :
>>>> Frederic,
>>>>
>>>> Comments below.
>>>>
>>>>
>>>> Frederic Conrotte wrote:
>>>>> Ed,
>>>>>
>>>>> Thanks for your answer.
>>>>>
>>>>> Plugin A is about exposing javax.transaction classes to other OSGi
>>>>> bundles.
>>>>>
>>>>> classes are contained in javax/transaction and
>>>>> javax/transaction/xa folders
>>>>>
>>>>> Basically yes plugin A list the classes folder in "bin.includes"
>>>>>
>>>>> bin.includes = META-INF/,\
>>>>> .,\
>>>>> javax/
>>>> Do you have a javax folder in your project's root?
>>> Yes I do
>>>
>>> > What does your BundleClassPath looks like in the MANIFEST.MF?
>>> It includes only the plugin's root (I think it could even be skipped
>>> as it's added by default)
>>>
>>> Manifest-Version: 1.0
>>> Ant-Version: Apache Ant 1.7.0
>>> Created-By: 1.5.0_12-b04 (Sun Microsystems Inc.)
>>> Bundle-Name: Java Transaction API
>>> Bundle-ClassPath: .
>>> Bundle-ManifestVersion: 2
>>> Bundle-SymbolicName: javax.transaction
>>> Export-Package: javax.transaction;version="1.0.1",javax.transaction.xa
>>> ;version="1.0.1"
>>> Bundle-Version: 1.0.1.200805201053
>>>
>>>
>>>
>>>>>
>>>>> Plugin A .classpath file expose binary classes from its root:
>>>>>
>>>>> <classpathentry exported="true" kind="lib" path=""/>
>>>> Have you been fiddling directly with the project's Properties...?
>>>> When building plugins, all changes to the classpath should be done
>>>> by editing the MANIFEST.MF not via the project's properties..
>>> I used the Manifest editor.
>>>
>>>>>
>>>>> Am I missing something ?
>>>>>
>>>>> Frederic
>>>>>
>>>>>
>>>>> Ed Merks a écrit :
>>>>>> Frederic,
>>>>>>
>>>>>> I wonder what your build.properties for A looks like? In
>>>>>> particular, I wonder if you've properly specified to include the
>>>>>> classes folder int he binary result.
>>>>>>
>>>>>>
>>>>>> Frederic Conrotte wrote:
>>>>>>> Dear all,
>>>>>>>
>>>>>>> I have plugin A which
>>>>>>> - contains some classes in folder classes/
>>>>>>> - expose them to other plugins using Export-Packages statement
>>>>>>> - has the classes on its classpath as "class folder"
>>>>>>>
>>>>>>> In the workspace, plugin B imports those classes and use them,
>>>>>>> no issue.
>>>>>>>
>>>>>>> Now if I try to export plugin B as "deployable plugin", PDE
>>>>>>> fails to build Plugin B because it cannot resolves binary
>>>>>>> classes for plugin A.
>>>>>>>
>>>>>>> Plugin B export works only if binary classes are packaged as JAR
>>>>>>> in plugin A.
>>>>>>>
>>>>>>> I found a trace of the issue on news.eclipse.tools in 2001 :
>>>>>>> http://dev.eclipse.org/newslists/news.eclipse.tools/msg03906 .html
>>>>>>>
>>>>>>> I failed to find corresponding issue in Bugzilla, is it a known
>>>>>>> bug ?
>>>>>>>
>>>>>>> Frederic
>>
Re: Plugin binary folder cause dependent plugins export to fail [message #330062 is a reply to message #328327] Mon, 14 July 2008 10:31 Go to previous message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

For whom it might interest, I experienced same issue while importing classes of log4j bundle from Eclipse Orbit project, so I finally reported an issue there:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=240649
Previous Topic:Re: Problem switching from Europa to Ganymede
Next Topic:How to show files in Outline View or similar like this
Goto Forum:
  


Current Time: Sat Nov 09 05:06:31 GMT 2024

Powered by FUDForum. Page generated in 0.03972 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top