Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > media > contrib-release > by-pkgid > 29e0da3ddcddab73ae8621fc62033227 > files > 5

itext-manual-1.4.5-1mdv2007.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>iText, a Free Java-PDF Library: iText &amp; ANT</title><meta name="Description" content="How-to use ANT to compile, download ant document iText."><meta name="Keywords" content="PDF, JAVA, iText, download, compile, release, ANT, examples, Lowagie, Bruno"><link type="text/css" href="style.css" rel="stylesheet"></head><body><div id="content">
	<div xmlns="http://www.w3.org/1999/xhtml" xmlns:site="http://www.lowagie.com/iText/site">
	<div class="header">iText ANT scripts</div>
<div class="title">Another Neat Tool (What is ANT?)</div>
iText comes with a handful of ANT scripts that makes it easy for the developers of iText to compile the code, make a new release,
build their site(s). But those scripts are useful for iText users too.
<blockquote>Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.</blockquote>
If you want to download or install ant, please go to the <a href="http://ant.apache.org/">ANT site @ Apache.org</a>. On this page,
you will only find how to use ANT in the context of the iText project.
<div class="title">Using ANT for iText</div>
Every self-respecting JAVA project has its <a href="build.xml">build.xml</a> file.
If you want to use ANT for iText, you should start from a specific directory, say <span class="commandline">D:\iText</span>
or <span class="commandline">/home/blowagie/projects</span>, with two subdirectories 'src' and 'www',
one for each CVS module. Directory 'src' should have a <a href="build.xml">build.xml</a> file on the root and a
subdirectory 'ant' with all the iText ANT <a href="ant/">subscripts</a> in it, as well as a properties-file.
You can download these scripts in one <a href="http://prdownloads.sourceforge.net/itext/itext-ant-1.4.5.zip">
itext-ant-1.4.5.zip
</a>-file.<br/>
While running these scripts a third directory 'build' will be created with the results of compile-actions, jar-commands, downloads,...
You can change the location of all these directories, by changing the <a href="ant/.ant.properties">.ant.properties</a>-file.<br/>
If you look at the iText build.xml file,
you will see that the master build.xml doesn't have a lot of actual code.
It calls different subscripts.
You can call most of the targets from this master build.xml,
but for some of the specialized (hidden) targets, you will need to
call the subscript directly with <span class="commandline">build -f</span>.
The default target of the build.xml is 'help' and this is what you get if
you call this target:<br/>
<pre class="commandline">
Buildfile: build.xml

help:
     [echo] Using ANT for iText


help:
     [echo] DOWNLOADING iText (download.xml)
     [echo] ant download: downloads the source code needed to create iText.jar
     [echo] ant download.bin: downloads some precompiled jars and zips
     [echo] ant getFromCvs: downloads the complete CVS repository


help:
     [echo] COMPILING AND JARRING THE CODE (compile.xml)
     [echo] ant compile: compiles iText
     [echo] ant compile.debug: compiles iText and allows you to debug the code
     [echo] ant jar: compiles and jars iText
     [echo] ant jar.debug: compiles for debugging and jars iText


help:
     [echo] BUILDING THE iText SITE (site.xml)
     [echo] ant javadoc: Building the API documentation
     [echo] ant docs.tar.gz: Building and jarring the API documentation
     [echo] ant lowagie.com: Building the lowagie.com part


help:
     [echo] MAKING A NEW RELEASE (release.xml)
     [echo] archive.src: archiving the source
     [echo] ant.zip: makes a zip file with the ANT scripts
     [echo] release.sf: making the release for SourceForge


BUILD SUCCESSFUL
Total time: 1 second</pre>
<div class="title">Downloading iText</div>
subscript: <a href="ant/download.xml">download.xml</a><br/>
<div class="commandline">ant -f download.xml download</div>
This action gets the src.tar.gz from SourceForge and unzips+untars it
under the 'src' directory. The source code can now be compiled.
<div class="commandline">ant -f download.xml download.bin</div>
Downloads some jars you needs for specific functionality, such as parsing XML,
hyphenation, using Asian fonts,... Use this, just to make sure you have all
the right jars in the CLASSPATH that is used in the other ANT scripts.
<div class="commandline">ant -f download.xml getFromCvs</div>
Downloads the complete CVS repository. If this doesn't work, please
check the SourceForge status information. Anonymous CVS could be down.
<div class="title">Compiling and jarring</div>
subscript: <a href="ant/compile.xml">compile.xml</a><br/>
<div class="commandline">ant -f compile.xml compile</div>
Compiles the downloaded sourcecode (i.e. the code in the src directory).
<div class="commandline">ant -f compile.xml jar</div>
Jars the compiled code into iText.jar<br/>
You can also use <span class="commandline">compile.debug</span> and <span class="commandline">jar.debug</span>
if you need extended debugging capabilities.
<div class="title">Creating HTML</div>
subscript: <a href="ant/site.xml">site.xml</a><br/>
<div class="commandline">ant -f site.xml javadoc</div>
Creates the API documentation using JAVADOC. You can also immediately make
the docs.tar.gz with <span class="commandline">ant -f site.xml docs.tar.gz</span>.<br/>
<div class="commandline">ant -f site.xml lowagie.com</div>
Every page on the site and every tutorial chapter was written in XML
and is converted to HTML using XSLT. The target is self explanatory.
<div class="title">Preparing a release</div>
subscript: <a href="ant/release.xml">release.xml</a><br/>
<div class="commandline">ant -f release.xml archive.src</div>
Makes the src.zip and src.tar.gz file.
<div class="commandline">ant -f release.xml release.sf</div>
Once src.zip, src.tar.gz, iText.jar and docs.tar.gz are created with
some of the other ANT instructions, this command will copy those
files to files that have the release number in the filename.
For every new release, you should change the 'official' release
number and the 'early access' release number the release was based on
in the <a href="ant/.ant.properties">ant.properties</a> file.
<div class="title">Releasing all in once</div>
If you want to make a complete new release, you have to export
both CVS modules 'src' and 'www' and change directory to 'www/ant'.
<span class="commandline">ant release</span> will first download some
jars that don't need to be compiled. Then src.tar.gz, src.zip, ant.zip
and docs.tar.gz will be constructed. The code will be compiled
and jarred into iText.jar. The pages for lowagie.com will be
constructed and the files that will need to be uploaded to SourceForge
will get a releasenumber in their filename. Later on, more
functionality will be added to generate examples and tutorial chapters.
Usually I (Bruno) will do this. You won't need this target, nor
<span class="commandline">ant lowagie.com</span>, nor some other
hidden targets.
	</div>
	<div xmlns="http://www.w3.org/1999/xhtml" id="footer">Page Updated: 2004/12/01 10:50:53<br/>
Copyright &copy; 1999-2005 by Bruno Lowagie, Adolf Baeyensstraat 121, 9040 Gent, BELGIUM<br/>
Read the <a href="privacypolicy.html">Privacy Policy</a> at lowagie.com;
mailto: <a href="mailto:itext-questions@lists.sourceforge.net">itext-questions@lists.sourceforge.net</a></div></div><div xmlns="http://www.w3.org/1999/xhtml" id="navigation"><div id="itext"><a href="http://www.lowagie.com/iText/"><img border="0" src="images/logo.gif" class="logo"/></a><br/>
		a Free Java-PDF library<br/>by <a HREF="http://www.lowagie.com/" class="author">Bruno Lowagie</a><br/> and <a HREF="http://itextpdf.sourceforge.net/" class="author">Paulo Soares</a></div><div id="links"><a href="http://www.lowagie.com/iText/index.html" class="navigation">Home @ Lowagie.com</a><a href="http://sourceforge.net/projects/itext/" class="navigation">Home @ SourceForge.net</a><a href="http://itextsharp.sourceforge.net/" class="navigation">iTextSharp (.NET port)</a><br/><a href="download.html" class="navigation">Download &amp; Compile</a><a href="docs.html" class="navigation">Documentation</a><a href="http://itextdocs.lowagie.com/tutorial/" class="navigation">iText by Example</a><a href="cvs.html" class="navigation">CVS Repository</a><a href="ant.html" class="navigation">ANT Scripts</a><a href="faq.html" class="navigation">FAQ</a><br/><a href="http://lists.sourceforge.net/lists/listinfo/itext-questions" class="navigation">Mailing List Registration</a><a href="http://news.gmane.org/gmane.comp.java.lib.itext.general" class="navigation">Mailing List Archives</a><a href="links.html" class="navigation">Useful Links</a><a href="amazon.html" class="navigation">Shop @ Amazon</a></div></div><div xmlns="http://www.w3.org/1999/xhtml" id="sourceforge"><a href="http://sourceforge.net"><img alt="SourceForge.net Logo" border="0" height="62" width="210" src="http://sourceforge.net/sflogo.php?group_id=group_id=15255&amp;type=6"/></a></div><div id="commercial"><a xmlns="http://www.w3.org/1999/xhtml" href="amazon.html" class="amazonlinks">Amazon books:</a><script type="text/javascript"><!--
document.write('<iframe src="http://rcm.amazon.com/e/cm?t=itisacatalofwebp&o=1&p=8&l=as1&asins=1930110588,0596001843&fc1=000000&lc1=0000ff&bc1=&lt1=_blank&IS2=1&bg1=ffffff&f=ifr" width="120" height="240" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" align="Center"></iframe>');
//--></script><a href="http://www.amazon.co.uk/exec/obidos/ASIN/1930110588/catloogjecom-21" class="amazonlinks">
	amazon.co.uk-link
</a><br><script type="text/javascript"><!--
google_ad_client = "pub-0340380473790570";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_channel ="";
google_ad_type = "text";
google_color_border = "000000";
google_color_bg = "FFFFFF";
google_color_link = "B31800";
google_color_url = "B31800";
google_color_text = "FF2200";
//--></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><div class="amazonlinks">Other links:</div><div class="firefox"><script type="text/javascript"><!--
google_ad_client = "pub-0340380473790570";
google_ad_width = 110;
google_ad_height = 32;
google_ad_format = "110x32_as_rimg";
google_cpa_choice = "CAAQ_-KZzgEaCHfyBUS9wT0_KOP143Q";
//--></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></div><a xmlns="http://www.w3.org/1999/xhtml" href="http://www.refactorit.com/"><img height="26" width="120" border="0" src="http://www.refactorit.com/failid/rit_media/refactorit140x30.png"/></a></div></body></html>