ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nordlund <peter.nordl...@lentus.se>
Subject Re: Problems with the javac task.
Date Mon, 02 Oct 2000 16:20:13 GMT
Hi again,

I have problems compiling my broken code. Can anyone tell me what is
going on?
I have added a printout in Javac.java around line 525. in ant dated
2000-10-01.

 if (result != MODERN_COMPILER_SUCCESS) {
	      System.err.println("******** Error, cmd:" + cmd.toString());
                throw new BuildException(FAIL_MSG, location);
            }


See output below.
My problem is that when this doModernCompile exception occurs, not even
the parts of my code that are working will be written to the output dir.

If I take the command as printed in my trace-printout when the exception
occurs I can use it for compilation without any problems.
(except that my broken code doesn't compile)

I don't understand the code that leads to the exception, so maybe
the behaviour is expected. Or isn't it?

As things stand right now, I have to compile outside ant to get the
working parts of my code compiled.


A few days ago I could get around the problem by switching to jdk/1.2.2
but now when I have added even more temporarily broken code
the same thing happens with the doClassicCompile.



Attached is excerpt of compilation output and also
a build file.


Any hints or advices are highly apprechiated,

Regards 
Peter
////////////////////////////////////////////////////////////////

ant compile
.....
.....

Note: Recompile with -deprecation for details.
32 errors
******** Error, cmd:-d
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/build/Lentus/classes
-classpath
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/build/Lentus/classes:/usr/local/development/java/packages/lentus-misc-jars/v0/AwkTools-1.0.jar:/usr/local/development/java/packages/lentus-misc-jars/v0/mysql-uncomp-1.2c.jar:/usr/local/development/java/packages/lentus-misc-jars/v0/OROMatcher-1.0.7.jar:/usr/local/development/java/packages/lentus-misc-jars/v0/oojava5.1.1.jar:/usr/local/development/java/packages/lentus-misc-jars/v0/voyager-3.1.jar:/usr/local/development/java/packages/jsdk/2.0/jsdk.jar:/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/build/Util/classes:/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/build/Business/classes:/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/build/Launcher/classes:/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/build/LentusImages/classes:/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/build/Lisp/classes:/usr/local/development/java/pac!
kages/junit/3.2/junit.jar:/usr/local/development/java/packages/junit/3.2:/usr/local/development/java/jdk/Linux/from-sun/1.2.2/lib/tools.jar:/usr/local/development/java/packages/jaxp/1.0.1/jaxp.jar:/usr/local/development/java/packages/jaxp/1.0.1/parser.jar:/usr/local/development/java/packages/ant/2000-10-01/lib/ant.jar:/usr/local/development/java/jdk/Linux/from-ibm/1.3.0/lib/tools.jar
-sourcepath
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java
-O -verbose
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/database/object/type/AllTypes.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/database/object/AbstractProxy.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/database/object/Proxy.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/database/object/ProxyTypeItem.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/database/object/VCTree.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/database/undo/UndoHandler.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/database/Context.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/serveraccess/LentusClientLogin.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/serveraccess/ItemCache.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/serveraccess/DatabaseQueueHandler.java
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/java/se/lentus/lentus/serveraccess/ServerImpl.java

BUILD FAILED

/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/build.xml:134:
Error starting modern compiler
/.automount/analytik/root/dr2/development/DONT-COPY/petern/LENTUS/Lentus/build.xml:134:
Compile failed, messages should have been provided.
	at java.lang.Throwable.<init>(Throwable.java:96)
	at java.lang.Exception.<init>(Exception.java:44)
	at java.lang.RuntimeException.<init>(RuntimeException.java:49)
	at org.apache.tools.ant.BuildException.<init>(BuildException.java:131)
	at org.apache.tools.ant.taskdefs.Javac.doModernCompile(Javac.java:524)
	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:338)
	at org.apache.tools.ant.Target.execute(Target.java:142)
	at org.apache.tools.ant.Project.runTarget(Project.java:807)
	at org.apache.tools.ant.Project.executeTarget(Project.java:532)
	at org.apache.tools.ant.Project.executeTargets(Project.java:506)
	at org.apache.tools.ant.Main.runBuild(Main.java:400)
	at org.apache.tools.ant.Main.main(Main.java:130)

Total time: 32 seconds
Error starting modern compiler


-------------------------------------------------------------------------------------------------------


<project name="merge" default="compile" basedir=".">

  <property name="buildfiles.dir" value="../buildfiles"/>

  <property name="env.classpaths.filename" 
     value="${buildfiles.dir}/env.classpaths"/>

  <property file="${env.versions.filename}" />
  <property file="${env.classpaths.filename}" />
  <property file="${buildfiles.dir}/properties.subprojects" />

  <property name="lentus.module.Name"  value="Lentus" />
  <property name="lentus.module.name"  value="lentus" />
  <property name="lentus.src.java"     value="java" />
  <property name="lentus.builddir"    
value="../build/${lentus.module.Name}" />

  <property name="lentus.build.classes"
value="${lentus.builddir}/classes" />
  <property name="lentus.build.doc"    
value="${lentus.builddir}/javadoc" />
  <property name="lentus.build.lib"     value="${lentus.builddir}/lib"
/>
  <property name="test.filenames" value="**/*Test.java,**/*Tests.java"
/>
  <property name="verbose.mode"   value="on" />

  <path id="cp1">
    <pathelement path="${classpath.lentus.misc.jars}" />
    <pathelement location="${classpath.jsdk}" />
    <pathelement location="${util.classpath}" />
    <pathelement location="${business.classpath}" />
    <pathelement location="${launcher.classpath}" />
    <pathelement location="${lentusimages.classpath}" />
    <pathelement location="${lisp.classpath}" />
  </path>


  <target name="prepare" depends="">
    <tstamp />
    <mkdir dir="${lentus.builddir}"/>
    <mkdir dir="${lentus.build.classes}"/>
    <mkdir dir="${lentus.build.doc}"/>
    <mkdir dir="${lentus.build.lib}"/>
    <ant antfile="${buildfiles.dir}/build-common-targets.xml" 
         target="prepareandcheckenvfiles" />
  </target>

  <target name="clean">
    <deltree dir="${lentus.builddir}"/>
    <deltree dir="${lentus.install.lib}"/>
  </target>

  <!-- FAILS with 1.3.0 compilers -->
  <target name="compile" depends="prepare">
   <javac srcdir="${lentus.src.java}" destdir="${lentus.build.classes}"
           debug="off" optimize="on" deprecation="off"
verbose="${verbose.mode}"
          
excludes="${bk.excludefiles},**/database/**,**/InterviewersDataset.java,${test.filenames}"
      >
      <classpath refid="cp1" />
    </javac>
  </target>


  <!-- FAILS with 1.3.0 compilers -->
  <target name="compiledatabase" depends="prepare">
   <javac srcdir="${lentus.src.java}/se/lentus/lentus/database" 
          destdir="${lentus.build.classes}"
          debug="off" optimize="on" deprecation="off" verbose="on"
         
excludes="${bk.excludefiles},**/InterviewersDataset.java,${test.filenames}"
   >
      <classpath refid="cp1" />
    </javac>
  </target>

  <!-- compiles ok with 1.3.0 compilers, almost no code is broken -->
  <target name="compileisl" depends="prepare">
   <javac srcdir="${lentus.src.java}/se/lentus/lentus/isl" 
          destdir="${lentus.build.classes}"
          debug="off" optimize="on" deprecation="off" verbose="on"
         
excludes="${bk.excludefiles},**/InterviewersDataset.java,${test.filenames}"
   >
      <classpath refid="cp1" />
    </javac>
  </target>

  <!-- FAILS with 1.3.0 compilers -->
  <target name="compileserveraccess" depends="prepare">
   <javac srcdir="${lentus.src.java}/se/lentus/lentus/serveraccess" 
          destdir="${lentus.build.classes}"
          debug="off" optimize="on" deprecation="off" verbose="on"
         
excludes="${bk.excludefiles},**/InterviewersDataset.java,${test.filenames}"
      >
      <classpath refid="cp1" />
    </javac>
  </target>

  <!-- compiles ok with 1.3.0 compilers, almost all broken code is
excluded -->
  <target name="compile2" depends="prepare">
   <javac srcdir="${lentus.src.java}" destdir="${lentus.build.classes}"
          debug="off" optimize="on" deprecation="off"
          includes="**/ServerSimulator.java"
	 
excludes="${bk.excludefiles},**/database/**,**/InterviewersDataset.java,${test.filenames}"
      >
      <classpath refid="cp1" />
    </javac>
  </target>

  <!-- FAILS with 1.3.0 compilers -->
  <target name="compile3" depends="prepare">
   <javac srcdir="${lentus.src.java}" destdir="${lentus.build.classes}"
          debug="off" optimize="on" deprecation="off" verbose="on"
         
includes="**/ID.java,**/serveraccess/,**/lentus/*java,**/database/"
	 
excludes="${bk.excludefiles},**/InterviewersDataset.java,${test.filenames}"
   >
      <classpath refid="cp1" />
    </javac>
  </target>

</project>

Mime
View raw message