my dog learned polymorphism*
The moose likes Ant, Maven and Other Build Tools and the fly likes Issue in making axis2.war Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Issue in making axis2.war" Watch "Issue in making axis2.war" New topic
Author

Issue in making axis2.war

ashirvad jain
Ranch Hand

Joined: Nov 09, 2006
Posts: 50
Hello frens,
I am new to Ant. My purpose is to make axis2.war file for netbeans axis support. So i wanna create axis2.war.
So i downloaded the apache-ant-1.7.1.zip and extract
it at C:\Documents and Settings\Desktop\Desktop\apache-ant-1.7.1.
After this i added a classpath=C:\Documents and Settings\Desktop\Desktop\apache-ant-1.7.1\bin
I already extratced axis2-1.4. to C:\Program Files\axis2-1.4.

Now when i am trying to generate axis2.war file from command prompt like this.

1)C:\Documents and Settings\Desktop\Desktop\apache-ant-1.7.1\bin>ant C:\Program Files\axis2-1.4\webapp
it simply says build failed. build .xml not present
But i am seeing it ,it is there.

2)so now i try different way,which might look bit stupid,
C:\Program Files\axis2-1.4\webapp> set CLASSPATH=C:\Documents and Settings\Desktop\Desktop\apache-ant-1.7.1\bin AND THEN
C:\Program Files\axis2-1.4\webapp>ant
then it says no ant internal command like this...

please someone help me to figure it out .How it should work.and what should i do to generate axis2.war file.

Thanks in Advance
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42042
    
  64
The CLASSPATH is for classes, not for binaries, so you should not point it to Ant's bin directory. You may be confusing it with PATH.


Ping & DNS - my free Android networking tools app
ashirvad jain
Ranch Hand

Joined: Nov 09, 2006
Posts: 50
Thanks for your reply.
Actaully i am following instruction from,
http://ws.apache.org/axis2/1_3/installationguide.html

which say as below,

Locate the Ant build file (build.xml) inside the webapp directory, which resides in your Axis2 home directory (i.e:- $AXIS_HOME/webapp)". Run the Ant build by executing "ant create.war" inside the $AXIS2_HOME/webapps folder. You can find the generated axis2.war inside the $AXIS2_HOME/dist directory.
according to this when i run,
C:\Documents and Settings\Desktop\Desktop\apache-ant-1.7.1\bin>ant :\Program Files\axis2-1.4\webapp

output:- Buildfile: build.xml does not exist!
Build failed
But build.xml is present in the same folder.

Please guide me if i am doing something wrong here.
ashirvad jain
Ranch Hand

Joined: Nov 09, 2006
Posts: 50
Sorry the path says,

C:\Documents and Settings\Desktop\Desktop\apache-ant-1.7.1\bin>ant C:\Program Files\axis2-1.4\webapp

output:- Buildfile: build.xml does not exist!
Build failed
But build.xml is present in the same folder.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42042
    
  64
It says "Run the Ant build by executing "ant create.war" inside the $AXIS2_HOME/webapps folder.", but the command prompt indicates that you're in the ANT bin directory. You need to change directories to be in the same directory as the build.xml file; then it should work.

To make it easier for yourself, you should add "C:\Documents and Settings\Desktop\Desktop\apache-ant-1.7.1\bin" to your PATH variable.
ashirvad jain
Ranch Hand

Joined: Nov 09, 2006
Posts: 50
Hi Ulf,
Thanks for your kind response.

Actually i ran the same thing yesterday but it was not working.
But after getting your nice response i tries the same thing now its Eureka . And now its working .

Thanks alot.

Can you suggest me more information about this ans usage. Is this really necessary for application developement.

Again Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42042
    
  64
Using Ant in general is very helpful (I use it for just about all my projects). I'm not sure you need to do it in this case, though - why do you need to build the Axis war file?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16101
    
  21

Originally posted by ashirvad jain:


Can you suggest me more information about this ans usage. Is this really necessary for application developement.


A long time ago, I used to use Windows batch files for building Java projects. It was crude, unpleasant, and only worked in Windows. I frequently work on a variety of other platforms.

It took me a while to warm up to Ant, but Ant understands Java and the Ant build scripts can almost always work unmodified on any OS platform that supports Java development.

More recently, I've (finally) gotten to be more or less friends with Maven. Maven has its annoyances, but it's good for projects that pull in a lot of external libraries and for collaboration between people who may never meet face-to-face. Most, though not all, of the major open-source projects are built with Maven. I think Axis is a holdout as is Tomcat.


Customer surveys are for companies who didn't pay proper attention to begin with.
ashirvad jain
Ranch Hand

Joined: Nov 09, 2006
Posts: 50
Thanks for your kind response.

SO now i got it .

But can you provide me more detail about its functioning and other document.

Like wise,i am seeing that some elements changes in build.xml is just everything...
but i am sure it must be more than it.
So please suggest me some nice doc or link which can give me its better idea and functioning.

Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42042
    
  64
You might want to read the Ant manual, which comes with the Ant distribution in the "docs" folder.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue in making axis2.war