Hallo!

I'm coming from debian, but we recently also had some switches wrt ant.

* Adrian Almenar <[EMAIL PROTECTED]> wrote:
> 3.- Another proposal was to have ant cut into pieces, like having:
> base-ant package, an optional-junit package, and so on.

This was actually done with debians ant: It's now split into
libant1.5-java and ant. libant1.5-java only contains the ant.jar and
is in main now (builds with kaffe, but would actually break because no
javadoc is found in java.home, but we overlook that :) ). It is the
first step to have java packages in main.

ant is the optional.jar and the actual /usr/bin/ant script (the
functionality (*now*) is just to get a bin/java and add all jars in
/usr/share/ant to the CLASSPATH)

>- This proposal sounds good but: The problem its how i update
>package.env file to add optional-junit.jar, etc, to classpath, so ant
>can use java-config --classpath=ant and have all the later files

We had recently a proposal [1] to use something similar to your
java-config script. The proposed solution to this problem was to add a
java-config file (similar to your files in /usr/share/<package>/) with
a 'CONTRIB' line, listing the packages to which all the 'JARS'
(listing all the jars in that package) and it dependencies (also a
line in that files) should be contributed.

This would result in a 'java-config --all ant' call and outputting the
jars of everything what ant and this contributed packages depend on
(and the jars in that packages, of course).

[EMAIL PROTECTED]:~$ export JAVA_CONFIG_DIR=/usr/share/doc/new-java-policy/examples/
[EMAIL PROTECTED]:~$ java-config --all libant1.5-java
/usr/share/java/ant-1.5.jar
[EMAIL PROTECTED]:~$ java-config --classpath ant
/usr/share/java/ant-optional.jar:/usr/share/java/ant-1.5.jar
[EMAIL PROTECTED]:~$ java-config --all ant
/usr/share/java/ant-optional.jar:/usr/share/java/ant-1.5.jar:/usr/share/java/antlr.jar:/usr/share/java/antlrall.jar:/usr/share/java/junit.jar:/usr/share/java/jython.jar:/usr/share/java/libreadline-java.jar:/usr/share/java/commons-logging-api.jar:/usr/share/java/commons-logging.jar:/usr/share/java/logkit.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/bcel-5.1.jar:/usr/share/java/bcel.jar:/usr/share/java/regexp.jar:/usr/share/java/xml-apis.jar:/usr/share/java/xalan2.jar:/usr/share/java/jdepend.jar
[EMAIL PROTECTED]:~$ cat /usr/share/doc/new-java-policy/examples/ant
DEPENDS="libant1.5-java"
JARS="/usr/share/java/ant-optional.jar"
[EMAIL PROTECTED]:~$ cat /usr/share/doc/new-java-policy/examples/contrib_ant
DEPENDS=antlr:junit:jython:libcommons-logging-java:libbcel-java:libxalan2-java:libjdepend-java:libxerces2-java:liboro-java:libregexp-java:libbsf-java:antlr:junit:jython:libcommons-logging-java:libbcel-java:libxalan2-java:libjdepend-java:libxerces2-java:liboro-java:libregexp-java:libbsf-java:liblog4j1.2-java:liblog4j1.2-java

contrib_ant is build with a script in postinst scripts.

Packages, which depeden on one task (say junit) could then depends on
'junit' and won't get a exception then. The user could get some
problems because the optional.jar is installed, but not all tasks need
to be available.

Anyway, we don't have the requirement to be 'easily' buildable, so ant
in this case build depends on all required packages (I'm not sure what
would happen if the binary packages really only Suggests or Recommends
the 'junit and so on' packages). It also doesn't solve a problem with
different implementations of a task (which is something the JPackage
guys worked around). This would IMO need some $HOME/.antrc file, which
lists the right implementation or so...

Jan

[1] See lists.debian.org/debian-java/ from august till october. The
propsed policy and the scripts are available from
www.katzien.de/debian/java -> grap the tar.gz and unpack...


--
[EMAIL PROTECTED] mailing list

Reply via email to