Home » Eclipse Projects » Eclipse Platform » Plug-in development dependencies
Plug-in development dependencies [message #312821] |
Wed, 21 February 2007 10:42  |
Eclipse User |
|
|
|
Originally posted by: none.gmail.com
Hi all,
I am working on a plug-in that is dependent upon a java project in my
workspace. For design time there is not problem, because I can add the
project to my build properties. At runtime though I get a missing class
error because there is no jar for my java project on the runtime classpath.
Is there a way to reference a java project in your workspace during
runtime, and if not is there a way to build the jars and copy them to my
plug-in project every time I build the dependent java project?
Thanks guys,
Scott
|
|
| |
Re: Plug-in development dependencies [message #312824 is a reply to message #312822] |
Wed, 21 February 2007 10:56   |
Eclipse User |
|
|
|
Originally posted by: none.gmail.com
I understand this point, but my dependent project is not another
plug-in. At runtime it will be a jar on the runtime classpath. For
example if you need to access classes in the axis.jar you would add it
to the runtime dependencies in your manifest. Lets say though that the
axis.jar code is in a java project in your workspace. In order to debug
the axis code that is called from your plug-in you would have to create
a jar of the axis code, copy it to your plug-in project, and make sure
it was on the runtime classpath. I want to know if you can bypass the
jar creation step, so I can make changes to my java project without
having to create a new jar every time I want to test a change.
Ed Merks wrote:
> Scott,
>
> For plugin projects, never modify the Java classpath directly. Edit the
> MANIFEST.MF and use the dependencies tab to add dependencies on other
> plugins.
>
>
> Scott Hathaway wrote:
>> Hi all,
>>
>> I am working on a plug-in that is dependent upon a java project in my
>> workspace. For design time there is not problem, because I can add the
>> project to my build properties. At runtime though I get a missing
>> class error because there is no jar for my java project on the runtime
>> classpath.
>>
>> Is there a way to reference a java project in your workspace during
>> runtime, and if not is there a way to build the jars and copy them to
>> my plug-in project every time I build the dependent java project?
>>
>> Thanks guys,
>> Scott
|
|
|
Re: Plug-in development dependencies [message #312827 is a reply to message #312824] |
Wed, 21 February 2007 11:06   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Scott,
You should make the other project also be a plugin project and make its
manifest's classpath point at the jar that's contained within that
project by using the Runtime tab to add the jar to the MANIFEST.
Scott Hathaway wrote:
> I understand this point, but my dependent project is not another
> plug-in. At runtime it will be a jar on the runtime classpath. For
> example if you need to access classes in the axis.jar you would add it
> to the runtime dependencies in your manifest. Lets say though that the
> axis.jar code is in a java project in your workspace. In order to
> debug the axis code that is called from your plug-in you would have to
> create a jar of the axis code, copy it to your plug-in project, and
> make sure it was on the runtime classpath. I want to know if you can
> bypass the jar creation step, so I can make changes to my java project
> without having to create a new jar every time I want to test a change.
>
> Ed Merks wrote:
>> Scott,
>>
>> For plugin projects, never modify the Java classpath directly. Edit
>> the MANIFEST.MF and use the dependencies tab to add dependencies on
>> other plugins.
>>
>>
>> Scott Hathaway wrote:
>>> Hi all,
>>>
>>> I am working on a plug-in that is dependent upon a java project in
>>> my workspace. For design time there is not problem, because I can
>>> add the project to my build properties. At runtime though I get a
>>> missing class error because there is no jar for my java project on
>>> the runtime classpath.
>>>
>>> Is there a way to reference a java project in your workspace during
>>> runtime, and if not is there a way to build the jars and copy them
>>> to my plug-in project every time I build the dependent java project?
>>>
>>> Thanks guys,
>>> Scott
|
|
|
Re: Plug-in development dependencies [message #312831 is a reply to message #312827] |
Wed, 21 February 2007 11:44   |
Eclipse User |
|
|
|
Originally posted by: none.gmail.com
Ed Merks wrote:
> Scott,
>
> You should make the other project also be a plugin project and make its
> manifest's classpath point at the jar that's contained within that
> project by using the Runtime tab to add the jar to the MANIFEST.
>
>
>
> Scott Hathaway wrote:
>> I understand this point, but my dependent project is not another
>> plug-in. At runtime it will be a jar on the runtime classpath. For
>> example if you need to access classes in the axis.jar you would add it
>> to the runtime dependencies in your manifest. Lets say though that the
>> axis.jar code is in a java project in your workspace. In order to
>> debug the axis code that is called from your plug-in you would have to
>> create a jar of the axis code, copy it to your plug-in project, and
>> make sure it was on the runtime classpath. I want to know if you can
>> bypass the jar creation step, so I can make changes to my java project
>> without having to create a new jar every time I want to test a change.
>>
This will work for development, but it isn't really a final solution for
me. The java project that I am working on that I need the jar for is
more than likely going to be used in some non-eclipse projects. It looks
like the best solution is a custom build.xml that creates and copies the
jar to the plug-in project when the java project is built.
Thanks for your quick responses Ed!
>> Ed Merks wrote:
>>> Scott,
>>>
>>> For plugin projects, never modify the Java classpath directly. Edit
>>> the MANIFEST.MF and use the dependencies tab to add dependencies on
>>> other plugins.
>>>
>>>
>>> Scott Hathaway wrote:
>>>> Hi all,
>>>>
>>>> I am working on a plug-in that is dependent upon a java project in
>>>> my workspace. For design time there is not problem, because I can
>>>> add the project to my build properties. At runtime though I get a
>>>> missing class error because there is no jar for my java project on
>>>> the runtime classpath.
>>>>
>>>> Is there a way to reference a java project in your workspace during
>>>> runtime, and if not is there a way to build the jars and copy them
>>>> to my plug-in project every time I build the dependent java project?
>>>>
>>>> Thanks guys,
>>>> Scott
|
|
|
Re: Plug-in development dependencies [message #312832 is a reply to message #312831] |
Wed, 21 February 2007 12:02   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Scott,
I see. It might not help you directly, but in EMF we produce plugin
jars that also work properly when you put then on a stand alone
classpath. So if your plugin project doesn't use any Eclipse APIs, you
should be able to export a jar that also works standalone (given that
the other jar is also on the classpath).
Scott Hathaway wrote:
> Ed Merks wrote:
>> Scott,
>>
>> You should make the other project also be a plugin project and make
>> its manifest's classpath point at the jar that's contained within
>> that project by using the Runtime tab to add the jar to the MANIFEST.
>>
>>
>>
>> Scott Hathaway wrote:
>>> I understand this point, but my dependent project is not another
>>> plug-in. At runtime it will be a jar on the runtime classpath. For
>>> example if you need to access classes in the axis.jar you would add
>>> it to the runtime dependencies in your manifest. Lets say though
>>> that the axis.jar code is in a java project in your workspace. In
>>> order to debug the axis code that is called from your plug-in you
>>> would have to create a jar of the axis code, copy it to your plug-in
>>> project, and make sure it was on the runtime classpath. I want to
>>> know if you can bypass the jar creation step, so I can make changes
>>> to my java project without having to create a new jar every time I
>>> want to test a change.
>>>
> This will work for development, but it isn't really a final solution
> for me. The java project that I am working on that I need the jar for
> is more than likely going to be used in some non-eclipse projects. It
> looks like the best solution is a custom build.xml that creates and
> copies the jar to the plug-in project when the java project is built.
>
> Thanks for your quick responses Ed!
>
>>> Ed Merks wrote:
>>>> Scott,
>>>>
>>>> For plugin projects, never modify the Java classpath directly.
>>>> Edit the MANIFEST.MF and use the dependencies tab to add
>>>> dependencies on other plugins.
>>>>
>>>>
>>>> Scott Hathaway wrote:
>>>>> Hi all,
>>>>>
>>>>> I am working on a plug-in that is dependent upon a java project in
>>>>> my workspace. For design time there is not problem, because I can
>>>>> add the project to my build properties. At runtime though I get a
>>>>> missing class error because there is no jar for my java project on
>>>>> the runtime classpath.
>>>>>
>>>>> Is there a way to reference a java project in your workspace
>>>>> during runtime, and if not is there a way to build the jars and
>>>>> copy them to my plug-in project every time I build the dependent
>>>>> java project?
>>>>>
>>>>> Thanks guys,
>>>>> Scott
|
|
| | | | |
Re: Plug-in development dependencies [message #312879 is a reply to message #312864] |
Thu, 22 February 2007 11:49   |
Eclipse User |
|
|
|
Originally posted by: lamont_gilbert.rigidsoftware.com
On Thu, 22 Feb 2007 06:54:18 -0500, CL 'dnoyeB' Gilbert wrote:
> On Wed, 21 Feb 2007 10:42:48 -0500, Scott Hathaway wrote:
>
>> Hi all,
>>
>> I am working on a plug-in that is dependent upon a java project in my
>> workspace. For design time there is not problem, because I can add the
>> project to my build properties. At runtime though I get a missing class
>> error because there is no jar for my java project on the runtime
>> classpath.
>>
>> Is there a way to reference a java project in your workspace during
>> runtime, and if not is there a way to build the jars and copy them to my
>> plug-in project every time I build the dependent java project?
>>
>> Thanks guys,
>> Scott
>
> There is no clean way to do this. You can probably create an ant script
> in the java project that rebuilds and copies the jar file into the plugin
> project, but there is a bug right now that makes the jar not fully
> recognized.
>
> What I do anyway is to jar the java project into a lib directory of the
> plugin project. I typically include the source in the jar for debugging
> purposes. or make a seperate jar that contains the source. On the
> plugin-projects project properties go to the build path, libraries tab and
> add the jar file there. You can attach the source there as well.
>
> For me the bug means each time I rebuild that jar I have to remove and
> readd it to the plugin project.
Note, that once this bug is fixed, it should work much like you intend.
Except that instead of putting the source in the jar file, tell Eclipse
that the source is located in ajava project. But still there are a few
drawbacks. Such as modification of the source during run/debug is not
possible.
|
|
|
Re: Plug-in development dependencies [message #312887 is a reply to message #312879] |
Thu, 22 February 2007 17:37  |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
As has been pointed out previously in this thread. The best way to deal
with this situation
is to convert the Java project into a plugin project. Then you don't need
to worry about
jarring up the java project on each rebuild and copying it into the
dependent plugin project.
By adding the previous Java project as a dependency of the plugin project,
it will be
referenced properly.
"CL 'dnoyeB' Gilbert" <lamont_gilbert@rigidsoftware.com> wrote in message
news:pan.2007.02.22.16.49.16.410156@rigidsoftware.com...
> On Thu, 22 Feb 2007 06:54:18 -0500, CL 'dnoyeB' Gilbert wrote:
>
> > On Wed, 21 Feb 2007 10:42:48 -0500, Scott Hathaway wrote:
> >
> >> Hi all,
> >>
> >> I am working on a plug-in that is dependent upon a java project in my
> >> workspace. For design time there is not problem, because I can add the
> >> project to my build properties. At runtime though I get a missing class
> >> error because there is no jar for my java project on the runtime
> >> classpath.
> >>
> >> Is there a way to reference a java project in your workspace during
> >> runtime, and if not is there a way to build the jars and copy them to
my
> >> plug-in project every time I build the dependent java project?
> >>
> >> Thanks guys,
> >> Scott
> >
> > There is no clean way to do this. You can probably create an ant script
> > in the java project that rebuilds and copies the jar file into the
plugin
> > project, but there is a bug right now that makes the jar not fully
> > recognized.
> >
> > What I do anyway is to jar the java project into a lib directory of the
> > plugin project. I typically include the source in the jar for debugging
> > purposes. or make a seperate jar that contains the source. On the
> > plugin-projects project properties go to the build path, libraries tab
and
> > add the jar file there. You can attach the source there as well.
> >
> > For me the bug means each time I rebuild that jar I have to remove and
> > readd it to the plugin project.
>
>
> Note, that once this bug is fixed, it should work much like you intend.
> Except that instead of putting the source in the jar file, tell Eclipse
> that the source is located in ajava project. But still there are a few
> drawbacks. Such as modification of the source during run/debug is not
> possible.
|
|
|
Goto Forum:
Current Time: Tue Jun 03 23:37:53 EDT 2025
Powered by FUDForum. Page generated in 0.26383 seconds
|