Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » PDE build of non-library jar (like the way org.eclipse.pde.build project builds its ant lib)
PDE build of non-library jar (like the way org.eclipse.pde.build project builds its ant lib) [message #115112] Fri, 22 August 2003 15:45 Go to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

I have a jar that needs to be built in a project, but is not a plugin
library. The project is a plugin project. I tried to do like the
org.eclipse.pde.build project does with the lib/pdebuild-ant.jar.

What is done there is the build.properties file has:

source.pdebuild.jar=src/
source.lib/pdebuild-ant.jar=src_ant/
jars.compile.order=pdebuild.jar,lib/pdebuild-ant.jar
jars.extra.classpath=../org.apache.ant/ant.jar
bin.includes=plugin.xml,plugin.properties,about.html,*.jar,l ib/*.jar,scripts/,
templates/, feature/, notes/
src.includes=about.html

So there is a source.lib/pdebuild-ant.jar=src_ant/ entry to tell where
the pdebuild-ant.jar source is at. But there is no library stmt for it
in the plugin.xml. I tried to do this, but whenever I change the
plugin.xml it removes from the classpath that jar's source directory.

How does pdebuild do this so that it is isn't wiped out each time? Or do
they take that as a consequence and simply put it back each time?

--
Thanks, Rich Kulp

Re: PDE build of non-library jar (like the way org.eclipse.pde.build project builds its ant lib) [message #115125 is a reply to message #115112] Fri, 22 August 2003 15:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

Actually what I would really like to do is build the jar in a separate
project because it has a different classpath requirement. With the
process used by PDE it merges the classpath computed from the plugin.xml
with the extra classpaths stmt, so you don't have good separation.

The problem is that without having a custom build.xml there is no way to
tell the auto-generated build.xml from PDE to call a build.xml in
another project to get the build output from the non-PDE project. I
don't want a custom build xml because I have to change it every time
something about the project changes, which is a pain.

Thanks,
Rich
Re: PDE build of non-library jar (like the way org.eclipse.pde.build project builds its ant lib) [message #115951 is a reply to message #115112] Mon, 25 August 2003 09:15 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C36AE9.7D3E1250
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Since 3.0M2 the builder supports new options allowing the specification =
of classpath on a library basis.
For example, the build.properties previously given becomes:
source.pdebuild.jar=3Dsrc/
source.lib/pdebuild-ant.jar=3Dsrc_ant/
jars.compile.order=3Dpdebuild.jar,lib/pdebuild-ant.jar
extra.lib/pdebuild-ant.jar=3D../org.apache.ant/ant.jar
bin.includes=3Dplugin.xml,plugin.properties,about.html,*.jar ,lib/*.jar,sc=
ripts/, templates/, feature/, notes/
src.includes=3Dabout.html

HTH

PaScaL


"Richard L. Kulp" <richkulp@NOSPAM.us.ibm.com> wrote in message =
news:bi5roi$ub3$1@eclipse.org...
> I have a jar that needs to be built in a project, but is not a plugin=20
> library. The project is a plugin project. I tried to do like the=20
> org.eclipse.pde.build project does with the lib/pdebuild-ant.jar.
>=20
> What is done there is the build.properties file has:
>=20
> source.pdebuild.jar=3Dsrc/
> source.lib/pdebuild-ant.jar=3Dsrc_ant/
> jars.compile.order=3Dpdebuild.jar,lib/pdebuild-ant.jar
> jars.extra.classpath=3D../org.apache.ant/ant.jar
> =
bin.includes=3Dplugin.xml,plugin.properties,about.html,*.jar ,lib/*.jar,sc=
ripts/,=20
> templates/, feature/, notes/
> src.includes=3Dabout.html
>=20
> So there is a source.lib/pdebuild-ant.jar=3Dsrc_ant/ entry to tell =
where=20
> the pdebuild-ant.jar source is at. But there is no library stmt for it =

> in the plugin.xml. I tried to do this, but whenever I change the=20
> plugin.xml it removes from the classpath that jar's source directory.
>=20
> How does pdebuild do this so that it is isn't wiped out each time? Or =
do=20
> they take that as a consequence and simply put it back each time?
>=20
> --=20
> Thanks, Rich Kulp
> =1A
>
------=_NextPart_000_000C_01C36AE9.7D3E1250
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Since 3.0M2 the builder supports new =
options=20
allowing the specification of classpath on a library basis.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>For example, the build.properties =
previously given=20
becomes:</FONT></DIV>
<DIV>
<P><FONT face=3DArial =
size=3D2>source.pdebuild.jar=3Dsrc/<BR></FONT><FONT face=3DArial=20
size=3D2>source.lib/pdebuild-ant.jar=3Dsrc_ant/<BR></FONT ><FONT =
face=3DArial=20
size=3D2>jars.compile.order=3Dpdebuild.jar,lib/pdebuild-ant.jar <BR></FONT=
><FONT=20
face=3DArial=20
size=3D2>extra.lib/pdebuild-ant.jar=3D../org.apache.ant/ant.jar <BR></FONT=
><FONT=20
face=3DArial=20
size=3D2> bin.includes=3Dplugin.xml,plugin.properties,about.html,*.jar ,lib=
/*.jar,scripts/,=20
templates/, feature/, notes/<BR></FONT><FONT face=3DArial=20
size=3D2>src.includes=3Dabout.html</FONT></P>
<P><FONT face=3DArial size=3D2>HTH</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;PaScaL</FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Richard L. Kulp" &lt;</FONT><A=20
href=3D"mailto:richkulp@NOSPAM.us.ibm.com"><FONT face=3DArial=20
size=3D2>richkulp@NOSPAM.us.ibm.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; wrote=20
in message </FONT><A href=3D"news:bi5roi$ub3$1@eclipse.org"><FONT =
face=3DArial=20
size=3D2>news:bi5roi$ub3$1@eclipse.org</FONT></A><FONT face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; I have a jar =
that needs to=20
be built in a project, but is not a plugin <BR>&gt; library. The project =
is a=20
plugin project. I tried to do like the <BR>&gt; org.eclipse.pde.build =
project=20
does with the lib/pdebuild-ant.jar.<BR>&gt; <BR>&gt; What is done there =
is the=20
build.properties file has:<BR>&gt; <BR>&gt; =
source.pdebuild.jar=3Dsrc/<BR>&gt;=20
source.lib/pdebuild-ant.jar=3Dsrc_ant/<BR>&gt;=20
jars.compile.order=3Dpdebuild.jar,lib/pdebuild-ant.jar<BR>&gt;=20
jars.extra.classpath=3D../org.apache.ant/ant.jar<BR>&gt;=20
bin.includes=3Dplugin.xml,plugin.properties,about.html,*.jar ,lib/*.jar,sc=
ripts/,=20
<BR>&gt; templates/, feature/, notes/<BR>&gt; =
src.includes=3Dabout.html<BR>&gt;=20
<BR>&gt; So there is a source.lib/pdebuild-ant.jar=3Dsrc_ant/ entry to =
tell where=20
<BR>&gt; the pdebuild-ant.jar source is at. But there is no library stmt =
for it=20
<BR>&gt; in the plugin.xml. I tried to do this, but whenever I change =
the=20
<BR>&gt; plugin.xml it removes from the classpath that jar's source=20
directory.<BR>&gt; <BR>&gt; How does pdebuild do this so that it is =
isn't wiped=20
out each time? Or do <BR>&gt; they take that as a consequence and simply =
put it=20
back each time?<BR>&gt; <BR>&gt; -- <BR>&gt; Thanks, Rich Kulp<BR>&gt; =
=1A<BR>&gt;=20
</FONT></BODY></HTML>

------=_NextPart_000_000C_01C36AE9.7D3E1250--
Re: PDE build of non-library jar (like the way org.eclipse.pde.build project builds its ant lib) [message #116134 is a reply to message #115951] Mon, 25 August 2003 11:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

That's good. But I also assume that it has been fixed in 3.0M2 that
updating the plugin.xml will no longer wipe out the non-<library> source
entry (in this case source.lib/pdebuild-ant.jar=src_ant/) in the
..classpath file, but instead make sure it is there?

Thanks,
Rich
Re: PDE build of non-library jar (like the way org.eclipse.pde.build project builds its ant lib) [message #116427 is a reply to message #116134] Mon, 25 August 2003 15:54 Go to previous messageGo to next message
Eclipse UserFriend
Sorry but I don't understand the problem.
PaScaL
"Richard L. Kulp" <richkulp@NOSPAM.us.ibm.com> wrote in message
news:bid9ik$ts2$1@eclipse.org...
> That's good. But I also assume that it has been fixed in 3.0M2 that
> updating the plugin.xml will no longer wipe out the non-<library> source
> entry (in this case source.lib/pdebuild-ant.jar=src_ant/) in the
> .classpath file, but instead make sure it is there?
>
> Thanks,
> Rich
>
Re: PDE build of non-library jar (like the way org.eclipse.pde.build project builds its ant lib) [message #116556 is a reply to message #116427] Tue, 26 August 2003 10:08 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

The problem is this: Take the following build.properties:

source.pdebuild.jar=src/

source.lib/pdebuild-ant.jar=src_ant/

jars.compile.order=pdebuild.jar,lib/pdebuild-ant.jar
extra.lib/pdebuild-ant.jar=../org.apache.ant/ant.jar
bin.includes=plugin.xml,plugin.properties,about.html,*.jar,l ib/*.jar,scripts/,
templates/, feature/, notes/
src.includes=about.html


The jar, lib/pdebuild-ant.jar, is not a plugin library. I.E. there is no
<library> element for it in the plugin.xml. However, it is a jar that is
built in this plugin to be used by any ANT process when ANT is started.
It will get added to the ANT's classloader. Because it is a jar compiled
in this project, the .classpath has a source folder entry pointing to
src_ant/ folder. So it gets compiled just like the <library> jar
pdebuild.jar.

The problem is in 2.1.1 is that if you now go to the plugin.xml file and
update it for some reason, it recreates the .classpath file and wipes
out the source entry for src_ant folder. Now it no longer compiles
within Eclipse. It no longer shows up as code that you can edit and do
java searches on. This is because the PDE will only put in the
..classpath source folders for jars that are listed in BOTH the
build.properties and the plugin.xml <library> stmts. This makes it very
difficult to build non-<library> jars in a plugin using PDE.

I have three or four plugins that have this condition. We are running
jars outside of Eclipse. If we use this pattern, which is the pattern
that PDE is using to build their ant.jar, we have to be very careful
every time we update the plugin.xml. We will need to remember to go back
and update the classpath separately to put the non-library jar back in
the compile path.

On a side note, I don't really like the idea of building (both in
Eclipse and through the build.xml) a non-library jar in a plugin
project. I prefer having the non-library jar being built separately in a
non-plugin project and then being pulled into the plugin project by the
build. But I don't want to write a custom build.xml for this because
then when anything changes in the plugin.xml that requires a new
build.xml I need recreate it and put the code back in again. A build.xml
produced by PDE is actually very complicated and I don't want to have to
delve into it each time a change is needed. It would be nice if the PDE
had a concept of non-library jars in other projects and built and pulled
them in automatically. This way the classpaths can be totally separated.
Both for the Eclipse JDT compiles and the PDE build.xml compiles.

Thanks,
Rich
Previous Topic:Setting the checked nodes in a CheckboxTreeViewer
Next Topic:A Requirements plugin...anybody interested?
Goto Forum:
  


Current Time: Mon Jun 09 03:50:59 EDT 2025

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

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

Back to the top