ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milan Kubec" <Milan.Ku...@netbeans.com>
Subject Re: Using Jikes to compile on Linux
Date Fri, 25 Aug 2000 17:48:17 GMT

----- Original Message -----
From: "Adrian Blakey" <ABlakey@bridgepath.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, August 24, 2000 3:53 PM
Subject: Using Jikes to compile on Linux


> We have a Linux 2.2-16 system with ant 1.1 running on it doing builds with
> Sun jdk1.2.2. Things need to be speeded up. We understand jikes is the
> solution.
>
> Making the following setting in build.xml:
>
> <property name="build.compiler" value="jikes"/>
>
> Gives this result:
>
> BUILD FATAL ERROR: Compile failed, messages should have been provided.
> org.apache.tools.ant.BuildException: Compile failed, messages should have
> been provided.
>         at
> org.apache.tools.ant.taskdefs.Javac.doJikesCompile(Javac.java:564)
>         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:222)
>         at org.apache.tools.ant.Target.execute(Target.java:120)
>         at org.apache.tools.ant.Project.runTarget(Project.java:675)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:422)
>         at org.apache.tools.ant.Main.runBuild(Main.java:240)
>         at org.apache.tools.ant.Main.main(Main.java:191)
>
> And yes, jikes is in the PATH.
>
> Has anyone got jikes working?
>

Hello,
this is what I've got compiling by 1.3 JDK javac. So it seems that the way
how ant handles compilation errors is wrong. I'm using night build from
8/23.
SW info: Solaris 7, JDK 1.3.
If compilation goes without errors, everything works OK.

BUILD FAILED

build.xml:211: Compile failed, messages should have been provided.
Compile failed, messages should have been provided.
        at
org.apache.tools.ant.taskdefs.Javac.doModernCompile(Javac.java:480)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:326)
        at org.apache.tools.ant.Target.execute(Target.java:141)
        at org.apache.tools.ant.Project.runTarget(Project.java:721)
        at org.apache.tools.ant.Project.executeTarget(Project.java:451)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:187)
        at org.apache.tools.ant.Target.execute(Target.java:141)
        at org.apache.tools.ant.Project.runTarget(Project.java:721)
        at org.apache.tools.ant.Project.executeTarget(Project.java:451)
        at org.apache.tools.ant.Project.executeTargets(Project.java:425)
        at org.apache.tools.ant.Main.runBuild(Main.java:310)
        at org.apache.tools.ant.Main.main(Main.java:124)

If I look into code, there should be only some better compilation error
handling and nicer message to user.

[Javac.jar]:
...
try {
            Class c = Class.forName ("com.sun.tools.javac.Main");
            Object compiler = c.newInstance ();
            Method compile = c.getMethod ("compile",
                new Class [] {(new String [] {}).getClass ()});
            int result = ((Integer) compile.invoke
                          (compiler, new Object[] {cmd.getArguments()}))
.intValue ();
            if (result != MODERN_COMPILER_SUCCESS) {
                String msg =
                    "Compile failed, messages should have been provided.";
                throw new BuildException(msg);
            }

} catch (Exception ex) {
                throw new BuildException (ex);
        }
...

  Milan Kubec




Mime
View raw message