Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New version of Ant and Assignment 3b

 
Mark Beattie
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marilyn,

The new version of steps to create War files and how to use Ant is much less painful now

Because it looks as if I am the first user of the new version I thought I had better provide you some suggestions.

1. build.xml has a small typo

line 33 is missing a quote mark at the end of ...INF/web.xml ...:

<fileset dir='${src.dir}/web' excludes='WEB-INF/web.xml />

2. Directory Structure

The lib directory is confusing because it looks as if it belongs under

java\bee
\lib

Instead it should go directly under java

java
\lib

3. Deploying to Orion

It'll be clearer to say "c:\java\bee directory" instead of just "c:\java directory". [Two locations]

[ August 09, 2006: Message edited by: Mark Beattie ]

[ August 09, 2006: Message edited by: Mark Beattie ]
[ August 09, 2006: Message edited by: Marilyn de Queiroz ]
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Mark. Feel free to let me know if you find any more goofs.
[ August 09, 2006: Message edited by: Marilyn de Queiroz ]
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that I can see the rest of the post ...
1)
fixed
2)
Actually lib, and src go in bee which goes in c:\java
so after you build, you end up with
c:\java\bee\build\classes(built stuff)
c:\java\bee\build\dist\(war file)
c:\java\bee\src\java\(*.java files)
c:\java\bee\src\web\(web pages)
c:\java\bee\src\web\WEB-INF\web.xml
c:\java\bee\lib\production\jr.jar
c:\java\bee\build.xml
3)
Can you give me a little more context?
 
Mark Beattie
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding 2)
When I run ant using build.xml from with c:/java/bee I get a fail message saying:

BUILD FAILED
C:\Java\build.xml:29: C:\Java\lib\production not found.

So I set up the directory as indicated in my email and it worked fine.

Regarding 3)
When I ran 'ant ffbuild deploy' from c:/java nothing was deployed to my orion directory. I So I changed to c:/java/bee then ran 'ant ffbuild deploy'. This time everything worked perfectly.
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Beattie:
Regarding 2)
When I run ant using build.xml from with c:/java/bee I get a fail message saying:

BUILD FAILED
C:\Java\build.xml:29: C:\Java\lib\production not found.

So I set up the directory as indicated in my email and it worked fine.


Somethin's not right. If build.xml is in c:/java/bee, then everything should be from there down (i.e. c:/java/bee/lib/production), not back up in c:/java

Regarding 3)
When I ran 'ant ffbuild deploy' from c:/java nothing was deployed to my orion directory. I So I changed to c:/java/bee then ran 'ant ffbuild deploy'. This time everything worked perfectly.


I recommend that you remove build.xml from c:/java. If you try to run ant from c:/java, you should get something like:
Buildfile: build.xml does not exist!
Build failed

This could also be the cause of the other problem as well.

I fixed the sentence before ant script to read
"Copy the following code to c:\java\bee\build.xml"
and the one I believe you're referring to in the next section to be
'Run "ant deploy" from the c:\java\bee directory to compile all the source files, build a "war file" (Web ARchive file) and deploy it to the proper directory in orion.'

In other words, all your ant commands should be run from the location of the build.xml file, in this case c:\java\bee\

Good input. Keep it coming.
[ August 09, 2006: Message edited by: Marilyn de Queiroz ]
 
Mark Beattie
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marilyn,

Disregard my comment about issue 2. Ant is working as expected according to the assignment.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic