|
Hi,
when i'm executing this command:
ant -buildfile build_fork.xml -verbose -logfile
log.txt antlr.260.csv
i 'm getting the following logfile snippet:
antlr:
[java] Forking java -classpath E:\my\java\tmp\antlr_test;E:\java\lib\antlr-2.6.0 antlr.Tool csv.g [java] De opdracht of bestandsnaam is onjuist. [java] java.lang.NoClassDefFoundError: E:\java\lib\antlr-2/6/0 <----------- ??? [delete] Deleting: E:\my\rabook\jbuilder\com\rintcius\antlr\260\CSV.g [replace] Replacing in E:\my\rabook\tmp\CSVParser.java: @ANTLR.VERSION@ --> 260 [replace] Replacing in E:\my\rabook\tmp\CSVLexer.java: @ANTLR.VERSION@ --> 260 [replace] Replacing in E:\my\rabook\tmp\CSVLexerTokenTypes.java: @ANTLR.VERSION@ --> 260 It looks that it tries to execute the 2nd classpath
entry.
However the line that shows the generated java command looks
ok to me.
I get this result both on ant 1.2 & 1.3.
- When i'm building with target antlr.270.csv (using only 1
classpath entry), i get a correct result.
- When i'm trying to build without a fork i get a correct result (see build.xml) Does anyone recognize this behaviour & have an idea what
is going on here?
Thanks,
Rintcius Blok
|
<?xml version="1.0"?>
<!-- ======================================================================= -->
<!-- Ant own build file -->
<!-- ======================================================================= -->
<project name="Rabook" default="main" basedir=".">
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
<property file="${user.home}/ant.properties" />
<property name="Name" value="Rabook"/>
<property name="name" value="rabook"/>
<property name="version" value="tbd"/>
<property name="java.lib" value="E:\java\lib"/>
<property name="src.dir" value="src"/>
<property name="src.java.dir" value="${src.dir}/java"/>
<property name="jbuilder.java.dir" value="jbuilder/com/rintcius"/>
<property name="tmp.dir" value="tmp"/>
<path id="lib.antlr.260">
<pathelement location="E:\my\java\tmp\antlr_test" />
<pathelement location="${java.lib}\antlr-2.6.0" />
</path>
<path id="lib.antlr.270">
<pathelement location="${java.lib}\antlr-2.7.0" />
</path>
<patternset id="non-generated.java.files" >
<exclude name="**/antlr/**/*Lexer.java" />
<exclude name="**/antlr/**/*LexerTokenTypes.*" />
<exclude name="**/antlr/**/*Parser.java" />
</patternset>
<patternset id="backup.java.files" >
<include name="**/*.jold" />
<include name="**/*.jbak" />
</patternset>
<target name="init">
<tstamp/>
<echo message="${DSTAMP} ${TSTAMP} ${TODAY}" />
</target>
<!-- =================================================================== -->
<!-- Synchronizes src/java with jbuilder -->
<!-- =================================================================== -->
<target name="synch.java" depends ="init">
<copy todir="${jbuilder.java.dir}" >
<fileset dir="${src.java.dir}" >
</fileset>
</copy>
<copy todir="${src.java.dir}" >
<fileset dir="${jbuilder.java.dir}" >
<patternset refid="non-generated.java.files" />
</fileset>
</copy>
</target>
<target name="clean" depends ="init">
<delete>
<fileset dir="." >
<patternset refid="backup.java.files" />
</fileset>
</delete>
</target>
<target name="antlr.270.csv" >
<antcall target="antlr">
<param name="p.classpath.refid" value="lib.antlr.270"/>
<param name="p.grammar.file" value="csv.g"/>
<param name="p.target.dir" value="${jbuilder.java.dir}\antlr\270"/>
</antcall>
<replace dir="${tmp.dir}" token="@ANTLR.VERSION@" value="270">
<include name="*.java" />
</replace>
</target>
<target name="antlr.260.csv" >
<antcall target="antlr">
<param name="p.classpath.refid" value="lib.antlr.260"/>
<param name="p.grammar.file" value="csv.g"/>
<param name="p.target.dir" value="${jbuilder.java.dir}\antlr\260"/>
</antcall>
<replace dir="${tmp.dir}" token="@ANTLR.VERSION@" value="260">
<include name="*.java" />
</replace>
</target>
<target name="antlr" depends ="init">
<mkdir dir="${p.target.dir}" />
<copy file="src\antlr\${p.grammar.file}" todir="${p.target.dir}" />
<java classname="antlr.Tool" fork="yes" dir = "${p.target.dir}">
<arg value="${p.grammar.file}" />
<classpath refid="${p.classpath.refid}" />
</java>
<delete file="${p.target.dir}\${p.grammar.file}" />
</target>
</project>
<?xml version="1.0"?>
<!-- ======================================================================= -->
<!-- Ant own build file -->
<!-- ======================================================================= -->
<project name="Rabook" default="main" basedir=".">
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
<property file="${user.home}/ant.properties" />
<property name="Name" value="Rabook"/>
<property name="name" value="rabook"/>
<property name="version" value="tbd"/>
<property name="java.lib" value="E:\java\lib"/>
<property name="src.dir" value="src"/>
<property name="src.java.dir" value="${src.dir}/java"/>
<property name="jbuilder.java.dir" value="jbuilder/com/rintcius"/>
<property name="tmp.dir" value="tmp"/>
<path id="lib.antlr.260">
<pathelement location="E:\my\java\tmp\antlr_test" />
<pathelement location="${java.lib}\antlr-2.6.0" />
</path>
<path id="lib.antlr.270">
<pathelement location="${java.lib}\antlr-2.7.0" />
</path>
<patternset id="non-generated.java.files" >
<exclude name="**/antlr/**/*Lexer.java" />
<exclude name="**/antlr/**/*LexerTokenTypes.*" />
<exclude name="**/antlr/**/*Parser.java" />
</patternset>
<patternset id="backup.java.files" >
<include name="**/*.jold" />
<include name="**/*.jbak" />
</patternset>
<target name="init">
<tstamp/>
<echo message="${DSTAMP} ${TSTAMP} ${TODAY}" />
</target>
<!-- =================================================================== -->
<!-- Synchronizes src/java with jbuilder -->
<!-- =================================================================== -->
<target name="synch.java" depends ="init">
<copy todir="${jbuilder.java.dir}" >
<fileset dir="${src.java.dir}" >
</fileset>
</copy>
<copy todir="${src.java.dir}" >
<fileset dir="${jbuilder.java.dir}" >
<patternset refid="non-generated.java.files" />
</fileset>
</copy>
</target>
<target name="clean" depends ="init">
<delete>
<fileset dir="." >
<patternset refid="backup.java.files" />
</fileset>
</delete>
</target>
<target name="antlr.270.csv" >
<antcall target="antlr">
<param name="p.classpath.refid" value="lib.antlr.270"/>
<param name="p.grammar.file" value="csv.g"/>
<param name="p.target.dir" value="${jbuilder.java.dir}\antlr\270"/>
</antcall>
<replace dir="${tmp.dir}" token="@ANTLR.VERSION@" value="270">
<include name="*.java" />
</replace>
</target>
<target name="antlr.260.csv" >
<antcall target="antlr">
<param name="p.classpath.refid" value="lib.antlr.260"/>
<param name="p.grammar.file" value="csv.g"/>
<param name="p.target.dir" value="${jbuilder.java.dir}\antlr\260"/>
</antcall>
<replace dir="${tmp.dir}" token="@ANTLR.VERSION@" value="260">
<include name="*.java" />
</replace>
</target>
<target name="antlr" depends ="init">
<mkdir dir="${p.target.dir}" />
<copy file="src\antlr\${p.grammar.file}" todir="${p.target.dir}" />
<java classname="antlr.Tool" dir = "${p.target.dir}">
<arg value="${p.target.dir}\${p.grammar.file}" />
<classpath refid="${p.classpath.refid}" />
</java>
<delete file="${p.target.dir}\${p.grammar.file}" />
</target>
</project>
