What is the file build.xml
?
I was wondering if it is a possibility to import this project in Eclipse or Netbeans using this build.xml
. I tried to import the project but I get some errors since one part is created using J2ME and the other J2SE and I guess this file should be the configuration.
The build. xml file is an Ant script that is created by the PDE to take your plug-in components and combine them into a deployable format. This file compiles and archives your plug-in source code into a single JAR file. The build. properties file controls what goes into your plug-in distribution.
xml file, right click the project select new->other->xml , enter the name as build. xml and click finish . to build the project right click the build. xml file and select ant build .
How do I write build. xml file? here is a sample build. xml you just need to know important element e.g. project ,target ,property and task and the order in which different target gets executed to start with basic build procedure.
Ant uses an xml file for its configuration. The default file name is build. xml . Ant builds are based on three blocks: tasks, targets and extension points. A task is a unit of work which should be performed and constitutes of small atomic steps, for example compile source code or create Javadoc.
build.xml
usually is an ant build script.
It contains information necessary to build the project to produce the desired output, be it Javadocs, a compiled project, or a JAR file.
I believe Eclipse has ant built-in, so it should be possible to execute the build.xml
by choosing "Run As..." and "Ant Build".
The build.xml
file, if it is an ant script, is not used to import the project into an IDE like Eclipse or Netbeans. A build script is used to build the project (or produce some desired output) rather than an mechanism for importing the project into an IDE.
As mentioned by @coobird this is an ant build file. Although IDEs such as Eclipse and Netbeans have ant support built-in, it is also possible to run ant from the command-line and this may be the simplest way to get started if the project has been well created.
See http://ant.apache.org/ for docs.
If you want to try this approach, install ant, cd
to the directory with build.xml
and issue
ant
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With