ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 3198] - The <javac> task doesn't work properly with multi-element sourceparh
Date Sat, 29 Dec 2001 10:31:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3198>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3198

The <javac> task doesn't work properly with multi-element sourceparh





------- Additional Comments From mikael.staldal@home.se  2001-12-29 02:31 -------
It doesn't work if you have the same source file in both source directories.

    <javac srcdir="src1" destdir="out">
      <src path="src2" />
      <include name="a/Foo.java" />
    </javac>

Gives:

Ant version 1.4.1 compiled on October 11 2001
Buildfile: test.ant
Detected Java version: 1.3 in: C:\jdk1.3.1\jre
Detected OS: Windows 2000
parsing buildfile C:\home\mikes\workarea\test.ant with URI = 
file:C:/home/mikes/workarea/test.ant
Project base dir set to: C:\home\mikes\workarea
Build sequence for target `test' is [test]
Complete build sequence is [test]

test:
    [javac] a\Foo.java added as C:\home\mikes\workarea\out\a\Foo.class doesn't 
exist.
    [javac] a\Foo.java added as C:\home\mikes\workarea\out\a\Foo.class doesn't 
exist.
    [javac] Compiling 2 source files to C:\home\mikes\workarea\out
    [javac] Using modern compiler
    [javac] Compilation args: -d C:\home\mikes\workarea\out -classpath 
C:\home\mikes\workarea\out;C:\jdk1.3.1
\lib\tools.jar;C:\javaInstall\ant\lib\jaxp.jar;C:\javaInstall\ant\lib\jakarta-
ant-1.4.1-
optional.jar;C:\javaInstall\ant\lib\crimson.jar;C:\javaInstall\ant\lib\ant.jar -
sourcepath C:\home\mikes\workarea\src2;C:\home\mikes\workarea\src1 -g:none
    [javac] Files to be compiled:
    C:\home\mikes\workarea\src2\a\Foo.java
    C:\home\mikes\workarea\src1\a\Foo.java

    [javac] C:\home\mikes\workarea\src1\a\Foo.java:5: duplicate class: a.Foo
    [javac] public class Foo
    [javac]        ^
    [javac] 1 error

BUILD FAILED

C:\home\mikes\workarea\test.ant:7: Compile failed, messages should have been 
provided.
	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:559)
	at org.apache.tools.ant.Task.perform(Task.java:217)
	at org.apache.tools.ant.Target.execute(Target.java:184)
	at org.apache.tools.ant.Target.performTasks(Target.java:202)
	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
	at org.apache.tools.ant.Project.executeTargets(Project.java:560)
	at org.apache.tools.ant.Main.runBuild(Main.java:454)
	at org.apache.tools.ant.Main.start(Main.java:153)
	at org.apache.tools.ant.Main.main(Main.java:176)

Total time: 4 seconds

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message