harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Blewitt" <alex.blew...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-2957) [classlib][pack200] Update pack200 project layout and ensure 1.4 compatibility
Date Mon, 05 Feb 2007 22:04:24 GMT
On 05/02/07, Alexei Zakharov <alexei.zakharov@gmail.com> wrote:
> Let me explain what is going on in HARMONY-2957 ([classlib][pack200]
> Update pack200 project layout and ensure 1.4 compatibility).
> ...

To add my thoughts on this; the pack200 code needs to be compiled with
different versions. The main code uses 1.4, whilst some genericized
APIs need 1.5. As there's only one Eclipse project representing the
module, it can't use both 1.4 and 1.5 at the same time. So, it just
uses 1.4 and the 1.5 classes can be handled in Eclipse in a few ways:

1) Precompile the 1.5 classes into a Jar, and make them available on
the classpath; that way, there's no compiler errors but they're
visible at run-time.
2) Put a README getting the Eclipse developer to build the 1.5 classes
themselves if they need it (and since they're an interface to the 1.4
classes, you don't really *need* them)
3) Put the 1.4 and 1.5 classes in separate projects (and/or separate
bundles). Actually, this would be the cleanest solution and you could
have the 1.4 bundle with a pre-requisite of J2SE-1.4 and the 1.5
bundle/fragment have a pre-requisite of the J2SE-1.5 profile.

However, given the previous discussions on the splitting apart code
into bundles and the length of time we spent discussing it making it
happen, I doubted that 3 would fly, so that's why I did 1; we
eventually settled on 2.

NB the current build.xml performs the 1.4 compilation on the 1.4
source folder, and 1.5 compilation on 1.5 and then bundles them into
an OSGi bundle with an execution environment of J2SE-1.4,J2SE-1.5.

http://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk/modules/pack200/build.xml

http://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk/modules/pack200/META-INF/MANIFEST.MF

NB as pointed out in another e-mail, this bundle runs as-is in both
Harmony and Eclipse without needing special recompilation of the
bundle; it drops straight in to Eclipse:

http://mail-archives.apache.org/mod_mbox/harmony-dev/200701.mbox/%3c636fd28e0701101421v24ce2f35p58f89d7aae7530f9@mail.gmail.com%3e


Alex.

Mime
View raw message