Package: ant
Version: 1.7.0-2
Severity: normal
Tags: patch
Hi all,
When building Lucene using gcj I came across the following problem.
The ant rmic task calls rmic as an external process. When constructing the
command line, the "-verbose" options is added AFTER the classes to handle. The
rmic documentation however states that all options must come BEFORE the list of
classes. It seems Sun's rmic doesn't care, but the gcj/kaffe rmic does.
The issue is in the execute() method of the
org.apache.tools.ant.taskdefs.rmic.KaffeRmic class.
Patch attached.
Cheers,
Jan-Pascal
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (900, 'stable'), (300, 'testing'), (100, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22-1-k7
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages ant depends on:
ii gij [java-virtual-machine] 4:4.1.1-15 The GNU Java bytecode interpreter
ii gij-4.1 [java1-runtime] 4.1.1-20 The GNU Java bytecode interpreter
ii java-gcj-compat 1.0.65-10 Java runtime environment using GIJ
ii java-gcj-compat-dev 1.0.65-10 Java runtime environment with GCJ
ii kaffe-pthreads [java1-runtime 2:1.1.7-4 A POSIX threads enabled version of
ii libxerces2-java 2.8.1-1 Validating XML parser for Java wit
ii sun-java5-jre [java1-runtime] 1.5.0-10-3 Sun Java(TM) Runtime Environment (
Versions of packages ant recommends:
pn ant-gcj <none> (no description available)
ii ant-optional 1.7.0-2 Java based build tool like make -
-- no debconf information
--- ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic-patched.java 2007-08-08 15:37:32.000000000 +0200
+++ ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java 2006-12-13 13:16:21.000000000 +0100
@@ -46,6 +46,7 @@
/** [EMAIL PROTECTED] */
public boolean execute() throws BuildException {
getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE);
+ Commandline cmd = setupRmicCommand();
Class c = getRmicClass();
if (c == null) {
@@ -65,18 +66,12 @@
getRmic().getLocation());
}
- Commandline cmd;
+ cmd.setExecutable(c.getName());
if (!c.getName().equals(RMIC_CLASSNAMES[RMIC_CLASSNAMES.length - 1])) {
// only supported since Kaffe 1.1.2
- String[] options = { "-verbose" };
- cmd = setupRmicCommand(options);
- } else {
- cmd = setupRmicCommand();
- }
-
- cmd.setExecutable(c.getName());
- getRmic().log(Commandline.describeCommand(cmd));
-
+ cmd.createArgument().setValue("-verbose");
+ getRmic().log(Commandline.describeCommand(cmd));
+ }
ExecuteJava ej = new ExecuteJava();
ej.setJavaCommand(cmd);
return ej.fork(getRmic()) == 0;
_______________________________________________
pkg-java-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers