Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Where can I find the exported jars ?
Where can I find the exported jars ? [message #41539] Thu, 22 January 2009 15:12 Go to next message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
Dear all,
For some of our needs, we must have access to the exported jars just
before their packaging in the final zips.

So, I took the customBuildCallbacks.xml template and add some instructions
in the "post.build.jars" target to try to find where the jar of my plugin
really is.

I tried to find it just by running the "dir /S" command within the
"${build.result.folder}" folder without success.

So my questions are:
- did I override the right target? ("post.build.jars")
- where can I find the exported jar?

Thanks.
Re: Where can I find the exported jars ? [message #41626 is a reply to message #41539] Thu, 22 January 2009 18:48 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
The build.jars target is not called in the normal run of headless build.
It is more of a convenience target that some people call when
customizing their builds beyond all recognizability.
( I didn't think anyone used it until I broke it once and people started
complaining :) )

In the course of a normal build, bundles are first collected into
folders (gather.bin.parts), and are jarred up later if needed. There
aren't any targets in the customBuildCallbacks that will get called
after jars are created.

To have access to these jars, you will instead need to use
customAssembly.xml (which is comparable to customTargets.xml). It does
not go in individual plugins, but goes in your main builder
configuration. This is new in 3.4, there is a small paragraph on it
here
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.pde.doc.user/tasks/pde_customization.htm.

The target you will be interested in here is "post.jarUp" (or perhaps
pre.archive), folders will have been jared at this point. The property
${eclipse.base} will be the root of the eclipse install that has been
assembled.

-Andrew
romu wrote:
> Dear all,
> For some of our needs, we must have access to the exported jars just
> before their packaging in the final zips.
>
> So, I took the customBuildCallbacks.xml template and add some
> instructions in the "post.build.jars" target to try to find where the
> jar of my plugin really is.
>
> I tried to find it just by running the "dir /S" command within the
> "${build.result.folder}" folder without success.
>
> So my questions are:
> - did I override the right target? ("post.build.jars")
> - where can I find the exported jar?
>
> Thanks.
>
Re: Where can I find the exported jars ? [message #41972 is a reply to message #41626] Fri, 23 January 2009 15:22 Go to previous messageGo to next message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
Hi Andrew,
And many thanks for the help.

In don't know if the "build.jars" target is called or not, but the
"post.build.jars" is called indeed, but of course, if there is no jar done
at this point, this is pretty useless.

My problem with the solution of the customAssembly is it is Ganymede
specific. My headless build system is able to build any project of my
company with Eclipse 3.2, 3.3 and 3.4, and, of course, I expect the same
behaviour whatever the Eclipse SDK used to build is.

So I guess I have to find a "home made" solution to fulfill my needs.

Thanks for all, that saved me a lot of searches.
Re: Where can I find the exported jars ? [message #42063 is a reply to message #41972] Fri, 23 January 2009 15:44 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Sorry, you are right, I made a mistake. The "build.jars" target is
called by the headless build. I got it mixed up with "build.update.jar"
which isn't called.

Note that the eclipse you use to actually run the build can be different
from the eclipse that you are targeting and compiling against. There
should be no reason you can't use a Ganymede to build a project
targeting Eclipse 3.2.

-Andrew
romu wrote:
> Hi Andrew,
> And many thanks for the help.
>
> In don't know if the "build.jars" target is called or not, but the
> "post.build.jars" is called indeed, but of course, if there is no jar
> done at this point, this is pretty useless.
>
> My problem with the solution of the customAssembly is it is Ganymede
> specific. My headless build system is able to build any project of my
> company with Eclipse 3.2, 3.3 and 3.4, and, of course, I expect the same
> behaviour whatever the Eclipse SDK used to build is.
>
> So I guess I have to find a "home made" solution to fulfill my needs.
>
> Thanks for all, that saved me a lot of searches.
>
Re: Where can I find the exported jars ? [message #42581 is a reply to message #42063] Mon, 26 January 2009 14:27 Go to previous messageGo to next message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
Thanks Andrew, but this is not the way my build system works, it uses the
same Eclipse version to run PDE and build my projects.

So, the answer of my very first question remains, if build.jars is well
called, where are the jars?
Re: Where can I find the exported jars ? [message #45308 is a reply to message #41539] Thu, 05 February 2009 09:44 Go to previous message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
So I finally got it !!

We have 2 cases: packed plugins and unpackaged plugins.

Packed plugins: The first case is the easiest one, use the
customBuildCallbacks.xml and fill the "post.gather.bin.parts" target.

The "target.folder" variable is where the files to be packed have to be
located, pretty easy.

Unpacked plugins: this case is a little more tricky. Let say, you have a
plugin named com.company.plugin and in this unpacked plugin, there is a
jar named com.company.plugin.jar.

In the customBuildCallbacks.xml, do create a new target called
"post.compile.com.company.plugin.jar" and here again, put the file to be
embedded into the jar by using the "target.folder" variable.

Hope this helps.
Re: Where can I find the exported jars ? [message #590177 is a reply to message #41539] Thu, 22 January 2009 18:48 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
The build.jars target is not called in the normal run of headless build.
It is more of a convenience target that some people call when
customizing their builds beyond all recognizability.
( I didn't think anyone used it until I broke it once and people started
complaining :) )

In the course of a normal build, bundles are first collected into
folders (gather.bin.parts), and are jarred up later if needed. There
aren't any targets in the customBuildCallbacks that will get called
after jars are created.

To have access to these jars, you will instead need to use
customAssembly.xml (which is comparable to customTargets.xml). It does
not go in individual plugins, but goes in your main builder
configuration. This is new in 3.4, there is a small paragraph on it
here
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.pde.doc.user/tasks/pde_customization.htm

The target you will be interested in here is "post.jarUp" (or perhaps
pre.archive), folders will have been jared at this point. The property
${eclipse.base} will be the root of the eclipse install that has been
assembled.

-Andrew
romu wrote:
> Dear all,
> For some of our needs, we must have access to the exported jars just
> before their packaging in the final zips.
>
> So, I took the customBuildCallbacks.xml template and add some
> instructions in the "post.build.jars" target to try to find where the
> jar of my plugin really is.
>
> I tried to find it just by running the "dir /S" command within the
> "${build.result.folder}" folder without success.
>
> So my questions are:
> - did I override the right target? ("post.build.jars")
> - where can I find the exported jar?
>
> Thanks.
>
Re: Where can I find the exported jars ? [message #590309 is a reply to message #41626] Fri, 23 January 2009 15:22 Go to previous message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
Hi Andrew,
And many thanks for the help.

In don't know if the "build.jars" target is called or not, but the
"post.build.jars" is called indeed, but of course, if there is no jar done
at this point, this is pretty useless.

My problem with the solution of the customAssembly is it is Ganymede
specific. My headless build system is able to build any project of my
company with Eclipse 3.2, 3.3 and 3.4, and, of course, I expect the same
behaviour whatever the Eclipse SDK used to build is.

So I guess I have to find a "home made" solution to fulfill my needs.

Thanks for all, that saved me a lot of searches.
Re: Where can I find the exported jars ? [message #590339 is a reply to message #41972] Fri, 23 January 2009 15:44 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Sorry, you are right, I made a mistake. The "build.jars" target is
called by the headless build. I got it mixed up with "build.update.jar"
which isn't called.

Note that the eclipse you use to actually run the build can be different
from the eclipse that you are targeting and compiling against. There
should be no reason you can't use a Ganymede to build a project
targeting Eclipse 3.2.

-Andrew
romu wrote:
> Hi Andrew,
> And many thanks for the help.
>
> In don't know if the "build.jars" target is called or not, but the
> "post.build.jars" is called indeed, but of course, if there is no jar
> done at this point, this is pretty useless.
>
> My problem with the solution of the customAssembly is it is Ganymede
> specific. My headless build system is able to build any project of my
> company with Eclipse 3.2, 3.3 and 3.4, and, of course, I expect the same
> behaviour whatever the Eclipse SDK used to build is.
>
> So I guess I have to find a "home made" solution to fulfill my needs.
>
> Thanks for all, that saved me a lot of searches.
>
Re: Where can I find the exported jars ? [message #590557 is a reply to message #42063] Mon, 26 January 2009 14:27 Go to previous message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
Thanks Andrew, but this is not the way my build system works, it uses the
same Eclipse version to run PDE and build my projects.

So, the answer of my very first question remains, if build.jars is well
called, where are the jars?
Re: Where can I find the exported jars ? [message #591489 is a reply to message #41539] Thu, 05 February 2009 09:44 Go to previous message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
So I finally got it !!

We have 2 cases: packed plugins and unpackaged plugins.

Packed plugins: The first case is the easiest one, use the
customBuildCallbacks.xml and fill the "post.gather.bin.parts" target.

The "target.folder" variable is where the files to be packed have to be
located, pretty easy.

Unpacked plugins: this case is a little more tricky. Let say, you have a
plugin named com.company.plugin and in this unpacked plugin, there is a
jar named com.company.plugin.jar.

In the customBuildCallbacks.xml, do create a new target called
"post.compile.com.company.plugin.jar" and here again, put the file to be
embedded into the jar by using the "target.folder" variable.

Hope this helps.
Previous Topic:pde.exportPlugins failed
Next Topic:Access a class of a project from plugin code, using the classpath of the project
Goto Forum:
  


Current Time: Fri Apr 19 00:50:06 GMT 2024

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

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

Back to the top