ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Newbie to ant 1.6.1 is trying to compile with j2sdk1.5.0
Date Mon, 15 Mar 2004 16:09:49 GMT
It looks like a problem with the 1.5.0 beta 1 implemention.

ThreadLocal<Integer> works but:
InheritableThreadLocal<Integer> does not.

Peter

Hunt, Thomas (Contractor) wrote:

>I'm trying to compile my java program using ant 1.6.1 with jdk 1.5
>Compile fails like this...
>compile:
>    [javac] Compiling 4 source files to C:\myjava\jsr166\build
>    [javac] C:\myjava\jsr166\src\test\tck\ThreadLocalTest.java:27: type java.lan
>g.InheritableThreadLocal does not take parameters
>    [javac]     static InheritableThreadLocal<Integer> itl =
>    [javac]                                  ^
>    [javac] C:\myjava\jsr166\src\test\tck\ThreadLocalTest.java:28: type java.lan
>g.InheritableThreadLocal does not take parameters
>    [javac]         new InheritableThreadLocal<Integer>() {
>    [javac]                                   ^
>    [javac] 2 errors
>
>BUILD FAILED
>
>The compiler does not recognize the 1.5 language feature call Generics.
>
>My compile target looks like this...
>
>   <target name="compile" depends="init">
>      <javac srcdir="src" destdir="build"
>       executable="${java.home}\bin\javac"
>       optimize="off"
>       debug="on"
>       source="1.5"
>	   includes="test\**"
>	   excludes="util\**"
>	   >
>      <classpath refid="classpath" />
>    </javac>
>   </target>
>
>What am I doing wrong?
>
>Here is a copy of the "ant -debug" output...
>C:\myjava\jsr166>ant -debug
>Apache Ant version 1.6.1 compiled on February 12 2004
>Buildfile: build.xml
>Adding reference: ant.PropertyHelper
>Detected Java version: 1.5 in: C:\java\j2sdk1.5.0\jre
>Detected OS: Windows 2000
>Adding reference: ant.ComponentHelper
>Setting ro project property: ant.version -> Apache Ant version 1.6.1 compiled on
> February 12 2004
>Setting ro project property: ant.file -> C:\myjava\jsr166\build.xml
>Adding reference: ant.projectHelper
>Adding reference: ant.parsing.context
>Adding reference: ant.targets
>parsing buildfile C:\myjava\jsr166\build.xml with URI = file:///C:/myjava/jsr166
>/build.xml
>Setting ro project property: ant.project.name -> JSR166 By Tommy Hunt
>Adding reference: JSR166 By Tommy Hunt
>Setting ro project property: ant.file.JSR166 By Tommy Hunt -> C:\myjava\jsr166\b
>uild.xml
>Project base dir set to: C:\myjava\jsr166
> +Target:
>Adding reference: classpath
> +Target: clean
> +Target: init
> +Target: compile
> +Target: dist
> +Target: properties
>Override ignored for property ant.java.version
>Setting project property: build.compiler -> javac1.5
> [property] Loading C:\myjava\jsr166\java.home
> [property] Unable to find property file: C:\myjava\jsr166\java.home
>Setting project property: src -> C:\myjava\jsr166\src
>Setting project property: build -> C:\myjava\jsr166\build
>Setting project property: dist -> C:\myjava\jsr166\lib
>Setting project property: junit -> C:\java\junit3.8.1
>Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) fo
>r type image
>Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
>Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
>Could not load a dependent class (org/apache/commons/net/SocketClient) for type
>rexec
>Adding reference: classpath
>Build sequence for target `compile' is [init, compile]
>Complete build sequence is [init, compile, properties, clean, dist, ]
>
>init:
>Setting project property: DSTAMP -> 20040315
>Setting project property: TSTAMP -> 0933
>Setting project property: TODAY -> March 15 2004
>
>compile:
>Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) fo
>r type image
>Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
>Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
>Could not load a dependent class (org/apache/commons/net/SocketClient) for type
>rexec
>Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type
> cvsversion
>Could not load a dependent class (com/starbase/starteam/Item) for type stlist
>Could not load a dependent class (org/apache/commons/net/SocketClient) for type
>telnet
>Could not load a dependent class (org/apache/commons/net/SocketClient) for type
>ftp
>Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
>Could not load a dependent class (com/starbase/starteam/Item) for type stcheckin
>
>Could not load a dependent class (com/starbase/starteam/Item) for type stcheckou
>t
>fileset: Setup scanner in dir C:\myjava\jsr166\src with patternSet{ includes: [t
>est\**] excludes: [util\**] }
>    [javac] test\tck\AbstractExecutorServiceTest.j skipped - don't know how to h
>andle it
>    [javac] test\tck\JSR166TestCase.java added as test/tck/JSR166TestCase.class
>doesn't exist.
>    [javac] test\tck\ThreadLocalTest.java added as test/tck/ThreadLocalTest.clas
>s doesn't exist.
>    [javac] test\tck\ThreadPoolExecutorTest.j skipped - don't know how to handle
> it
>    [javac] test\tck\ThreadTest.java added as test/tck/ThreadTest.class doesn't
>exist.
>    [javac] test\tck\TimeUnitTest.java added as test/tck/TimeUnitTest.class does
>n't exist.
>    [javac] Compiling 4 source files to C:\myjava\jsr166\build
>    [javac] Using modern compiler
>    [javac] Compilation arguments:
>    [javac] '-d'
>    [javac] 'C:\myjava\jsr166\build'
>    [javac] '-classpath'
>    [javac] 'C:\myjava\jsr166\build;C:\java\j2sdk1.5.0\jre\lib\rt.jar;C:\java\ju
>nit3.8.1\junit.jar;C:\java\apache-ant-1.6.1\lib\ant-launcher.jar;C:\myjava\jsr16
>6;C:\java\apache-ant-1.6.1\lib\ant-antlr.jar;C:\java\apache-ant-1.6.1\lib\ant-ap
>ache-bsf.jar;C:\java\apache-ant-1.6.1\lib\ant-apache-resolver.jar;C:\java\apache
>-ant-1.6.1\lib\ant-commons-logging.jar;C:\java\apache-ant-1.6.1\lib\ant-commons-
>net.jar;C:\java\apache-ant-1.6.1\lib\ant-icontract.jar;C:\java\apache-ant-1.6.1\
>lib\ant-jai.jar;C:\java\apache-ant-1.6.1\lib\ant-jakarta-bcel.jar;C:\java\apache
>-ant-1.6.1\lib\ant-jakarta-log4j.jar;C:\java\apache-ant-1.6.1\lib\ant-jakarta-or
>o.jar;C:\java\apache-ant-1.6.1\lib\ant-jakarta-regexp.jar;C:\java\apache-ant-1.6
>.1\lib\ant-javamail.jar;C:\java\apache-ant-1.6.1\lib\ant-jdepend.jar;C:\java\apa
>che-ant-1.6.1\lib\ant-jmf.jar;C:\java\apache-ant-1.6.1\lib\ant-jsch.jar;C:\java\
>apache-ant-1.6.1\lib\ant-junit.jar;C:\java\apache-ant-1.6.1\lib\ant-netrexx.jar;
>C:\java\apache-ant-1.6.1\lib\ant-nodeps.jar;C:\java\apache-ant-1.6.1\lib\ant-sta
>rteam.jar;C:\java\apache-ant-1.6.1\lib\ant-stylebook.jar;C:\java\apache-ant-1.6.
>1\lib\ant-swing.jar;C:\java\apache-ant-1.6.1\lib\ant-trax.jar;C:\java\apache-ant
>-1.6.1\lib\ant-vaj.jar;C:\java\apache-ant-1.6.1\lib\ant-weblogic.jar;C:\java\apa
>che-ant-1.6.1\lib\ant-xalan1.jar;C:\java\apache-ant-1.6.1\lib\ant-xalan2.jar;C:\
>java\apache-ant-1.6.1\lib\ant-xslp.jar;C:\java\apache-ant-1.6.1\lib\ant.jar;C:\j
>ava\apache-ant-1.6.1\lib\xercesImpl.jar;C:\java\apache-ant-1.6.1\lib\xml-apis.ja
>r;C:\java\j2sdk1.5.0\lib\tools.jar'
>    [javac] '-sourcepath'
>    [javac] 'C:\myjava\jsr166\src'
>    [javac] '-g'
>    [javac] '-source'
>    [javac] '1.5'
>    [javac]
>    [javac] The ' characters around the executable and arguments are
>    [javac] not part of the command.
>    [javac] Files to be compiled:
>    [javac]     C:\myjava\jsr166\src\test\tck\JSR166TestCase.java
>    [javac]     C:\myjava\jsr166\src\test\tck\ThreadLocalTest.java
>    [javac]     C:\myjava\jsr166\src\test\tck\ThreadTest.java
>    [javac]     C:\myjava\jsr166\src\test\tck\TimeUnitTest.java
>    [javac] C:\myjava\jsr166\src\test\tck\ThreadLocalTest.java:27: type java.lan
>g.InheritableThreadLocal does not take parameters
>    [javac]     static InheritableThreadLocal<Integer> itl =
>    [javac]                                  ^
>    [javac] C:\myjava\jsr166\src\test\tck\ThreadLocalTest.java:28: type java.lan
>g.InheritableThreadLocal does not take parameters
>    [javac]         new InheritableThreadLocal<Integer>() {
>    [javac]                                   ^
>    [javac] 2 errors
>
>BUILD FAILED
>C:\myjava\jsr166\build.xml:43: Compile failed; see the compiler error output for
> details.
>        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944)
>        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
>        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
>        at org.apache.tools.ant.Task.perform(Task.java:364)
>        at org.apache.tools.ant.Target.execute(Target.java:301)
>        at org.apache.tools.ant.Target.performTasks(Target.java:328)
>        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
>        at org.apache.tools.ant.Main.runBuild(Main.java:632)
>        at org.apache.tools.ant.Main.startAnt(Main.java:183)
>        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
>        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
>
>Total time: 3 seconds
>
>
>What am I doing wrong?
>
>thanks,
>tommy~
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message