wood burning stoves 2.0*
The moose likes Cattle Drive and the fly likes New version of Ant and Assignment 3b Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "New version of Ant and Assignment 3b" Watch "New version of Ant and Assignment 3b" New topic
Author

New version of Ant and Assignment 3b

Mark Beattie
Greenhorn

Joined: Mar 30, 2006
Posts: 26
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

Joined: Jul 22, 2000
Posts: 9043
    
  10
Thanks, Mark. Feel free to let me know if you find any more goofs.
[ August 09, 2006: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
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

Joined: Mar 30, 2006
Posts: 26
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

Joined: Jul 22, 2000
Posts: 9043
    
  10
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

Joined: Mar 30, 2006
Posts: 26
Hi Marilyn,

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

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New version of Ant and Assignment 3b
 
Similar Threads
unable to run ant after unzipping binary distrbtn
com folders everywhere......
Need Servlets 4a Help
Help in Ant
Servlets-3b Ant deploy issue