Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Java (http://www.linux-archive.org/debian-java/)
-   -   Problems packing eclipse RCP application elexis (http://www.linux-archive.org/debian-java/329357-problems-packing-eclipse-rcp-application-elexis.html)

Niklaus Giger 02-20-2010 06:03 PM

Problems packing eclipse RCP application elexis
 
Hi

I started working on packaging www.elexis.ch for Debian. I am using
git-buildpackage and looked at the solr and libehcache-java packages for
inspiration.

git-buildpackage --git-dont-purge --git-ignore-new --git-no-sign-tag -us -uc
begins to work.

I managed to compile already a few java files after having added dependencies
in my debian/rules to a bunch of Java libraries like jakarta-poi jdom1 bcprov
commons-logging.

I have however a lot of errors like this:
[javac]
/home/src/debian/elexis-2.0/elexis/src/ch/elexis/ApplicationActionBarAdvisor.java:24:
package org.eclipse.core.runtime does not exist

The following manually created link solved this problem:
cd /usr/share/java && sudo ln -s
/usr/lib/eclipse/plugins/org.eclipse.jface_3.4.1.M20080827-2000.jar
org.eclipse.jface.jar

Also for
/usr/lib/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar =>
org.eclipse.swt.jar

This trick fails however for
/usr/lib/eclipse/plugins/org.eclipse.ui_3.4.1.M20080910-0800.jar =>
org.eclipse.ui.jar

Will these errors be corrected with the eclipse 3.5.x packages coming soon? Or
shall I file a bug againt them?

Best regards

Niklaus


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201002202003.23684.niklaus.giger@member.fsf.org">h ttp://lists.debian.org/201002202003.23684.niklaus.giger@member.fsf.org

Niels Thykier 02-20-2010 07:01 PM

Problems packing eclipse RCP application elexis
 
Niklaus Giger wrote:
> Hi
>
> I started working on packaging www.elexis.ch for Debian. I am using
> git-buildpackage and looked at the solr and libehcache-java packages for
> inspiration.
>
> git-buildpackage --git-dont-purge --git-ignore-new --git-no-sign-tag -us -uc
> begins to work.
>

Hi

While there is nothing wrong with looking at other packages for
inspiration, neither of those are build eclipse plugins or rcps. Though,
I cannot recommend any better source of inspiration at the current time.

Is your git repository available publicly?

> I managed to compile already a few java files after having added dependencies
> in my debian/rules to a bunch of Java libraries like jakarta-poi jdom1 bcprov
> commons-logging.
>
> I have however a lot of errors like this:
> [javac]
> /home/src/debian/elexis-2.0/elexis/src/ch/elexis/ApplicationActionBarAdvisor.java:24:
> package org.eclipse.core.runtime does not exist
>
> The following manually created link solved this problem:
> cd /usr/share/java && sudo ln -s
> /usr/lib/eclipse/plugins/org.eclipse.jface_3.4.1.M20080827-2000.jar
> org.eclipse.jface.jar
>
> Also for
> /usr/lib/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar =>
> org.eclipse.swt.jar
>
> This trick fails however for
> /usr/lib/eclipse/plugins/org.eclipse.ui_3.4.1.M20080910-0800.jar =>
> org.eclipse.ui.jar
>
> Will these errors be corrected with the eclipse 3.5.x packages coming soon? Or
> shall I file a bug againt them?
>

It will not be fixed and nor is it a bug really; however, the coming
eclipse package will ship with build helpers to deal with this.

eclipse comes with its very own set of build scripts and an ant-wrapper
that eclipse plugins usually use for their compilation (featuring stuff
like pre and post compile hooks etc.). I cannot recommend attempting to
emulate this with regular ant; also the ant-wrapper itself is run via
eclipse - which tends to make it try and create/access $HOME/.eclipse,
causing FTBFS on the buildd machines (e.g. see #480693).

eclipse-build (our direct upstream for eclipse) has managed to compile a
few scripts that can build an eclipse feature/plugin while hiding most
of the difficulties of beating eclipse into behaving sanely during a
headless build. Furthermore we have begun creating debian specific
helper systems to use these scripts.

This is one of the reasons why I would like to see your git repository -
to see if there is anything we can do to assist you and the application
you are building.


> Best regards
>
> Niklaus
>
>

~Niels

bug-links:
http://bugs.debian.org/480693

Niklaus Giger 02-20-2010 07:16 PM

Problems packing eclipse RCP application elexis
 
Am Samstag 20 Februar 2010 21:01:34 schrieb Niels Thykier:
> Niklaus Giger wrote:
> > Hi
> >
> > I started working on packaging www.elexis.ch for Debian. I am using
> > git-buildpackage and looked at the solr and libehcache-java packages for
> > inspiration.
> >
> > git-buildpackage --git-dont-purge --git-ignore-new --git-no-sign-tag -us
> > -uc begins to work.
>
> Hi
>
> While there is nothing wrong with looking at other packages for
> inspiration, neither of those are build eclipse plugins or rcps. Though,
> I cannot recommend any better source of inspiration at the current time.
>
> Is your git repository available publicly?
Try git clone git://ngiger.dyndns.org/git/debian_packages.git
I just did set it up on my local home server. Could not test whether you have
access from outside. If it doesn't work, just mail again.
>
> > I managed to compile already a few java files after having added
<...>
>
> It will not be fixed and nor is it a bug really; however, the coming
> eclipse package will ship with build helpers to deal with this.
>
> eclipse comes with its very own set of build scripts and an ant-wrapper
> that eclipse plugins usually use for their compilation (featuring stuff
> like pre and post compile hooks etc.). I cannot recommend attempting to
> emulate this with regular ant; also the ant-wrapper itself is run via
> eclipse - which tends to make it try and create/access $HOME/.eclipse,
> causing FTBFS on the buildd machines (e.g. see #480693).
>
> eclipse-build (our direct upstream for eclipse) has managed to compile a
> few scripts that can build an eclipse feature/plugin while hiding most
> of the difficulties of beating eclipse into behaving sanely during a
> headless build. Furthermore we have begun creating debian specific
> helper systems to use these scripts.
>
> This is one of the reasons why I would like to see your git repository -
> to see if there is anything we can do to assist you and the application
> you are building.
Thanks a lot for your explications and your offer for help. Where is the
repository you work on? I would not mind trying an inofficial snapshot to test
your scripts.

Best regards.

--
Niklaus Giger


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201002202116.12094.niklaus.giger@member.fsf.org">h ttp://lists.debian.org/201002202116.12094.niklaus.giger@member.fsf.org

Niels Thykier 02-21-2010 02:18 PM

Problems packing eclipse RCP application elexis
 
Niklaus Giger wrote:
> Am Samstag 20 Februar 2010 21:01:34 schrieb Niels Thykier:
> [...]
>>
>> Is your git repository available publicly?
> Try git clone git://ngiger.dyndns.org/git/debian_packages.git
> I just did set it up on my local home server. Could not test whether you have
> access from outside. If it doesn't work, just mail again.

That worked just fine

>>> I managed to compile already a few java files after having added
> <...>
>> It will not be fixed and nor is it a bug really; however, the coming
>> eclipse package will ship with build helpers to deal with this.
>>
>> eclipse comes with its very own set of build scripts and an ant-wrapper
>> that eclipse plugins usually use for their compilation (featuring stuff
>> like pre and post compile hooks etc.). I cannot recommend attempting to
>> emulate this with regular ant; also the ant-wrapper itself is run via
>> eclipse - which tends to make it try and create/access $HOME/.eclipse,
>> causing FTBFS on the buildd machines (e.g. see #480693).
>>
>> eclipse-build (our direct upstream for eclipse) has managed to compile a
>> few scripts that can build an eclipse feature/plugin while hiding most
>> of the difficulties of beating eclipse into behaving sanely during a
>> headless build. Furthermore we have begun creating debian specific
>> helper systems to use these scripts.
>>
>> This is one of the reasons why I would like to see your git repository -
>> to see if there is anything we can do to assist you and the application
>> you are building.
> Thanks a lot for your explications and your offer for help. Where is the
> repository you work on? I would not mind trying an inofficial snapshot to test
> your scripts.
>
> Best regards.
>

I have moved most of the helpers to javatools[1], where they are now
available. I will be adding more and probably changing the interface to
them as well as I get more experience with writing these tools and using
them.

However, the most important tool is building these plugins is
"pde-build" (upstream refers to it as pdebuild, but that named clashed
with a pbuilder tool, so we have renamed it). This script is (together
with a helper) generated during the build of eclipse.

Sadly our current master branch[2] is broken by some regressions when we
switched to the 3.5.2 branch. You can however build eclipse using
pkg-java's mini-install[3] - the 3.5.1 sources are there (depending on
your arch it may even be precompiled for you). You will need
libmortbay-java and libjasper-java to build and install it (they are
built and available from the arch all part).

That version of eclipse probably do not ship with pde-build (and if it
does, it is still by its old name). To this end I have created a little
tar.gz that can generate pde-build from an installed eclipse [4]. I am
not sure that pde-build is compatible with eclipse 3.4; you are welcome
to try of course.

To generate pde-build, just run (requires that eclipse-pde is installed):
$ make
$ sudo make install

~Niels

[1] http://git.debian.org/?p=pkg-java/javatools.git

[2] http://git.debian.org/?p=pkg-java/eclipse.git

[3] http://wiki.debian.org/Teams/JavaPackaging

[4] http://www.student.dtu.dk/~s072425/debian/eclipse/pde-build-gen.tar.gz

Niels Thykier 02-21-2010 08:28 PM

Problems packing eclipse RCP application elexis
 
Niels Thykier wrote:
> Niklaus Giger wrote:
>> Am Samstag 20 Februar 2010 21:01:34 schrieb Niels Thykier:
>> [...]
>>> Is your git repository available publicly?
>> Try git clone git://ngiger.dyndns.org/git/debian_packages.git
>> I just did set it up on my local home server. Could not test whether you have
>> access from outside. If it doesn't work, just mail again.
>
> That worked just fine
>

Okay I have examined your build and I am puzzled as to why you only have
plugins and no features. Are you sure you have all the sources? I looked
at the upstream SVN and it looks like they have 2 or so features (e.g.
have a look at [1]).

Well, it taught me that our tools only work on features.

Also, I am somewhat alarmed by the manifests of the plugins. It contains
a Bundle-Classpath, which (as I recall) is a list of "embedded jars". I
might be wrong; but if I turn out to be right, we will need to
patch them to use these jar externally (plus possibly also patch our
system jars to have OSGi metadata if they do not already have it).

~Niels

[1]
https://elexis.svn.sourceforge.net/svnroot/elexis/trunk/elexis-kernel/feature.xml

Niklaus Giger 02-22-2010 06:33 AM

Problems packing eclipse RCP application elexis
 
Gerry

Can you give us your thoughts about the question raised by Niels? See @Gerry
below.

Am Sonntag 21 Februar 2010 22:28:53 schrieb Niels Thykier:
> Niels Thykier wrote:
> > Niklaus Giger wrote:
> >> Am Samstag 20 Februar 2010 21:01:34 schrieb Niels Thykier:
> >> [...]
> >>
> >>> Is your git repository available publicly?
> >>
> >> Try git clone git://ngiger.dyndns.org/git/debian_packages.git
> >> I just did set it up on my local home server. Could not test whether you
> >> have access from outside. If it doesn't work, just mail again.
> >
> > That worked just fine
>
> Okay I have examined your build and I am puzzled as to why you only have
> plugins and no features. Are you sure you have all the sources? I looked
> at the upstream SVN and it looks like they have 2 or so features (e.g.
> have a look at [1]).
I am not surprised that you are puzzled, as I am very new packing for Debian
and eclipse RCP.

Upstream has its own way to pack the more than 45 elexis plugins, all required
jars, the whole eclipse, etc into one big blob (see [2]). Therefore I try to
pack first a subset that should produce a minimal system using only the
directories

elexis-utilities
elexis
elexis-importer
mysql-adapter
ElexisBasicFeature

Will probably use a few things from
BuildElexis/rsc/build/build.xml

and for elexis-doc

elexis-developer-resources
dokumentation

Today I pushed some changes to the repo and at least the packages are
installable and "man elexis" works. The de/elexis.pdf seems okay, but the
developer/*.html are not okay.

>
> Well, it taught me that our tools only work on features.
Don't be surprised. We use tools always in ways the inventor never thought of.
>
> Also, I am somewhat alarmed by the manifests of the plugins. It contains
> a Bundle-Classpath, which (as I recall) is a list of "embedded jars". I
> might be wrong; but if I turn out to be right, we will need to
> patch them to use these jar externally (plus possibly also patch our
> system jars to have OSGi metadata if they do not already have it).
@Gerry. Do you need these bundles or do you see a simple way how to replace
them?

>
> ~Niels
>
> [1]
> https://elexis.svn.sourceforge.net/svnroot/elexis/trunk/elexis-kernel/featu
> re.xml
>

Best regards

[2]
https://elexis.svn.sourceforge.net/svnroot/elexis/trunk/BuildElexis/rsc/build/build.xml
--
Niklaus Giger


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201002220833.09993.niklaus.giger@member.fsf.org">h ttp://lists.debian.org/201002220833.09993.niklaus.giger@member.fsf.org

Andrew Overholt 02-22-2010 01:59 PM

Problems packing eclipse RCP application elexis
 
* Niels Thykier <niels@thykier.net> [2010-02-21 16:29]:
>
> Well, it taught me that our tools only work on features.

Correct, PDE Build is feature-driven. I believe we have an open but to
generate a fake feature on-the-fly and then exclude it from the
resulting zip.

Andrew


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100222145906.GA2553@redhat.com">http://lists.debian.org/20100222145906.GA2553@redhat.com

Niels Thykier 02-24-2010 09:24 AM

Problems packing eclipse RCP application elexis
 
Gerry Weirich wrote:
> (1) Elexis does not use eclipse's features. So it is ok to only package
> plugins. The existing features in the repository are rather hints for
> the developer than a runtime need. If you like, you can make a feature
> from the elexis essential plugins and use this to organize your
> packaging tool. (Creating a feature ist easy in eclipse with the
> "new->feature" wizard. Essentially it's only an XML descibing the
> contained plugins and features)
>

Yes, that should be relatively easy to do.

> (2) Some elexis plugins do have embedded jars (usually in a directory
> called 'lib' in the root of the plugin). The Bundle-Classpath statement
> is necessary for the OSGi runtime to include the contents of these jars
> in the classpath of the plugin during runtime. So I do not see a
> possibility to ged rid of them.
>

If the only issue is that these jar files do not have OSGi metadata,
then we can fix it (in Debian that is), by adding the metadata needed to
our version of those jars and update the MANIFESTs. As long as your code
itself does not depend on them being embedded within your jars, but just
that the code is present, then we can do it (using orbit dependencies
and dropins).

> regards, gerry
>
>

~Niels

Pablo Duboue 03-09-2010 05:15 AM

Problems packing eclipse RCP application elexis
 
Hi,

On Saturday 20 February 2010, Niels Thykier wrote:
> eclipse comes with its very own set of build scripts and an ant-wrapper
> that eclipse plugins usually use for their compilation (featuring stuff
> like pre and post compile hooks etc.). I cannot recommend attempting to
> emulate this with regular ant; also the ant-wrapper itself is run via
> eclipse - which tends to make it try and create/access $HOME/.eclipse,
> causing FTBFS on the buildd machines (e.g. see #480693).

From the command-line options of the eclipse [1], there are a few that control
where the platform will store its data (and defaults to $HOME/.eclipse). I
understood that #480693 was going to go away with the new eclipse, but if this
problem is more systemic and we want to have some recipe for buildd machines,
I can take a look, just let me know. I got this HPPA machine from Clint so it
could be a good time to try to set it up to mimic the buildd machines.

Best regards,

Pablo


[1]
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-
options.html


All times are GMT. The time now is 08:02 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.