source: release-kits/lirk3/bin/apache-ant-1.6.5/welcome.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 18.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<HTML>
3<HEAD>
4 <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
5 <TITLE>Welcome to Apache Ant 1.6</TITLE>
6</HEAD>
7<BODY LANG="en-US" BGCOLOR="#ffffff" DIR="LTR">
8<H1>Welcome to Apache Ant 1.6</H1>
9<P><BR><BR>
10</P>
11<H2>Your life just got better.
12</H2>
13<P>Not in big ways. Your social life isn't going to be helped, though
14with any luck you may now have more time for one. Nor is it going to
15take less time to write your Java code -although we note that running
16<A HREF="http://xdoclet.sf.net/" TARGET="other">XDoclet</A> under Ant
17lets you avoid writing so much code. Nor is a new release of Ant
18likely to provide a fundamental kick-start to the currently somewhat
19subdued technology and software industries.
20</P>
21<P>No, Ant1.6 will not fundamentally change your life. But if you do
22have to get software out on time -"roughly what you asked for,
23roughly when you asked", then Ant1.6 provides lots of little
24improvements over the existing version.
25</P>
26<P>Before we look at those details, lets look at the world of The
27Automated Build.</P>
28<P>Firstly, we'd like to thank everyone for all those awards that
29have been flowing in. The JavaWorld Editors' Choice Award for "Most
30Useful Java Community-Developed Technology", The Java
31Developer's Journal "Editors Choice Award", and Java Pro
32Reader's Choice award for "Most Valuable Java Deployment
33Technology." Wow. That's a lot of awards. Aardman Animations
34keep all their Wallace and Gromit -related oscars in a cabinet in
35their tea room. If the Apache organization had a tea room, those Ant
36awards would be forcing all the other (excellent) Apache products to
37fight hard for their cabinet space.
38</P>
39<P>All those awards come for a reason: everyone, at least everyone
40working on any project of moderate complexity, needs to control their
41build process. Ant is one of the best ways to do it in Java, and,
42over the past four years, it has moved from a tool used simply to
43build Tomcat cross-platform, to a tool used across many open source
44projects, and now to a tool used by almost all Java projects. Indeed,
45pretty much the only competitor in the Java space is a sibling
46project under the Apache banner, <A HREF="http://maven.apache.org/" TARGET="other">Maven</A>.
47One of the obvious signs of Ant's success is that all the popular
48IDEs, from the Open Source -Emacs JDE, Eclipse, NetBeans and jEdit -
49to the commercial: IntelliJ IDEA, Borland JBuilder- all ship with
50built in Ant support. This lets you use your favourite IDE for what
51it is good at: editing text, creating Java source, refactoring
52existing code, debugging and the like, and you can turn to Ant for
53co-ordinating the build-test-deploy/deliver process. That Ant based
54process can be triggered from keystrokes in the IDE, command line
55invocations for those so inclined, and in automated scheduled builds
56so the machines can keep an eye on the engineers. Another sign is how
57Ant is helping the Java aisle of bookstores fight back against
58attempts by books about Macromedia Flash to take over all the space
59-there are now seven or eight books on the subject, with more on the
60way. Germany and Korea have their own native language books too,
61which shows how global the tool is -in use and in development terms.
62</P>
63<P>The other metric of success is the pre-announcement hints from our
64distant software colleagues in Redmond, Microsoft, of a new build
65tool, "MSBuild", which "might be the single most
66important feature innovation in our pipeline", according to one
67MS developer. That is surely the greatest metric of success: XML
68based build tools are now viewed as so essential to the modern build
69process, that Microsoft has to come up with a competitor to Ant to
70win Java developers over to .NET. Let's hope they discover we like
71ubiquitous JUnit testing too, and refactoring IDEs that create and
72run the tests for us.
73</P>
74<P>Success comes at a price, of course. One price is all those
75support calls. We try and stay on top of the bug reports, but one
76thing we cannot do is fix inconsistencies or things that seem like
77defects if they stand a significant chance of breaking existing
78builds. Its sad, but there are lots of little minor faults with Ant
79that we don't dare fix because, well, things might break. For
80example, why don't if= and unless= clauses also support
81<code>if="${property}"</code> clauses? Alternatively, why isn't it an
82error to use a property that isn't defined. Everyone that has ever
83seen directories called ${build.dir} popping up the source tree will
84understand why that behaviour is not always what you want. Well, we
85could fix these things, but we won't, because backwards compatibility
86is sacred.
87</P>
88<P>That is the other price of success: all those users who have
89existing build files they want to work. And all those IDEs that host
90Ant, and who want an easy upgrade to a new version. This means we
91have lost a lot of the flexibility we used to have in the early days
92of the project, when different versions of Ant could have completely
93different property evaluation algorithms and nobody would bat an
94eyelid. Now, even the most obscure bug fix ends up generating 'you
95broke my build complaints'.
96</P>
97<P>This explains why there will not be the 'incompatible upgrade'
98version of Ant, Ant2.0, that has long been discussed on our web site.
99</P>
100<H2>Where is Ant2.0?</H2>
101<P>For years we have been discussing Ant2.0, the complete rewrite
102version that would be cleaner and faster, and slightly incompatible
103with Ant1.x. It would be the opportunity to take the lessons from the
1041.x line, and support them cleanly. We even got as far as having
105multiple implementations of new Ant engines in the CVS repository,
106especially Mutant and Myrmidion. But we always seemed to have a hard
107time making progress -everyone was too busy using and firefighting
108Ant1.x that nobody got time to work on the 2.x codebase. Which is a
109shame, as all the proposals had interesting ideas.</P>
110<P>After Ant1.5 shipped, the future of Ant effectively resolved into
111one of evolution rather than revolution. There will be no Ant2.0 with
112a complete new engine underneath. There will be no need to run XSL
113transforms over existing build files to move them to the Ant2.0
114world. Instead Ant1.x is getting better underneath the build file
115-improving its internal design while retaining five-nines backwards
116compatibility with existing build files.
117</P>
118<P>And that is what we have been up to.</P>
119<P>Under the hood, Ant1.6 contains some of the most major reworkings
120of the core Ant system yet seen. We haven't finished yet, and are
121holding back some of the more visible developments so we can see what
122works before their release in a product forces us to maintain them.
123But the underlying parts of Ant are now set up for the next stage in
124development.
125</P>
126<P>Whether we call the next version of Ant 1.7 or 2.0 is something we
127have yet to decide. Maybe we should call it 3.0 just to surprise
128people.</P>
129<H2>What has changed</H2>
130<P>Look at the <A HREF="WHATSNEW" TARGET="other">WHATSNEW</A>
131document to get a full list of changes. Here are some of the core
132conceptual differences.</P>
133<H3>No more Java1.1</H3>
134<P>We got fed up of jumping through reflection hoops to do everything
135from weak references to setting file timestamps. After consultation
136with the Ant user mail list, Ant1.6 only runs on Java1.2 or later. It
137can still cross compile to Java1.1 if that is what you have to do. We
138haven't completely purged all 1.1 references in the docs, or 1.1
139support from the source, but that will come over time.</P>
140<H3>New classloader use.</H3>
141<P>This is going to make people nervous. If there is one thing Java
142developers have learned over time, only the very naive, the very
143brave, or the very competent do things with classloaders. We will let
144the Ant users decide what category to put us in, but before everyone
145panics, Costin, of Tomcat fame, did a lot of the work here. You don't
146write application servers without understanding classloaders inside
147and out.
148</P>
149<P>The impact of these changes will trickle out over Ant versions. In
1501.6, the key features are
151</P>
152<OL>
153 <LI><P>We have got rid of the bit in the batch file/shell script
154 that built up a really big classpath environment variable from
155 everything in ANT_HOME/lib. Now that is done in a launcher class
156 that does the work then calls tools.ant.Main as before.</P>
157 <LI><P>You can add new library directories to that classloader with
158 the -lib option on the command line. This option is interpreted by
159 the launcher class, so will not work with IDEs and other apps that
160 use the inner entry point.</P>
161 <LI><P>We have broken up optional.jar into many-many jar files, such
162 as ant-commons-logging.jar, ant-xalan2.jar, etc etc, and a
163 nodeps.jar for optional stuff without any dependencies. This creates
164 a lot of jar files.</P>
165 <LI><P>You can now &lt;taskdef&gt; existing tasks -like &lt;junit&gt;-
166 by including the specific ant jar <I>and</I> the dependent libraries
167 (i.e. junit.jar) in the declaration. This solves the problem of
168 ANT_HOME/lib needing to contain every jar possibly needed by every
169 user/project. You still have to declare the tasks one by one,
170 something we will fix in Ant1.7</P>
171</OL>
172<H3>Adapters</H3>
173<P>These are Java classes that <I>adapt</I>&gt; arbitrary Java
174classes into ant tasks or types. There has always been some of this
175stuff inside Ant, but now you can &lt;taskdef&gt; a task by naming
176not just the implementation class, but the adapter class. An adapter
177is essentially a meta task implementation -something that can be used
178to create new tasks dynamically. Which, when you consider that the
179core of Ant is fundamentally an XML to java mapping system and a
180simple workflow engine, may let you do very unusual things with Ant.
181</P>
182<H3>Antlib: Ant libraries</H3>
183<P>This is something we will expand in future. Till now you could
184declare tasks and types with &lt;taskdef&gt; and &lt;typedef&gt;. If
185they were in a jar, you could write a properties file and name the
186resource path of the file in the jar. If you wanted to have both
187tasks and types, you had name a shared classloader. If you wanted to
188add more things -such as conditions or mappers, you were out of luck.</P>
189<P>Antlibs are Ant Libraries, JAR files containing the code to extend
190Ant, and an XML description file to describe how Ant is extended.
191Before anyone panics at 'yet another XML descriptor syntax' to learn:
192you may already know the syntax. We call it "Ant build files".
193Actually it is a subset: it can only contain those task declarations
194that are derived from org.apache.tools.ant.taskdefs.AntlibDefinition.
195That includes &lt;taskdef&gt; and &lt;typedef&gt;, and <I>any other
196task you choose to derive. </I>We are experimenting with scripting
197and some kind of task predefinition declarations in antlibs. With the
198latter, you will be able to write a predefined task -such as a
199&lt;javac&gt; derivative with the compiler options set, and then use
200it any of your build files. This is all too experimental to get into
201Ant1.6 -expect it in the successor. For now, start using antlibs and
202use the &lt;taskdef&gt; task to load them into your projects.</P>
203<H3>XML Namespace aware</H3>
204<P>Ant finally adopts XML namespaces. This is to address build file
205scalability; antlibs can be imported into their own namespaces, and
206so you can avoid namespace clashes with other libraries. If you do
207not know what namespaces are, do not worry -they are not compulsory.</P>
208
209<h3>All tasks can go in at the toplevel</h3>
210<p>
211
212Prior to Ant1.6, only three tasks were allowed outside
213targets : &lt;taskdef&gt;,&lt;typedef&gt; and &lt;property&gt;.
214Ant 1.6 puts an end to this distinction; anything can go in at the top
215level. This is partly because there were many more tasks that merited the
216option based on the original rationale of "global initialization tasks":
217&lt;import&gt; and &lt;antlib&gt; were the new additions, but existing
218tasks like &lt;condition&gt;, &lt;available&gt;, &lt;xmlproperties&gt;
219and &lt;loadproperties&gt; had equal rights.
220</p>
221<p>
222Rather that expand the set slightly, now all tasks are allowed outside
223targets. This gives external tasks the same rights as built in code,
224eliminates sporadic bug reports, and annoying error messages. It gives
225users the ability to write build files without any targets at all; the
226top-level declarations are processed in sequence.
227</p>
228
229On a style note, we strongly advocate using this feature carefully. It
230is best if zero-side-effect, initialization-only tasks get put into the
231top level. Remember also that all top level statements are processed in
232order, before any targets are executed. Even tasks at the end of the
233file will get executed before targets declared above them.
234
235<H2>New Tasks</H2>
236<P>As usual, the task base is growing and expanding. These days the
237ant core is resisting adopting many of the highly worthy donations of
238tasks from people, because they make maintenance and firefighting
239worse. Our current stance is that except in special circumstances,
240Ant tasks to support third party open source projects, should live
241with the projects themselves. This keeps them in sync with the
242libraries they integrate with, avoids GPL/Apache licensing issues,
243and reduces the Ant team's support workload, letting them focus on
244the core. The antlib mechanism is intended to make it easier for
245people to load tasks from libraries for this very reason.</P>
246<P>That said, we are pleased to introduce many new tasks. Of
247particular interest may be the SSH tasks, which let one deploy code
248to remote servers securely. Now you really can do live updates with
249Ant -if the operations team will let you. The other one that is quite
250interesting is &lt;subant&gt;. This is an extension of the &lt;ant&gt;
251task, to take an entire fileset of directories and run their build
252files. This is incredibly useful in very large projects. This does
253not mean that we are advocating the many-build-file development
254pattern, but in a sufficiently complex project it happens anyway.
255&lt;subant&gt; keeps things manageable.</P>
256<H2>What else</H2>
257<P>So, what is new in Ant1.6? Lots of stuff. You will have to look at
258the <A HREF="WHATSNEW">whatsnew</A> file to see, but here are some
259key points.
260</P>
261<OL>
262 <LI><P STYLE="margin-bottom: 0in">Bug fixes. We know, some things
263 were broken in 1.5. In ant1.6 we have moved the bugs, fixing the
264 ones we could, and no doubt adding different ones. Hopefully the
265 total bug count has decreased.
266 </P>
267 <LI><P STYLE="margin-bottom: 0in">New platforms: Open VMS and HP's
268 NonStop Kernel (Tandem) OS. OpenVMS is very different from the rest;
269 Read the &lt;exec&gt; task documentation carefully.
270 </P>
271 <LI><P STYLE="margin-bottom: 0in">Spawning. &lt;java&gt; and &lt;exec&gt;
272 started applications can outlive Ant if you set spawn=true. Note
273 that the moment you do so, Ant cannot bind to their input or output,
274 for obvious reasons.
275 </P>
276 <LI><P>Synchronisation with Java versions (heh, thought by moving
277 javah's entry point that you could hide from us? Think again).</P>
278 <LI><P>Synchronization with third party libraries. Of special note:
279 we have moved to the Apache commons-net.jar, the successor to
280 NetComponents for telnet and FTP as well as Apache BSF, the
281 successor to IBM BSF, for script.</P>
282</OL>
283<P>There are many more enhancements, so we hope you will find your
284build projects easier. We have, as usual, jumped through hoops to
285keep existing builds working. If your build file stops working, and
286it isn't something listed on the 'changes that may break your build'
287part of the WHATSNEW file, or something we know about on bugzilla,
288please don't hesitate to file a new bug report, preferably one with a
289replicable test and a patch to fix the problem. Please, please,
290please, do a search on bugzilla first. You do not want to be the
291seventy-third person to complain that Ant1.6 doesn't do something
292that it should.
293</P>
294<P>Thanks,
295</P>
296<P>The Ant development team.
297</P>
298<H3>Acknowledgements</H3>
299<UL>
300 <LI><P>Many thanks for Antoine to being the build manager for this
301 release!
302 </P>
303 <LI><P>Thank you to everyone who supplies the components we use in
304 Ant, particularly JUnit, commons-logging, log4J, bcel, ORO, Xerces, and Xalan.
305 </P>
306 <LI><P>Everyone who has supplied bug reports, especially those with
307 patches and tests.</P>
308 <LI><P>IDE projects who incorporate Ant into their products. Not
309 only does this help Ant's success, you find lots of interesting
310 integration defects. Special mention to the Eclipse team for fixing
311 our memory leaks :)</P>
312</UL>
313<H3>Call to Action</H3>
314
315<P>
316
317It is an interesting time for Java. .NET is a serious challenger, and
318will get better. A core strength of Java over .NET is its community. It
319is the community that gave the world leading edge development tools and
320other core components: Ant, JUnit, XDoclet, hsqldb, Hibernate, Struts,
321etc. These things weren't created by JCP committees, or built according
322to the strategic vision of a Fortune 100 company. They were written by
323Java developers, for Java developers, usually to meet their own tactical
324goals.
325
326</P>
327
328<P>If Java is to survive -and we think it ought to- everyone who can
329needs to become active members of that community. It could be helping
330with Ant, but it could just as easily be helping with any other open
331source Java project, be hosted by Apache, FSF, Sourceforge or someone
332else, be it server-side, client-side or mobile-side. It could be an
333existing project, or it could be your own idea as to how things could
334be better. The key is: things will only be better if you put in the
335time to make it so.
336</P>
337<H3>Call to Inaction</H3>
338<P>A special message to whoever it is in charge of commands in
339tools.jar: stop moving your entry points! In Ant1.5 we had to deal
340with the 'classic' javac entry point going away in Java1.4.0,
341seemingly coming back later. In Java 1.4.2, the javah entry point
342moved. The traditional command line invocation mechanism has been
343replaced by hosted invocation -Ant, Maven, IDEs, etc, and moving
344entry points around breaks these host applications. Even if we get a
345bug fix out in Ant a few weeks after the Java release, it takes
346months for this to trickle down to end users, especially via IDEs and
347other distributions. For example, Sun's own Java Web Services
348Developer Pack ships with Ant1.5.1, and so cannot run &lt;javah&gt;
349on a 1.4.2 installation.
350</P>
351</BODY>
352</HTML>
Note: See TracBrowser for help on using the repository browser.