Hi ,

Apache Ant is a build tool and not a server application.
Ant is a tool normally used to build -> (compile , jar etc ) your java
applications
so that you can deploy your java artifacts anywhere with your ear /
jar artifacts.

Where can you download ant ? The answer is :
http://ant.apache.org/bindownload.cgi

There is a Zip file available for download.Unzip this zip file.Then
set the ANT_HOME variable
and also make sure your JAVA_HOME is also set as environment variable.
Also make sure that your PATH env variable also contains ANT_HOME/bin so that
you can run "ant" directly from the command line.

Then put the following contents in the build.xml.

Then goto the directory that contains the build.xml and say "ant" in
command line.
Ant searches for build.xml file and once it finds its it executes the
targets within the file one by one.
Make sure that your paths in build.xml are correct.

For more on Ant goto : http://ant.apache.org/manual/index.html


# Create a manifest, the JAR file, and the class file
SimpleBean.class. Use the Apache Ant tool to create these files.
Apache Ant is a Java-based build tool that enables you to generate
XML-based configurations files as follows:

 <?xml version="1.0" encoding="ISO-8859-1"?>

 <project default="build">

  <dirname property="basedir" file="${ant.file}"/>

  <property name="beanname" value="SimpleBean"/>
  <property name="jarfile" value="${basedir}/${beanname}.jar"/>

  <target name="build" depends="compile">
      <jar destfile="${jarfile}" basedir="${basedir}" includes="*.class">
          <manifest>
              <section name="${beanname}.class">
                 <attribute name="Java-Bean" value="true"/>
              </section>
          </manifest>
      </jar>
  </target>

  <target name="compile">
      <javac destdir="${basedir}">
          <src location="${basedir}"/>
      </javac>
  </target>

  <target name="clean">
      <delete file="${jarfile}">
          <fileset dir="${basedir}" includes="*.class"/>
      </delete>
  </target>

</project>

It is recommended to save an XML script in the build.xml file, because
Ant recognizes this file name automatically.

If you have any trouble please let me know.

Thanks,
Ashok A V

On Tue, Jul 28, 2009 at 9:13 AM, cdoubleu<[email protected]> wrote:
>
> Has anyone gotten this far yet?
>
> I was having trouble with the tutorial 
> http://java.sun.com/docs/books/tutorial/javabeans/
>
> In step 2 (@ 
> http://java.sun.com/docs/books/tutorial/javabeans/writingbean/index.html
> ) it wants you to create a manifest/jar file using something called
> Apache Ant. I went to their website and didnt find much help. I think
> this is a server based application I downloaded it there are bunch of
> bootstrap files.
>
> Has anyone done this yet ?
>
> Are we supposed to do this?
>
> I need help, Im going to sleep on it I would appreciate some replies
>
> Thanks a million.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to