Using Ant to run project build.xml file
Hello,
I am trying to understand an example Event processing and correlation project (ESPER) written in java. The example source code is provided as a zip file including a build.xml
The readme says "Simply use the Ant <project>/build.xml to run the example - it should compile and run, print out the simulation"
I use the netbeans IDE for development which ships with an ant installation. My question is do i need another ant installation to run the example? Ideally i would prefer to run the example in the IDE, any ideas how i can do that?
your suggestions will be very much appreciated.
Antana
The readme says "Simply use the Ant <project>/build.xml to run the example - it should compile and run, print out the simulation"
The <project>/build.xml is the ant script where you can customize many NetBeans operations, like project construction, javac configurations, etc. If you simply run this script, nothing happens, unless in this script there is some kind of customization, done by the example. I am assuming <project> is the directory of a NetBeans project.
I use the netbeans IDE for development which ships with an ant installation. My question is do i need another ant installation to run the example? Ideally i would prefer to run the example in the IDE, any ideas how i can do that?
You do not need another ant installation. The default installation of NetBeans comes with an ant. You can configure NetBeans to use your preferred ant, but you do not need that, because the default ant in NetBeans directory installation do most of things, if not everything, you need. NetBeans 5.5.1 come with Ant 1.7.0 by default, so if you choose you preferred ant, and this ant is also 1.7.0, then nothing different will happen.
You can perfectly run the example in the NetBeans IDE. You can also debug the example. Maybe what you have to do is configure the NetBeans project, setting the class with the main() method?
Similar Messages
-
Running two build.xml files
I have created two different projects under an application. Both of them have the build files generated through IDE (JDev 10g).
I am trying to invoke the build.xml of a one project from the build of another.
this is what I did
the parent build file that contains another build file looks like this. (I removed all the extra code and put in just the code that runs the other build file from the original file.)
<target name="anotherBuild">
<ant antfile="\JDeveloperProjects\uixKIP\kip\build.xml" target ="all" />
</target>
<target name="all" depends="anotherBuild,compile,doc" />when I run the parent build file with "all" as target according to the precedence both build file's are run (I placed an echo in the other build file and that is getting printed). But the javadoc and classes folders are created only for the parent project.
How do I get both the projects to be built? Does my method have a flaw? can we do this when the projects are totally independent?
Any insights would be greatly appreciated.
best regards,
rajrectified the problem. please disregard the post.
regards. -
How to use Weblogic Server 6.1 build.xml with ant
Hi Java's
I have downloaded the latest version of BEA Weblogic server 6.1,they have changed the build.cmd to build.xml for compiling and building the ejb applications.they are telling that we have use $ant to run the build.xml but i couldn't able to do that.i'm getting "command not found error"..i'm using winnt.please help me how to use $ ant.Is it a seperate exe or batch file that i have to download ?if so where to download it.how to use it.please help.
Regards
BalajiTo use it after installation, set your path to your
<ant_installation_dir>\bin, then navigate to the diectory containing the build.xml. then follow the instructions in the weblogic documentation for running ant. -
Ant for the build.xml file
when we give the ant command then what the background task perform?..
how ant start parsing the build.xml file ?Go to ant.jakarta.org. They have numerous tutorials. Do some research first. If you run into an actual problem, then post what it is.
- Saish -
hi all
When I execute build.xml file of simple BPEL project from JDev it runs properly. But when I try to execute it from normal command window It gives me an following error.
...........droping jar file xyz.jar from path as i doesn't exists.
While all jar files are exist there.But Ant drops it from Classpath variable.
So JDev sets some environment before executing such build.xml file.Like {oracle.home} variable u need to set while runnig build.xml from command window.
Any suggestions...???
/mishityou cant run a .war file from command prompt
.war files should be executed in a server
how to execute a single servlet class
do you mean to run the servlet or compile the servlet?
any way you need a server and if you are a beginner Apache tocat will be the best server to start with you can down load it from
http://tomcat.apache.org/ -
Help -- Who has experience with ant and build.xml files ?
Hi,
I think my build.xml file is missing setting a classpath I need, but I have never played around with a build.xml file. Could someone help ?
Thank you.
GraziaA lot of people here use ant. But not all of us can read your mind, and those of us that can are sadistic bastards that like to force people to provide details of their problems just for the hell of it.
So please do the following:
* Go through an ant tutorial or other introductory docs, doing an example or two if present.
* Set up your build.xml according to what you've learned.
* If it still doesn't work, post the relevant portions of it (hopefully you'll have a small, representative sample that reproduces the problem), along with your relevant directory and file structure, the command you're running, and what error messages you're getting. -
Converting build.cmd to Ant build.xml file
Can anyone help me convert the attached build command file (windows) to a
build.xml file for Ant?
Thanks,
Matt
[build.txt]
Hi Kevin,
You can get lots of help from the following links
http://help.sap.com/saphelp_nw04/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
SAP XI - Where to Find Information
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/sap xi - where to find information.pdf
Following is the link for 'how to guides', A step by step guide to create scenarios:
https://websmp201.sap-ag.de/nw-howtoguides
All the information you need in XI :
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
you can also go through the url for Elearning :
https://www.sdn.sap.com/sdn/elearning.sdn
To understand the architecture of XI, Please go through this link,
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
XI is all about configuration of Adapters, to learn more please go through this link:
http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm
One of the most powerful feature of XI, Business Process Management:
http://help.sap.com/saphelp_nw04/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm
Once you go through these links and are a bit aware what all XI objects do, you can try a simple "File to File Scenario" which would help you to understand XI objects in a much better manner.
For help on this scenario go through this blog it is in two parts thus i am providing both links below:
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
Re: new to netweaver
Re: how use XSLT maping in XI
Re: IDOC - XI - FILE scenario
Regards
Vishnu -
"Build.xml file not exist"
Hey Guys,
i am currently involving in a servelet project (RendreX). i want to install apachi ant as a prerequirement. i am using windows 2003 server. I already downloded latest ant version and apache tomcat4.0. Also i have set all the class path,ANT-HOME(C:\ANT) and other relevent paths. But when i run ant command in the command prompt(C:\ANT>ant)will generate error state that "build.xml" file can't be found. Have i done any wrong thing here? Can anybody give a way that i can easily install apache ant on winows.
It would be greatly appriciated if u can send me some advice to over come this problem.
Best Regards
Mohanbuild.xml is the default build file assumed by ant. You have to provide a build file to control what you expect from ant to do.
-
Unable to create build.xml file
I wrote build.xml file to create build using ANT in eclipse but it failed. The reason is value for "location" attribute (see below) is wrong and I don't know how to fix it. My eclipse workspace is in D:/eclipse/workspace...............but the eclipse software is in C:/eclipse....by inspection I can see that in the plugins directory in c:/eclipse there is paskage/folder named org.eclipse.jdt.core_3.0.0 which has a jar file named JDTCompilerAdapter.jar. Does the "location" attribute need to refer to this location ? If yes then how should I specify the path as I think hardcoding isn't a solution. I mean I obviously can't say
location="C:\eclipse\plugins\org.eclipse.jdt.core_3.0.0\org.eclipse.jdt.core_3.0.0.JDTCompilerAdapter"/>
Please advise !!
<?xml ...>
<project name="game" default="Main Build" basedir=".">
<property name="bin" location="bin"/>
<property name="src" location="src"/>
<property name="jardir" location="${bin}/lib"/>
<property name="jarfile" location="${jardir}/game.jar"/>
<property name="build.compiler"
location="org.eclipse.jdt.core_3.0.0.JDTCompilerAdapter"/>I'm not exactly sure what you're doing here, but I don't think any of that stuff belongs in the Ant build.xml. That should be generic, something you can run either inside or outside Eclipse.
The compiler that's used can be specified in Eclipse when you set up paths for Ant. That doesn't belong inside the build.xml itself. -
Hi
i am building the project by using build.xml file while running build.xml file in console first line i am getting buildfile directory is xyz/abc/build.xml
how to print this one dinamically
please give me clear clarificationhow to print this one dinamicallyPlease elaborate your exact requirement?
-RMishra -
Netbeans build.xml file: is it created automatically or do we create?
Hi all,
I am using Net beans IDE 6.0. For projects (with existing code, new application project, etc). Should we create build.xml file or will it be created automatically. Many things like rmi compilation, running different run-time configurations, etc depends on that file. Please do help.
(a build.xml file is created in project folder.)
Thanxdon't cross post:
http://forum.java.sun.com/thread.jspa?messageID=10107245
it's rude.
you create it.
% -
Netbeans build.xml file is automatically created or should we create?
Hi all,
I am using Net beans IDE 6.0. For projects (with existing code, new application project, etc). Should we create build.xml file or will it be created automatically. Many things like rmi compilation, running different run-time configurations, etc depends on that file. Please do help.
(a build.xml file is created in project folder.)
Thanxdon't cross post:
http://forum.java.sun.com/thread.jspa?threadID=5265563&messageID=10107226#10107226
it's rude.
% -
How to automatically generate build.xml file in eclipse?
Hello every body,
I am learning about ANT. e.g I have writen a very simple programme which displays output "no worries". But how can I compile it with ANT and how can I generate build.xml file using eclipse.This is not really a Java issue but rather is an Eclipse issue. You may wish to look for their support sites or forums.
-
Antenna - problem reading in a property value from the build.xml file
Hi
I have declared a property in build.xml file of my project like
<property name="debug" value="true" />I want to read the value of this property in my source code like
//#if debug == "true"
//#endifAbove method doesnt work. I tried using method below but it didnt work as well
//#if ${debug} == "true"
//#endifCan anyone please help me how can i read this value?
Thank youyou can get your key bytes with byte [] keyBytes = mykey.getEncoded();
and then write your byte array in a file.
to get back your key :
SecretKey myKey = new SecretKeySpec(keyBytes,"TripleDES"); -
How to create a build.xml file ??
Hi there,
I am learning j2ee at the moment. I have been throught the tutorial and got everything working (finally). however, now that I have started writing my own code, I am stuck with writing the build.xml file (as this is not covered in the tutorial, it is just provided). Does anyone know a good link that will give me step by step instructions on how to create my own build.xml file for my application.
thanksYou need to learn ant. Go here:
http://jakarta.apache.org/ant/
I also recommend "Java Development with Ant" by Hatcher and Loughran, just published.
Maybe you are looking for
-
Video Mode on Boot - Oracle Linux Server r6u2
Having an issue. See posts on forums but they are very old and with no clues. When our servers boot up, our rack monitor says the video mode is not supported. We do not see anything past POST - no red line across the bottom. Nothing except for the me
-
Have renewed my ExportPDF Subscription, have the confirmation email, but still pop's up with "Your trail has expired" window when go to convert via Print driver window. Comments/ help welcome thanks :-)
-
Indesign CS 4 assignment panel not available on mac
Using indesign CS4. Assignment panel under window menu is not available. Any help will be appraciated
-
I have an i7 iMac and when i shut down the screen goes white with the spinning wheel in the middle and stays there, not completing the shut down procedure. This remains indefinitely. I have left it for hours and come back with it still like this.
-
Hi expert, I need to view data from table ESSR, field SBNAMAN. I found Just the extractor 2LIS_02_ITM with some field from table ESSR but these field are not the field SBNAMAN. Two questions. Do you know any extractor with this field? I can't found