ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boniakowski,Jeb" <JBoniakow...@nntllc.com>
Subject RE: ant and I have a failure to communicate (on compile targets/j avac tasks)
Date Tue, 09 Jan 2001 21:56:53 GMT
probably an old version, though I don't know how to check.  I downloaded it
last summer (I've been away from my job at school since september, and now
I'm back).  Is that a known bug with the <javac> task?  Also, I edited my
script to try "java -D...blahtomcatblah.ant.Main -debug" so it can't be my
script (build is indeed a wrapper script around ant, sorry, I thought that
was the stock config.  Shoulda mentioned that.)  Thanks for your help.  I
guess I'll d/l the newest version in any case.

jeb.

> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Tuesday, January 09, 2001 4:37 PM
> To: ant-user@jakarta.apache.org
> Subject: RE: ant and I have a failure to communicate (on compile
> targets/j avac tasks)
> 
> 
> It says it's compiling 30 files, but nothing ends up being 
> compiled? That
> sounds like an old <javac> bug... what version of Ant are you running?
> 
> Also, what's 'build'? Is that a wrapper-script on top of Ant? 
> Ant allows
> for a "-debug" flag, so I'm not sure why 'build' would 
> complain about it,
> if 'build' is a script that hands off to Ant.
> 
> Diane
> 
> --- "Boniakowski,Jeb" <JBoniakowski@nntllc.com> wrote:
> > Hmm...I don't know why it was saying 18 before.  I built 
> all and now it
> > says
> > 30, so those must have been files I'd touched or something, 
> but now it
> > says
> > 30 every time (there *are* 30 .java files in src/, though).  Now it
> > says,
> > "compiling 30 src files to the dir" and completes it in 0 
> seconds, which
> > would be amazing, except the files are compiled at all.  What do you
> > mean
> > "running it -debug"?  "build -debug" = "Unknown arg".  
> Putting -debug in
> > the
> > scrip after "Main" = the same thing.  "debug=on" in my 
> <compile> target.
> > Also, running it -verbose doesn't tell me anything about 
> these 30 files
> > that
> > are supposedly being compiled.
> > 
> > jeb.
> > 
> > > -----Original Message-----
> > > From: Diane Holt [mailto:holtdl@yahoo.com]
> > > Sent: Tuesday, January 09, 2001 3:00 PM
> > > To: ant-user@jakarta.apache.org
> > > Subject: RE: ant and I have a failure to communicate (on compile
> > > targets/j avac tasks)
> > > 
> > > 
> > > Where are the 18 source-files it says it -is- compiling 
> located? Also,
> > > have you tried running it -debug to see what <javac> has to 
> > > say about any
> > > of the .java files it does find?
> > > 
> > > Diane
> > > 
> > > --- "Boniakowski,Jeb" <JBoniakowski@nntllc.com> wrote:
> > > > I created a "src/foo/Foo.java" in addition to my 
> "src/Foo.java". 
> > > > Neither of
> > > > them is attempted to be compiled.  My basedir was 
> > > previously "." and I
> > > > was
> > > > executing ant in the dir above src.  That's when I 
> emailed the list.
> > > > However, I've tried hardcoding in both my basedir for 
> the project
> > > > ("/home/jeb/projects/ordermgmt") and the srcdir for the 
> > > compile target
> > > > ("/home/jeb/projects/ordermgmt/src") and neither 
> changes anything.
> > > > 
> > > > with those set as above, here is some output from my shell:
> > > > 
> > > > $ ls src/foo/
> > > > Foo.java
> > > > $ less src/foo/Foo.java
> > > > public class Foo{
> > > >         this should break the compiler
> > > > }
> > > > $ build
> > > > Buildfile: build.xml
> > > > Project base dir set to: C:\home\jeb\projects\ordermgmt
> > > > Executing Target: prepare
> > > > Executing Target: compile
> > > > Compiling 18 source files to
> > > > \jdk1.3\jakarta-tomcat\webapps\nnt\WEB-INF\classes
> > > > Performing a Modern Compile
> > > > Completed in 1 seconds
> > > > 
> > > > 
> > > > If I go into build.xml and change srcdir in the compile 
> target to be
> > > > nonsense, ant exits with a "dir does not exist!" error, so 
> > > it's finding
> > > > the
> > > > directory, it's just not taking a shot at the .java 
> files contained
> > > > therein.
> > > > 
> > > > jeb.
> > > > 
> > > > 
> > > > > -----Original Message-----
> > > > > From: Diane Holt [mailto:holtdl@yahoo.com]
> > > > > Sent: Tuesday, January 09, 2001 1:00 PM
> > > > > To: ant-user@jakarta.apache.org
> > > > > Subject: Re: ant and I have a failure to communicate 
> (on compile
> > > > > targets/javac tasks)
> > > > > 
> > > > > 
> > > > > Jeb,
> > > > > 
> > > > > I just tested this, and it worked fine for me (although I did 
> > > > > change a few
> > > > > things in the target, to make it match my dirs/classpath):
> > > > >   <target name="compile">
> > > > >     <javac srcdir="src" destdir="${out.dir}"
> > > > >            classpath="${compile.classpath}"
> > > > >            debug="on" optimize="off" deprecation="off"/>
> > > > >   </target>
> > > > > I created "src/foo" under my basedir, then put your Foo.java 
> > > > > in src/foo,
> > > > > ran 'ant', and it resulted in:
> > > > > Buildfile: test.xml
> > > > > Target: compile
> > > > >     [javac] Compiling 1 source file to 
> D:\dianeh\src\main\classes
> > > > >     [javac] D:\dianeh\src\main\src\foo\Foo.java(1): 
> Type expected
> > > > >     [javac] 1 error(s), 0 warning(s)
> > > > > 
> > > > > BUILD FAILED
> > > > > test.xml:200: Compile failed, messages should have 
> been provided.
> > > > > Total time: 1 second
> > > > > 
> > > > > Are you sure that the "src" dir that's relative to your 
> > > > > "basedir" is the
> > > > > one that contains your java source? If there aren't any .java 
> > > > > files in the
> > > > > srcdir pointed to, <javac> won't complain about not finding

> > > > > any. You might
> > > > > want to try explicitly <include>'ing Foo.java and see what

> > > > > happens that
> > > > > way.
> > > > > 
> > > > > Diane
> > > > > 
> > > > > --- "Boniakowski,Jeb" <JBoniakowski@nntllc.com> wrote:
> > > > > > Hi.  Sorry for this admittedly annoying type of question, 
> > > > > but I can't
> > > > > > figure
> > > > > > out the answer, after reading everything else I could find.
> > > > > > 
> > > > > > I'm using basically the included build.xml.  Here's the 
> > > > > compile target:
> > > > > > 
> > > > > >   <target name="compile" depends="prepare">
> > > > > >     <javac srcdir="src" 
> destdir="${deploy.home}/WEB-INF/classes"
> > > > > >            classpath="${deploy.home}/WEB-INF/classes"
> > > > > >            debug="on" optimize="off" deprecation="off"/>
> > > > > >   </target>
> > > > > > 
> > > > > > Haven't changed it all.  All of my directories are set up 
> > > > > as suggested
> > > > > > by
> > > > > > the docs.
> > > > > > 
> > > > > > The comment in build.xml says that the "javac" task should 
> > > > > recurse down
> > > > > > the
> > > > > > dir tree compiling classes that don't exist or are 
> > > newer than their
> > > > > > .class
> > > > > > files.  Well, mine doesn't even go down one level.  If I 
> > > > > put a file in
> > > > > > src
> > > > > > that looks like this:
> > > > > > 
> > > > > > Foo.java: 
> > > > > > 	public class Foo{ break compiler }
> > > > > > 
> > > > > > Ant marches on ahead without complaint.  There is no 
> > > Foo.class in my
> > > > > > {deploy.home}/WEB-INF/classes directory.  It copies 
> > > > > non-.java files from
> > > > > > my
> > > > > > src/ dir fine.  If I do "build clean", my webapps/nnt (name

> > > > > of my app)
> > > > > > is
> > > > > > deleted.  If I do build all, it is deleted and then all of 
> > > > > the classes
> > > > > > are
> > > > > > copied back to the same place and work fine and all, but 
> > > > > only if I go
> > > > > > through the src/ try and manually compile them first.
> > > > > > 
> > > > > > Does anyone have any idea what I am missing here?
> > > > > > 
> > > > > > jeb.
> > > > > > 
> > > > > 
> > > > > 
> > > > > =====
> > > > > (holtdl@yahoo.com)
> > > > > 
> > > > > 
> > > > > 
> > > > > __________________________________________________
> > > > > Do You Yahoo!?
> > > > > Yahoo! Photos - Share your holiday photos online!
> > > > > http://photos.yahoo.com/
> > > > > 
> > > > 
> > > 
> > > 
> > > =====
> > > (holtdl@yahoo.com)
> > > 
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Photos - Share your holiday photos online!
> > > http://photos.yahoo.com/
> > > 
> > 
> 
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> 

Mime
View raw message