[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Assorted questions on java, eclipse packaging

On 2013-02-18 10:24, Thomas Koch wrote:
> Hi,


> I've looked into the eclipse-wtp package, learned about the jh_* helpers for 
> eclipse and tried to apply them to the wtp-jsf plugin. Some questions:
> - The JST project comes in an SDK and non SDK version. Which one should I 
> package?

Not familiar with the particular case, but I know we have a couple of
eclipse plugin sources building both a "normal" and a "-sdk" binary.  So
possibly "both". :)

> - Do you know a good tutorial on how the eclipse plugins build work?

I cannot remember if there is anything in the javahelper tutorial, but
the basic flow is this.  Setup[, symlink system "orbit" depends], build
features (repeat as needed), install and clean.

 * setup is basically "copy X, Y and Z from build-tree to scratch area".
   - jh_setupenvironment (or so) does this.
 * The (optional) symlink system depends is done by jh_generateorbitdir
   (or so).
 * jh_compilefeatures handlings building of features (delegates it to
   pde-build [upstream calls its pdebuild])
 * jh_installfeatures extract compiled plugins (zip files) into the
   relevant path in /usr/share/eclipse or /usr/lib/eclipse
 * jh_clean removes the scratch area.

Examples include eclipse-rse (uses orbit deps) and eclipse-mylyn (uses
some already packaged eclipse plugins).

> - I believe it should be possible to write a tool that automatically writes 
> the debian/eclipse.features file. That means resolving the dependencies 
> between features of the package and finding the external dependency features 
> of each feature to package. Do you agree? Do you think it'd make sense to try 
> this?

It should be doable - at the very least you should be able to get a list
of possible features to build.  (pde-build has code for finding
features).  I think it could be a nice addition even if it cannot be
used for automated building.
  It might even suggest a eclipse.environment file for when the default
(I think "org.eclipse.*") does not suffice.

> - Do you like Perl? Is it just tradition and momentum that the jh_* tools are 
> written in Perl and would you rather prefer new tools to be written in Python? 
> But I think I'll need to get used to Perl if I want to contribute more to 
> Debian... :-(

Actually, the original javahelper tools were written in bash.  I wrote
the eclipse helpers in Perl because it gave me access to the debhelper

> - What's the difference between /usr/lib/eclipse and /usr/share/eclipse? I've 
> both folders on my system.

The usual difference between /usr/lib and /usr/share applies here.  I
decided to /usr/share/eclipse introduce back in 2009 or 2010 because a
majority of eclipse (and its plugins) are actually architecture
independent.  Eclipse does not support this to my knowledge, so I just
used mv + ln -s to solve it[1].

[1] Maybe it does now, or maybe it did back then as well and I just
never figured out how.

> - Has anybody tried to get patches included in eclipse? The pde-build script 
> looks like it could use some cleanup...

Yupe.  It has a steep learning curve and upstream insists that the
copyright holder of a given patch forwards the patch to the Eclipse BTS
  The learning curve is mostly a problem of finding the "right part" of
upstream for the patch.  For the record, "pde{,-}build"[2] was
maintained by the LinuxTools project last I checked.

See http://wiki.debian.org/Eclipse/Packaging for more.

[2] Upstream's name for "pde-build" is "pdebuild" (as in "PDE build").
We renamed it to avoid clashing with pbuilder's pdebuild (as in
"pbuilder debuild").

> - I've finally read a bit about OSGi now and noticed that the OSGi world also 
> does some kind of packaging. I'd like to explore how the Debian repository 
> could also become an OSGi repository and thus attract more users. Some OSGi 
> repos are:
>   - [[http://ebr.springsource.com/repository][Springsource Enterprise Bundle 
> Repository]]
>   - [[http://www.osgi.org/Repository/HomePage][OSGi-Allianz]]
>   - [[http://felix.apache.org/obr][Apache Felix]] (RFC 112)
>   - [[http://www.eclipse.org/orbit][Eclipse Orbit]]
>   - [[http://bundles.sonatype.org][SonaType Nexus]]

There was an interest in doing this [3], but it never really took off.

[3] http://wiki.debian.org/DebianJavaReleaseGoals

> Thank you,
> Thomas Koch, http://www.koch.ro


Reply to: