From JBoniakowski@nntllc.com Tue Jan 9 19:29:05 2001 Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 44129 invoked from network); 9 Jan 2001 19:29:05 -0000 Received: from relay1.nw.smtp.psi.net (38.9.154.2) by h31.sny.collab.net with SMTP; 9 Jan 2001 19:29:05 -0000 Received: from nntllc.com ([38.138.100.8] helo=nntnys4.nntllc.com) by relay1.nw.smtp.psi.net with esmtp (Exim 3.13 #3) id 14G4SC-0000re-00 for ant-user@jakarta.apache.org; Tue, 09 Jan 2001 14:29:09 -0500 Received: by nntllc.com with Internet Mail Service (5.5.2650.21) id ; Tue, 9 Jan 2001 14:25:50 -0500 Message-ID: From: "Boniakowski,Jeb" To: "'ant-user@jakarta.apache.org'" Subject: RE: ant and I have a failure to communicate (on compile targets/j avac tasks) Date: Tue, 9 Jan 2001 14:25:43 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C07A71.F547F240" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C07A71.F547F240 Content-Type: text/plain; charset="ISO-8859-1" 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): > > classpath="${compile.classpath}" > debug="on" optimize="off" deprecation="off"/> > > 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, won't complain about not finding > any. You might > want to try explicitly 'ing Foo.java and see what > happens that > way. > > Diane > > --- "Boniakowski,Jeb" 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: > > > > > > > classpath="${deploy.home}/WEB-INF/classes" > > debug="on" optimize="off" deprecation="off"/> > > > > > > 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/ > ------_=_NextPart_001_01C07A71.F547F240 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable RE: ant and I have a failure to communicate (on compile = targets/javac tasks)

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=3D"compile">
>     <javac = srcdir=3D"src" destdir=3D"${out.dir}"
>          = ;  classpath=3D"${compile.classpath}"
>          = ;  debug=3D"on" optimize=3D"off" = deprecation=3D"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=3D"compile" depends=3D"prepare">
> >     <javac = srcdir=3D"src" = destdir=3D"${deploy.home}/WEB-INF/classes"
> = >            = classpath=3D"${deploy.home}/WEB-INF/classes"
> = >            = debug=3D"on" optimize=3D"off" = deprecation=3D"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.
> >
>
>
> =3D=3D=3D=3D=3D
> (holtdl@yahoo.com)
>
>
>
> = __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos = online!
> http://photos.yahoo.com/
>

------_=_NextPart_001_01C07A71.F547F240--