incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1081393 [10/11] - in /incubator/easyant/site/staging: ./ history/ history/trunk/ history/trunk/changelog/ history/trunk/howto/ history/trunk/ref/ history/trunk/ref/anttasks/ history/trunk/ref/anttasks/findclasspath/ history/trunk/ref/build...
Date Mon, 14 Mar 2011 14:29:02 GMT
Added: incubator/easyant/site/staging/history/trunk/ref/plugins/plugins.html
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/ref/plugins/plugins.html?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/ref/plugins/plugins.html (added)
+++ incubator/easyant/site/staging/history/trunk/ref/plugins/plugins.html Mon Mar 14 14:29:00 2011
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<html>
+<head>
+    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+    <script type="text/javascript">var xookiConfig = {level: 2};</script>   
+    
+    <title>EasyAnt Plugins</title>
+
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <title>Plugins</title>
+  <meta name="keywords" content="" />
+  <meta name="description" content="" />
+  <link rel="stylesheet" type="text/css" href="../../../../style/style.css" media="screen"/>
+  <!-- for tree, see if it would better go in xooki.js -->
+  <link rel="stylesheet" type="text/css" href="../../../../style/tree.css" />
+  <script src="../../../../js/jquery.pack.js" type="text/javascript"></script>
+  <script src="../../../../js/jquery.treeview.js" type="text/javascript"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
+  </script>
+
+<script language="javascript" type="text/javascript">xooki = {u: function(url) {return "../../../../xooki/"+url;}};</script>
+</head>
+<body>
+<div id="header">
+    <div id="incubatorlogo">
+	<img src="../../../../images/apache-incubator-logo.png"/>
+    </div>    
+    <div id="topmenu">
+        <ul>
+            <li><a href="../../../../index.html" id="topmenu1" accesskey="1" title="">Home</a></li>
+            <li><a href="../../../../contact.html" id="topmenu2" accesskey="2" title="">Get involved</a></li>
+        </ul>
+    </div>
+</div>
+<!-- end #header -->
+<div id="menu">
+    <ul>
+        <li class="first"><a href="../../../../index.html" accesskey="1" title="">Home</a></li>
+        <li><a href="../../../../download.html" accesskey="1" title="">Download</a></li>
+        <li><a href="http://www.apache.org/licenses/" title="">License</a></li>
+        <li><a href="../../../../history/trunk/tutorials.html" title="">Tutorials</a></li>
+        <li><a href="../../../../history/trunk/reference.html" title="">References</a></li>
+    </ul>
+</div>
+<!-- end #menu -->
+<div id="content">
+    <div id="sidebar" class="boxed">
+        <h2 class="title">Apache EasyAnt&#153;</h2>
+        <div id="links">
+                <ul id="treemenu" class="treeview"><li id="xooki-index" class="submenu"><a href="../../../../index.html" >Home</a><ul class="closed"><li id="xooki-features"><a href="../../../../features.html" >Features</a></li><li id="xooki-license"><a href="http://www.apache.org/licenses/" >License</a></li><li id="xooki-faq"><a href="../../../../faq.html" >FAQ</a></li></ul></li><li id="xooki-download"><a href="../../../../download.html" >Download</a></li><li id="xooki-history" class="submenu">History<ul class="open"><li id="xooki-history/trunk/index" class="submenu"><a href="../../../../history/trunk/index.html" >Trunk</a><ul class="open"><li id="xooki-history/trunk/tutorials" class="submenu"><a href="../../../../history/trunk/tutorials.html" >Tutorials</a><ul class="closed"><li id="xooki-history/trunk/howto/GettingStarted"><a href="../../../../history/trunk/howto/GettingStarted.html" >Getting Started</a></li><li id="xooki-history/trunk/howto/SettingupasimpleEasyAntproject"
 ><a href="../../../../history/trunk/howto/SettingupasimpleEasyAntproject.html" >Setting up a simple EasyAnt Project</a></li><li id="xooki-history/trunk/howto/writePlugins"><a href="../../../../history/trunk/howto/writePlugins.html" >Writing plugins</a></li><li id="xooki-history/trunk/howto/skeleton"><a href="../../../../history/trunk/howto/skeleton.html" >Working with skeletons of project</a></li><li id="xooki-history/trunk/howto/multimodules"><a href="../../../../history/trunk/howto/multimodules.html" >Working with multi-modules</a></li><li id="xooki-history/trunk/howto/BuildConfigurations"><a href="../../../../history/trunk/howto/BuildConfigurations.html" >Build configurations</a></li></ul></li><li id="xooki-history/trunk/reference" class="submenu"><a href="../../../../history/trunk/reference.html" >Reference</a><ul class="open"><li id="xooki-history/trunk/ref/features"><a href="../../../../history/trunk/ref/features.html" >Features</a></li><li id="xooki-history/trunk/ref/
 Defaultlifecycle"><a href="../../../../history/trunk/ref/Defaultlifecycle.html" >Default lifecycle</a></li><li id="xooki-history/trunk/ref/Directorystructure"><a href="../../../../history/trunk/ref/Directorystructure.html" >Directory structure</a></li><li id="xooki-history/trunk/ref/Modulefiles"><a href="../../../../history/trunk/ref/Modulefiles.html" >Module files</a></li><li id="xooki-history/trunk/ref/ProjectMancommand"><a href="../../../../history/trunk/ref/ProjectMancommand.html" >ProjectMan commands</a></li><li id="xooki-history/trunk/ref/phases"><a href="../../../../history/trunk/ref/phases.html" >Understanding phases</a></li><li id="xooki-history/trunk/ref/anttasks" class="submenu"><a href="../../../../history/trunk/ref/anttasks.html" >Ant Tasks</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/BindTarget"><a href="../../../../history/trunk/ref/anttasks/BindTarget.html" >bindtarget</a></li><li id="xooki-history/trunk/ref/anttasks/checkresolver"><a href="
 ../../../../history/trunk/ref/anttasks/checkresolver.html" >checkresolver</a></li><li id="xooki-history/trunk/ref/anttasks/CoreVersiontask"><a href="../../../../history/trunk/ref/anttasks/CoreVersiontask.html" >core-version</a></li><li id="xooki-history/trunk/ref/anttasks/easyant"><a href="../../../../history/trunk/ref/anttasks/easyant.html" >easyant</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath" class="submenu"><a href="../../../../history/trunk/ref/anttasks/findclasspath.html" >findclasspath</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/findclasspath/basic-configuration-strategy"><a href="../../../../history/trunk/ref/anttasks/findclasspath/basic-configuration-strategy.html" >basic-configuration-strategy</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath/environment-strategy"><a href="../../../../history/trunk/ref/anttasks/findclasspath/environment-strategy.html" >environment-strategy</a></li><li id="xooki-history/trunk/ref/ant
 tasks/findclasspath/project-dependency-strategy"><a href="../../../../history/trunk/ref/anttasks/findclasspath/project-dependency-strategy.html" >project-dependency-strategy</a></li></ul></li><li id="xooki-history/trunk/ref/anttasks/Importtask" class="submenu"><a href="../../../../history/trunk/ref/anttasks/Importtask.html" >import</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/plugintask"><a href="../../../../history/trunk/ref/anttasks/plugintask.html" >plugin task</a></li><li id="xooki-history/trunk/ref/anttasks/buildtypetask"><a href="../../../../history/trunk/ref/anttasks/buildtypetask.html" >buildtype task</a></li></ul></li><li id="xooki-history/trunk/ref/anttasks/menugenerator"><a href="../../../../history/trunk/ref/anttasks/menugenerator.html" >menugenerator</a></li><li id="xooki-history/trunk/ref/anttasks/LoadModuletask"><a href="../../../../history/trunk/ref/anttasks/LoadModuletask.html" >loadmodule</a></li><li id="xooki-history/trunk/ref/anttasks/Pa
 rametertask"><a href="../../../../history/trunk/ref/anttasks/Parametertask.html" >parameter</a></li><li id="xooki-history/trunk/ref/anttasks/Pathtask"><a href="../../../../history/trunk/ref/anttasks/Pathtask.html" >path</a></li><li id="xooki-history/trunk/ref/anttasks/Property"><a href="../../../../history/trunk/ref/anttasks/Property.html" >property</a></li><li id="xooki-history/trunk/ref/anttasks/registerartifact"><a href="../../../../history/trunk/ref/anttasks/registerartifact.html" >registerartifact</a></li><li id="xooki-history/trunk/ref/anttasks/SubModuletask"><a href="../../../../history/trunk/ref/anttasks/SubModuletask.html" >submodule</a></li></ul></li><li id="xooki-history/trunk/ref/buildtypes/buildtypes"><a href="../../../../history/trunk/ref/buildtypes/buildtypes.html" >Build Types</a></li><li id="xooki-history/trunk/ref/plugins/plugins"><a href="../../../../history/trunk/ref/plugins/plugins.html" class="current">Plugins</a></li><li id="xooki-history/trunk/ref/Eas
 yAntconfigurationfile"><a href="../../../../history/trunk/ref/EasyAntconfigurationfile.html" >EasyAnt configuration file</a></li><li id="xooki-history/trunk/ref/ProjectIvyInstance"><a href="../../../../history/trunk/ref/ProjectIvyInstance.html" >Project Ivy Instance</a></li></ul></li><li id="xooki-history/trunk/changelog" class="submenu"><a href="../../../../history/trunk/changelog.html" >Changelog</a><ul class="closed"><li id="xooki-history/trunk/changelog/0.7"><a href="../../../../history/trunk/changelog/0.7.html" >0.7</a></li></ul></li><li id="xooki-history/trunk/faq"><a href="../../../../history/trunk/faq.html" >FAQ</a></li><li id="xooki-history/trunk/contact"><a href="../../../../history/trunk/contact.html" >Contact</a></li></ul></li></ul></li><li id="xooki-contact" class="submenu"><a href="../../../../contact.html" >Get Involved</a><ul class="closed"><li id="xooki-Mailinglist"><a href="../../../../Mailinglist.html" >Mailing list</a></li><li id="xooki-Issuetracking"><a 
 href="../../../../Issuetracking.html" >Issue tracking</a></li><li id="xooki-Sourcerepository"><a href="../../../../Sourcerepository.html" >Source repository</a></li><li id="xooki-irc"><a href="../../../../irc.html" >IRC</a></li></ul></li><li id="xooki-Team"><a href="../../../../Team.html" >Team</a></li><li id="xooki-foundation" class="submenu"><a href="../../../../foundation.html" >Foundation</a><ul class="closed"><li id="xooki-undefined"><a href="http://www.apache.org" >ASF</a></li><li id="xooki-undefined"><a href="http://www.apache.org/foundation/sponsorship.html" >Sponsorship</a></li><li id="xooki-undefined"><a href="http://www.apache.org/foundation/thanks.html" >Thanks</a></li></ul></li></ul>
+        </div>
+    </div>
+
+    <div id="posts">
+        <br class="xooki-br"/><h1>Plugins</h1>
+
+<p>An EasyAnt plugin defines a single small "task" performed by EasyAnt, for example: run unit tests, generate a build report, or package a jar.  Plugins can then be included into buildtypes or other plugins to define more complicated tasks (like "build a complete web application").  You can also include a plugin directly into your project's Ivy file to customize the way your project is built.</p>
+
+<p>A typical plugin consists of an Ivy descriptor and a short Ant script, and is stored in the EasyAnt Ivy repository.  The Ivy descriptor indicates which libraries are required by your plugin; for example, the junit jar is needed by the test-junit plugin.  The Ant script contributes logic to one or more <a href="../phases.html">build phases</a>.  Most plugins can be fine-tuned with Ant property settings.</p>
+
+<p>If you want to add support for a new build tool to EasyAnt, you should probably start by writing a plugin for it.  See the <a href="../../howto/writePlugins.html">Plugins Tutorial</a> to get started.  Before writing your own plugin, be sure to check here to see if a plugin doesn't already exist.</p>
+
+    </div>
+    <!-- end #posts -->
+    <!-- end #links -->
+    <div style="clear: both;">&nbsp;</div>
+</div>
+<!-- end #content -->
+<div id="footer">
+    <p id="legal">
+        <i>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache License, Version 2.0</a>.</i><br>
+        <i>Apache EasyAnt, Apache Ivy, Apache Ant, Ivy, Ant, Apache, the Apache Ivy logo, the Apache Ant logo and the Apache feather logo are trademarks of The Apache Software Foundation.</i><br>
+        <i>All other marks mentioned may be trademarks or registered trademarks of their respective owners. </i>
+    </p>
+</div>
+<!-- end #footer -->
+</body>
+</html>

Propchange: incubator/easyant/site/staging/history/trunk/ref/plugins/plugins.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/site/staging/history/trunk/ref/plugins/plugins.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/site/staging/history/trunk/ref/plugins/plugins.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: incubator/easyant/site/staging/history/trunk/reference.html
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/reference.html?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/reference.html (added)
+++ incubator/easyant/site/staging/history/trunk/reference.html Mon Mar 14 14:29:00 2011
@@ -0,0 +1,239 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<html>
+<head>
+    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+    <script type="text/javascript">var xookiConfig = {level: 0};</script>   
+    
+
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <title>Reference</title>
+  <meta name="keywords" content="" />
+  <meta name="description" content="" />
+  <link rel="stylesheet" type="text/css" href="../../style/style.css" media="screen"/>
+  <!-- for tree, see if it would better go in xooki.js -->
+  <link rel="stylesheet" type="text/css" href="../../style/tree.css" />
+  <script src="../../js/jquery.pack.js" type="text/javascript"></script>
+  <script src="../../js/jquery.treeview.js" type="text/javascript"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
+  </script>
+
+<script language="javascript" type="text/javascript">xooki = {u: function(url) {return "../../xooki/"+url;}};</script>
+</head>
+<body>
+<div id="header">
+    <div id="incubatorlogo">
+	<img src="../../images/apache-incubator-logo.png"/>
+    </div>    
+    <div id="topmenu">
+        <ul>
+            <li><a href="../../index.html" id="topmenu1" accesskey="1" title="">Home</a></li>
+            <li><a href="../../contact.html" id="topmenu2" accesskey="2" title="">Get involved</a></li>
+        </ul>
+    </div>
+</div>
+<!-- end #header -->
+<div id="menu">
+    <ul>
+        <li class="first"><a href="../../index.html" accesskey="1" title="">Home</a></li>
+        <li><a href="../../download.html" accesskey="1" title="">Download</a></li>
+        <li><a href="http://www.apache.org/licenses/" title="">License</a></li>
+        <li><a href="../../history/trunk/tutorials.html" title="">Tutorials</a></li>
+        <li><a href="../../history/trunk/reference.html" title="">References</a></li>
+    </ul>
+</div>
+<!-- end #menu -->
+<div id="content">
+    <div id="sidebar" class="boxed">
+        <h2 class="title">Apache EasyAnt&#153;</h2>
+        <div id="links">
+                <ul id="treemenu" class="treeview"><li id="xooki-index" class="submenu"><a href="../../index.html" >Home</a><ul class="closed"><li id="xooki-features"><a href="../../features.html" >Features</a></li><li id="xooki-license"><a href="http://www.apache.org/licenses/" >License</a></li><li id="xooki-faq"><a href="../../faq.html" >FAQ</a></li></ul></li><li id="xooki-download"><a href="../../download.html" >Download</a></li><li id="xooki-history" class="submenu">History<ul class="open"><li id="xooki-history/trunk/index" class="submenu"><a href="../../history/trunk/index.html" >Trunk</a><ul class="open"><li id="xooki-history/trunk/tutorials" class="submenu"><a href="../../history/trunk/tutorials.html" >Tutorials</a><ul class="closed"><li id="xooki-history/trunk/howto/GettingStarted"><a href="../../history/trunk/howto/GettingStarted.html" >Getting Started</a></li><li id="xooki-history/trunk/howto/SettingupasimpleEasyAntproject"><a href="../../history/trunk/howto/Settin
 gupasimpleEasyAntproject.html" >Setting up a simple EasyAnt Project</a></li><li id="xooki-history/trunk/howto/writePlugins"><a href="../../history/trunk/howto/writePlugins.html" >Writing plugins</a></li><li id="xooki-history/trunk/howto/skeleton"><a href="../../history/trunk/howto/skeleton.html" >Working with skeletons of project</a></li><li id="xooki-history/trunk/howto/multimodules"><a href="../../history/trunk/howto/multimodules.html" >Working with multi-modules</a></li><li id="xooki-history/trunk/howto/BuildConfigurations"><a href="../../history/trunk/howto/BuildConfigurations.html" >Build configurations</a></li></ul></li><li id="xooki-history/trunk/reference" class="submenu"><a href="../../history/trunk/reference.html" class="current">Reference</a><ul class="open"><li id="xooki-history/trunk/ref/features"><a href="../../history/trunk/ref/features.html" >Features</a></li><li id="xooki-history/trunk/ref/Defaultlifecycle"><a href="../../history/trunk/ref/Defaultlifecycle.h
 tml" >Default lifecycle</a></li><li id="xooki-history/trunk/ref/Directorystructure"><a href="../../history/trunk/ref/Directorystructure.html" >Directory structure</a></li><li id="xooki-history/trunk/ref/Modulefiles"><a href="../../history/trunk/ref/Modulefiles.html" >Module files</a></li><li id="xooki-history/trunk/ref/ProjectMancommand"><a href="../../history/trunk/ref/ProjectMancommand.html" >ProjectMan commands</a></li><li id="xooki-history/trunk/ref/phases"><a href="../../history/trunk/ref/phases.html" >Understanding phases</a></li><li id="xooki-history/trunk/ref/anttasks" class="submenu"><a href="../../history/trunk/ref/anttasks.html" >Ant Tasks</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/BindTarget"><a href="../../history/trunk/ref/anttasks/BindTarget.html" >bindtarget</a></li><li id="xooki-history/trunk/ref/anttasks/checkresolver"><a href="../../history/trunk/ref/anttasks/checkresolver.html" >checkresolver</a></li><li id="xooki-history/trunk/ref/ant
 tasks/CoreVersiontask"><a href="../../history/trunk/ref/anttasks/CoreVersiontask.html" >core-version</a></li><li id="xooki-history/trunk/ref/anttasks/easyant"><a href="../../history/trunk/ref/anttasks/easyant.html" >easyant</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath" class="submenu"><a href="../../history/trunk/ref/anttasks/findclasspath.html" >findclasspath</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/findclasspath/basic-configuration-strategy"><a href="../../history/trunk/ref/anttasks/findclasspath/basic-configuration-strategy.html" >basic-configuration-strategy</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath/environment-strategy"><a href="../../history/trunk/ref/anttasks/findclasspath/environment-strategy.html" >environment-strategy</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath/project-dependency-strategy"><a href="../../history/trunk/ref/anttasks/findclasspath/project-dependency-strategy.html" >project
 -dependency-strategy</a></li></ul></li><li id="xooki-history/trunk/ref/anttasks/Importtask" class="submenu"><a href="../../history/trunk/ref/anttasks/Importtask.html" >import</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/plugintask"><a href="../../history/trunk/ref/anttasks/plugintask.html" >plugin task</a></li><li id="xooki-history/trunk/ref/anttasks/buildtypetask"><a href="../../history/trunk/ref/anttasks/buildtypetask.html" >buildtype task</a></li></ul></li><li id="xooki-history/trunk/ref/anttasks/menugenerator"><a href="../../history/trunk/ref/anttasks/menugenerator.html" >menugenerator</a></li><li id="xooki-history/trunk/ref/anttasks/LoadModuletask"><a href="../../history/trunk/ref/anttasks/LoadModuletask.html" >loadmodule</a></li><li id="xooki-history/trunk/ref/anttasks/Parametertask"><a href="../../history/trunk/ref/anttasks/Parametertask.html" >parameter</a></li><li id="xooki-history/trunk/ref/anttasks/Pathtask"><a href="../../history/trunk/ref/antta
 sks/Pathtask.html" >path</a></li><li id="xooki-history/trunk/ref/anttasks/Property"><a href="../../history/trunk/ref/anttasks/Property.html" >property</a></li><li id="xooki-history/trunk/ref/anttasks/registerartifact"><a href="../../history/trunk/ref/anttasks/registerartifact.html" >registerartifact</a></li><li id="xooki-history/trunk/ref/anttasks/SubModuletask"><a href="../../history/trunk/ref/anttasks/SubModuletask.html" >submodule</a></li></ul></li><li id="xooki-history/trunk/ref/buildtypes/buildtypes"><a href="../../history/trunk/ref/buildtypes/buildtypes.html" >Build Types</a></li><li id="xooki-history/trunk/ref/plugins/plugins"><a href="../../history/trunk/ref/plugins/plugins.html" >Plugins</a></li><li id="xooki-history/trunk/ref/EasyAntconfigurationfile"><a href="../../history/trunk/ref/EasyAntconfigurationfile.html" >EasyAnt configuration file</a></li><li id="xooki-history/trunk/ref/ProjectIvyInstance"><a href="../../history/trunk/ref/ProjectIvyInstance.html" >Projec
 t Ivy Instance</a></li></ul></li><li id="xooki-history/trunk/changelog" class="submenu"><a href="../../history/trunk/changelog.html" >Changelog</a><ul class="closed"><li id="xooki-history/trunk/changelog/0.7"><a href="../../history/trunk/changelog/0.7.html" >0.7</a></li></ul></li><li id="xooki-history/trunk/faq"><a href="../../history/trunk/faq.html" >FAQ</a></li><li id="xooki-history/trunk/contact"><a href="../../history/trunk/contact.html" >Contact</a></li></ul></li></ul></li><li id="xooki-contact" class="submenu"><a href="../../contact.html" >Get Involved</a><ul class="closed"><li id="xooki-Mailinglist"><a href="../../Mailinglist.html" >Mailing list</a></li><li id="xooki-Issuetracking"><a href="../../Issuetracking.html" >Issue tracking</a></li><li id="xooki-Sourcerepository"><a href="../../Sourcerepository.html" >Source repository</a></li><li id="xooki-irc"><a href="../../irc.html" >IRC</a></li></ul></li><li id="xooki-Team"><a href="../../Team.html" >Team</a></li><li id="
 xooki-foundation" class="submenu"><a href="../../foundation.html" >Foundation</a><ul class="closed"><li id="xooki-undefined"><a href="http://www.apache.org" >ASF</a></li><li id="xooki-undefined"><a href="http://www.apache.org/foundation/sponsorship.html" >Sponsorship</a></li><li id="xooki-undefined"><a href="http://www.apache.org/foundation/thanks.html" >Thanks</a></li></ul></li></ul>
+        </div>
+    </div>
+
+    <div id="posts">
+        <br class="xooki-br"/><h1>Reference</h1>
+
+If you don't know EasyAnt at all, give a glance at its <a href="ref/features.html">features</a>, the <a href="faq.html">FAQ</a> and the <a href="tutorials.html">tutorials</a> before digging into this reference documentation.<br class="xooki-br"/><br class="xooki-br"/><h2>How does it work?</h2>
+Since 0.6, easyant-core.jar is in charge of :
+<ul>
+  <li>Loading  the ivy instance used by easyant internal (used to retrieve buildtypes / plugins)</li>
+  <li>Loading all the system plugins.
+</ul>
+This can be configured in a <a href="ref/EasyAntconfigurationfile.html">configuration file</a>.<br class="xooki-br"/><br class="xooki-br"/>Then it uses the <a href="ref/anttasks/LoadModuletask.html">loadmodule task</a> provided by easyant, which basically parses an Ivy file (module.ivy) and looks for instructions in the Ivy file for easyant (similar to the pom concept actually).<br class="xooki-br"/><br class="xooki-br"/>Finally easyant tries to import an optional file called module.ant in the user directory (the module to build). In the examples, there is no such file, but this would let the user customize the build with an Ant script if necessary.<br class="xooki-br"/><br class="xooki-br"/><h2>EasyAnt instructions in module.ivy</h2>
+A module.ivy looks like this
+<pre>
+&lt;ea:build organisation="org.apache.easyant.buildtypes" module="build-std-java" revision="0.2"&gt;<br class="xooki-br"/>        &lt;ea:property name="run.main.classname" value="org.apache.easyant.example.Example"/&gt;<br class="xooki-br"/>        &lt;ea:property name="target.artifacts" value="dist"/&gt;<br class="xooki-br"/>        &lt;ea:plugin module="emma" revision="0.1"/&gt;<br class="xooki-br"/>&lt;/ea:build&gt;
+</pre>
+
+The idea is to have a very limited options of customizing the build in the Ivy file: settings properties, and telling which main build module should be imported. If you need more, you can use a module.ant file.<br class="xooki-br"/><br class="xooki-br"/>Let's try to understand how to use it.<br class="xooki-br"/>'ea:build' tag is the main instruction. Type argument in easyant tag references a build type, which tells which build module should be imported (considered as an <a href="ref/anttasks/Importtask.html">import</a>), see below.<br class="xooki-br"/>Example:
+<pre>
+&lt;ea:build organisation="org.apache.easyant.buildtypes" module="build-std-java" revision="0.2"&gt;
+</pre>
+You can also have property definition, as you would have in an Ant script<br class="xooki-br"/>Example:
+<pre>
+&lt;ea:property name="target.artifacts" value="dist"/&gt;
+</pre>
+Usually build-type does the basic stuff. But sometimes we need something more (Source code management feature / code coverage etc...).<br class="xooki-br"/>You can load several plugins using the plugin tag.<br class="xooki-br"/>Example:
+<pre>
+&lt;ea:plugin module="emma" revision="0.1"/&gt;
+</pre>
+
+In this example emma module is loaded as a plugin(considered as an <a href="ref/anttasks/Importtask.html">include</a>). <br class="xooki-br"/>As easyant proceeds with execution, all targets are imported in current project prefixed by the project name.<br class="xooki-br"/>This means all targets included in emma module will be prefixed by org.apache.easyant.plugins#emma.<br class="xooki-br"/>Example :
+<pre>
+org.apache.easyant.plugins#emma:emma generate emma covera report
+</pre>
+
+As the name is not really "user-friendly" you can use an alias for the prefix using "as" attribute.<br class="xooki-br"/>Example:
+<pre>
+&lt;ea:plugin module="emma" revision="0.1" as="emma"/&gt;
+</pre>
+Doing this, all targets included in emma module will be prefixed by "emma"<br class="xooki-br"/>Example :
+<pre>
+emma:emma generate emma coverage report
+</pre>
+
+<h2>build plugins:</h2>
+There is three types of build modules:
+<ul>
+<li>build types</li>
+<li>phase description</li>
+<li>plugins</li>
+</ul>
+
+<h3>build types:</h3>
+The main build script are build type (build-std-java in my previous example).<br class="xooki-br"/><br class="xooki-br"/>Build types are intended to provide a full build for a particular type of project (simple java, war, ear, ...). EasyAnt comes with a set of build types modules, but users could extend/replace these types as they want. Then in most cases they could simply define which build type to import for each module (either standard or custom), and that's pretty much all. Hence you usually import only one build type module at a time.
+<table>
+  <thead>
+    <tr>
+      <td>Module name</td>
+      <td>Description</td>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>build-std-java</td>
+      <td>a standard build for simple java modules, relying on standard phases, and providing compilation, execution and unit tests</td>
+    </tr>
+    <tr>
+      <td>build-webapp-java</td>
+      <td>a standard build for webapp java modules, relying on standard phases, and providing compilation, execution and unit tests</td>
+    </tr>
+    <tr>
+      <td>build-std-scala</td>
+      <td>a standard build for simple scala modules, relying on standard phases, and providing compilation, execution and unit tests</td>
+    </tr>
+  </tbody>
+</table>
+
+<h3>phases description:</h3>
+Phases define an ordered set of build phases. Build phases are responsible for the build choreography at macro level. They are inspired by the same concept in Maven. In practice they are very similar to Ant targets, except that their dependencies can be defined by the dependency target using a syntax like this:<br class="xooki-br"/>
+<pre>
+&lt;target name="xxx" phase="yyy" /&gt;
+</pre>
+This basically adds the target "xxx" to the list of dependencies of the phase "yyy".<br class="xooki-br"/>Usually you use only one phases definition build module.
+<table>
+  <thead>
+    <tr>
+      <td>Module name</td>
+      <td>Description</td>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>phases-std</td>
+      <td>describes the standard phases of a build. These phase are directly inspired by maven 2 standard phases.</td>
+    </tr>
+  </tbody>
+</table>
+
+See <a href="ref/phases.html">Understanding phases</a> to have more informations on phases.<br class="xooki-br"/><br class="xooki-br"/><h3>Plugins</h3>
+Build plugins are there to actually define each block of the build system. They interact with each other by relying on the file system and properties (for instance run-java expect java classes to be in directory pointed by ${target.main.classes}). For the whole build choreography they rely on phases. Each build plugin define the expected "parameters" (i.e. the expected properties, paths and phases) by using a parameter task like this:<br class="xooki-br"/>
+<pre>
+&lt;ea:parameter property="src.main.java" required="true" description="directory where sources to be compiled are" /&gt;
+</pre>
+
+This is intended to be used both for validation and documentation, ATM only basic validation is performed.
+<ul>
+  <li>Java plugins<br class="xooki-br"/>    <ul>
+      <li>Java compilation</li>
+      <li>Javadoc generation</li>
+      <li>Run java application</li>
+    </ul>
+  </li>
+  <li>Scala plugins<br class="xooki-br"/>    <ul>
+      <li>Scala compilation</li>
+      <li>Scaladoc</li>
+    </ul>
+  </li>
+  <li>Packaging plugins<br class="xooki-br"/>    <ul>
+      <li>Manifest plugins</li>
+      <li>Packaging jar application</li>
+      <li>Packaging war application</li>
+      <li>Source packaging</li>
+    </ul>
+  </li>
+  <li>Test plugins<br class="xooki-br"/>    <ul>
+      <li>abstract tests (used by all *tests plugins)</li>
+      <li>Junit tests</li>
+      <li>TestNG tests</li>
+    </ul>
+  </li>
+  <li>Dependency / Publication<br class="xooki-br"/>    <ul>
+      <li>Common ivy tasks (Reports, clean-cache, etc...)</li>
+      <li>Dependency management (using Apache Ivy)</li>
+      <li>Publication (using Apache Ivy)</li>
+    </ul>
+  </li>
+  <li>Source Code Management Plugins<br class="xooki-br"/>    <ul>
+      <li>SVN</li>
+    </ul>
+  </li>
+  <li>Documentation Plugins<br class="xooki-br"/>    <ul>
+      <li>Documentation generation</li>
+      <li>Xooki</li>
+    </ul>
+  </li>
+  <li>Others Plugins<br class="xooki-br"/>    <ul>
+      <li>Clean</li>
+      <li>Resource standard</li>
+      <li>Emma coverage</li>
+      <li>Checkstyle</li>
+      <li>Jetty deployment</li>
+      <li>Skeleton plugins (manages skeleton of projects)</li>
+     </ul>
+  </li>
+</ul>
+
+    </div>
+    <!-- end #posts -->
+    <!-- end #links -->
+    <div style="clear: both;">&nbsp;</div>
+</div>
+<!-- end #content -->
+<div id="footer">
+    <p id="legal">
+        <i>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache License, Version 2.0</a>.</i><br>
+        <i>Apache EasyAnt, Apache Ivy, Apache Ant, Ivy, Ant, Apache, the Apache Ivy logo, the Apache Ant logo and the Apache feather logo are trademarks of The Apache Software Foundation.</i><br>
+        <i>All other marks mentioned may be trademarks or registered trademarks of their respective owners. </i>
+    </p>
+</div>
+<!-- end #footer -->
+</body>
+</html>

Propchange: incubator/easyant/site/staging/history/trunk/reference.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/site/staging/history/trunk/reference.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/site/staging/history/trunk/reference.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: incubator/easyant/site/staging/history/trunk/tutorials.html
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/tutorials.html?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/tutorials.html (added)
+++ incubator/easyant/site/staging/history/trunk/tutorials.html Mon Mar 14 14:29:00 2011
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<html>
+<head>
+    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+    <script type="text/javascript">var xookiConfig = {level: 0};</script>   
+    
+
+  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+  <title>Tutorials</title>
+  <meta name="keywords" content="" />
+  <meta name="description" content="" />
+  <link rel="stylesheet" type="text/css" href="../../style/style.css" media="screen"/>
+  <!-- for tree, see if it would better go in xooki.js -->
+  <link rel="stylesheet" type="text/css" href="../../style/tree.css" />
+  <script src="../../js/jquery.pack.js" type="text/javascript"></script>
+  <script src="../../js/jquery.treeview.js" type="text/javascript"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
+  </script>
+
+<script language="javascript" type="text/javascript">xooki = {u: function(url) {return "../../xooki/"+url;}};</script>
+</head>
+<body>
+<div id="header">
+    <div id="incubatorlogo">
+	<img src="../../images/apache-incubator-logo.png"/>
+    </div>    
+    <div id="topmenu">
+        <ul>
+            <li><a href="../../index.html" id="topmenu1" accesskey="1" title="">Home</a></li>
+            <li><a href="../../contact.html" id="topmenu2" accesskey="2" title="">Get involved</a></li>
+        </ul>
+    </div>
+</div>
+<!-- end #header -->
+<div id="menu">
+    <ul>
+        <li class="first"><a href="../../index.html" accesskey="1" title="">Home</a></li>
+        <li><a href="../../download.html" accesskey="1" title="">Download</a></li>
+        <li><a href="http://www.apache.org/licenses/" title="">License</a></li>
+        <li><a href="../../history/trunk/tutorials.html" title="">Tutorials</a></li>
+        <li><a href="../../history/trunk/reference.html" title="">References</a></li>
+    </ul>
+</div>
+<!-- end #menu -->
+<div id="content">
+    <div id="sidebar" class="boxed">
+        <h2 class="title">Apache EasyAnt&#153;</h2>
+        <div id="links">
+                <ul id="treemenu" class="treeview"><li id="xooki-index" class="submenu"><a href="../../index.html" >Home</a><ul class="closed"><li id="xooki-features"><a href="../../features.html" >Features</a></li><li id="xooki-license"><a href="http://www.apache.org/licenses/" >License</a></li><li id="xooki-faq"><a href="../../faq.html" >FAQ</a></li></ul></li><li id="xooki-download"><a href="../../download.html" >Download</a></li><li id="xooki-history" class="submenu">History<ul class="open"><li id="xooki-history/trunk/index" class="submenu"><a href="../../history/trunk/index.html" >Trunk</a><ul class="open"><li id="xooki-history/trunk/tutorials" class="submenu"><a href="../../history/trunk/tutorials.html" class="current">Tutorials</a><ul class="open"><li id="xooki-history/trunk/howto/GettingStarted"><a href="../../history/trunk/howto/GettingStarted.html" >Getting Started</a></li><li id="xooki-history/trunk/howto/SettingupasimpleEasyAntproject"><a href="../../history/trunk
 /howto/SettingupasimpleEasyAntproject.html" >Setting up a simple EasyAnt Project</a></li><li id="xooki-history/trunk/howto/writePlugins"><a href="../../history/trunk/howto/writePlugins.html" >Writing plugins</a></li><li id="xooki-history/trunk/howto/skeleton"><a href="../../history/trunk/howto/skeleton.html" >Working with skeletons of project</a></li><li id="xooki-history/trunk/howto/multimodules"><a href="../../history/trunk/howto/multimodules.html" >Working with multi-modules</a></li><li id="xooki-history/trunk/howto/BuildConfigurations"><a href="../../history/trunk/howto/BuildConfigurations.html" >Build configurations</a></li></ul></li><li id="xooki-history/trunk/reference" class="submenu"><a href="../../history/trunk/reference.html" >Reference</a><ul class="closed"><li id="xooki-history/trunk/ref/features"><a href="../../history/trunk/ref/features.html" >Features</a></li><li id="xooki-history/trunk/ref/Defaultlifecycle"><a href="../../history/trunk/ref/Defaultlifecycle.h
 tml" >Default lifecycle</a></li><li id="xooki-history/trunk/ref/Directorystructure"><a href="../../history/trunk/ref/Directorystructure.html" >Directory structure</a></li><li id="xooki-history/trunk/ref/Modulefiles"><a href="../../history/trunk/ref/Modulefiles.html" >Module files</a></li><li id="xooki-history/trunk/ref/ProjectMancommand"><a href="../../history/trunk/ref/ProjectMancommand.html" >ProjectMan commands</a></li><li id="xooki-history/trunk/ref/phases"><a href="../../history/trunk/ref/phases.html" >Understanding phases</a></li><li id="xooki-history/trunk/ref/anttasks" class="submenu"><a href="../../history/trunk/ref/anttasks.html" >Ant Tasks</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/BindTarget"><a href="../../history/trunk/ref/anttasks/BindTarget.html" >bindtarget</a></li><li id="xooki-history/trunk/ref/anttasks/checkresolver"><a href="../../history/trunk/ref/anttasks/checkresolver.html" >checkresolver</a></li><li id="xooki-history/trunk/ref/ant
 tasks/CoreVersiontask"><a href="../../history/trunk/ref/anttasks/CoreVersiontask.html" >core-version</a></li><li id="xooki-history/trunk/ref/anttasks/easyant"><a href="../../history/trunk/ref/anttasks/easyant.html" >easyant</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath" class="submenu"><a href="../../history/trunk/ref/anttasks/findclasspath.html" >findclasspath</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/findclasspath/basic-configuration-strategy"><a href="../../history/trunk/ref/anttasks/findclasspath/basic-configuration-strategy.html" >basic-configuration-strategy</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath/environment-strategy"><a href="../../history/trunk/ref/anttasks/findclasspath/environment-strategy.html" >environment-strategy</a></li><li id="xooki-history/trunk/ref/anttasks/findclasspath/project-dependency-strategy"><a href="../../history/trunk/ref/anttasks/findclasspath/project-dependency-strategy.html" >project
 -dependency-strategy</a></li></ul></li><li id="xooki-history/trunk/ref/anttasks/Importtask" class="submenu"><a href="../../history/trunk/ref/anttasks/Importtask.html" >import</a><ul class="closed"><li id="xooki-history/trunk/ref/anttasks/plugintask"><a href="../../history/trunk/ref/anttasks/plugintask.html" >plugin task</a></li><li id="xooki-history/trunk/ref/anttasks/buildtypetask"><a href="../../history/trunk/ref/anttasks/buildtypetask.html" >buildtype task</a></li></ul></li><li id="xooki-history/trunk/ref/anttasks/menugenerator"><a href="../../history/trunk/ref/anttasks/menugenerator.html" >menugenerator</a></li><li id="xooki-history/trunk/ref/anttasks/LoadModuletask"><a href="../../history/trunk/ref/anttasks/LoadModuletask.html" >loadmodule</a></li><li id="xooki-history/trunk/ref/anttasks/Parametertask"><a href="../../history/trunk/ref/anttasks/Parametertask.html" >parameter</a></li><li id="xooki-history/trunk/ref/anttasks/Pathtask"><a href="../../history/trunk/ref/antta
 sks/Pathtask.html" >path</a></li><li id="xooki-history/trunk/ref/anttasks/Property"><a href="../../history/trunk/ref/anttasks/Property.html" >property</a></li><li id="xooki-history/trunk/ref/anttasks/registerartifact"><a href="../../history/trunk/ref/anttasks/registerartifact.html" >registerartifact</a></li><li id="xooki-history/trunk/ref/anttasks/SubModuletask"><a href="../../history/trunk/ref/anttasks/SubModuletask.html" >submodule</a></li></ul></li><li id="xooki-history/trunk/ref/buildtypes/buildtypes"><a href="../../history/trunk/ref/buildtypes/buildtypes.html" >Build Types</a></li><li id="xooki-history/trunk/ref/plugins/plugins"><a href="../../history/trunk/ref/plugins/plugins.html" >Plugins</a></li><li id="xooki-history/trunk/ref/EasyAntconfigurationfile"><a href="../../history/trunk/ref/EasyAntconfigurationfile.html" >EasyAnt configuration file</a></li><li id="xooki-history/trunk/ref/ProjectIvyInstance"><a href="../../history/trunk/ref/ProjectIvyInstance.html" >Projec
 t Ivy Instance</a></li></ul></li><li id="xooki-history/trunk/changelog" class="submenu"><a href="../../history/trunk/changelog.html" >Changelog</a><ul class="closed"><li id="xooki-history/trunk/changelog/0.7"><a href="../../history/trunk/changelog/0.7.html" >0.7</a></li></ul></li><li id="xooki-history/trunk/faq"><a href="../../history/trunk/faq.html" >FAQ</a></li><li id="xooki-history/trunk/contact"><a href="../../history/trunk/contact.html" >Contact</a></li></ul></li></ul></li><li id="xooki-contact" class="submenu"><a href="../../contact.html" >Get Involved</a><ul class="closed"><li id="xooki-Mailinglist"><a href="../../Mailinglist.html" >Mailing list</a></li><li id="xooki-Issuetracking"><a href="../../Issuetracking.html" >Issue tracking</a></li><li id="xooki-Sourcerepository"><a href="../../Sourcerepository.html" >Source repository</a></li><li id="xooki-irc"><a href="../../irc.html" >IRC</a></li></ul></li><li id="xooki-Team"><a href="../../Team.html" >Team</a></li><li id="
 xooki-foundation" class="submenu"><a href="../../foundation.html" >Foundation</a><ul class="closed"><li id="xooki-undefined"><a href="http://www.apache.org" >ASF</a></li><li id="xooki-undefined"><a href="http://www.apache.org/foundation/sponsorship.html" >Sponsorship</a></li><li id="xooki-undefined"><a href="http://www.apache.org/foundation/thanks.html" >Thanks</a></li></ul></li></ul>
+        </div>
+    </div>
+
+    <div id="posts">
+        <br class="xooki-br"/><h1>Tutorial</h1>
+The best way to learn is to practice! That's what the tutorials will help you to do, to discover some of the great EasyAnt features.<br class="xooki-br"/><br class="xooki-br"/><h2>Setting up your environment</h2>
+The only thing you need to do to use easyant is to set the EASYANT_HOME property.<br class="xooki-br"/>You should first set up in your environment the EASYANT_HOME variable :
+<ul>
+    <li>for windows users : set EASYANT_HOME=c:\path\to\easyant</li>
+    <li>for unix users : export EASYANT_HOME=/path/to/easyant</li>
+</ul>
+You may also add EASYANT_HOME to your path :
+<ul>
+    <li>for windows users : set PATH=%EASYANT_HOME%\bin;%PATH%</li>
+    <li>for unix users : export PATH=$EASYANT_HOME/bin:$PATH</li>
+</ul>
+    </div>
+    <!-- end #posts -->
+    <!-- end #links -->
+    <div style="clear: both;">&nbsp;</div>
+</div>
+<!-- end #content -->
+<div id="footer">
+    <p id="legal">
+        <i>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache License, Version 2.0</a>.</i><br>
+        <i>Apache EasyAnt, Apache Ivy, Apache Ant, Ivy, Ant, Apache, the Apache Ivy logo, the Apache Ant logo and the Apache feather logo are trademarks of The Apache Software Foundation.</i><br>
+        <i>All other marks mentioned may be trademarks or registered trademarks of their respective owners. </i>
+    </p>
+</div>
+<!-- end #footer -->
+</body>
+</html>

Propchange: incubator/easyant/site/staging/history/trunk/tutorials.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/site/staging/history/trunk/tutorials.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/site/staging/history/trunk/tutorials.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: incubator/easyant/site/staging/history/trunk/xooki/antlib.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/antlib.xml?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/xooki/antlib.xml (added)
+++ incubator/easyant/site/staging/history/trunk/xooki/antlib.xml Mon Mar 14 14:29:00 2011
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<antlib>
+    <scriptdef name="generate" language="javascript">
+        <element name="fileset" type="fileset"/>
+        <attribute name="destDir"/>
+        <attribute name="checkUpToDate"/>
+        <attribute name="printerFriendly"/>
+        <![CDATA[
+            print('Target Dir: ' + attributes.get("destdir"));
+            importClass(java.io.File);
+
+            fs = elements.get("fileset").get(0);
+            srcDir = elements.get("fileset").get(0).getDir(project);
+
+            // Get the files (array) of that fileset
+            ds = fs.getDirectoryScanner(project);
+            srcFiles = ds.getIncludedFiles();
+
+            // iterate over that array
+            print('processing '+srcFiles.length+' source files...');
+            for (i=0; i<srcFiles.length; i++) {
+
+                // get the values via Java API
+                var file = new File(fs.getDir(project), srcFiles[i]);
+
+                var basedir = file.getParent();
+                var filename = file.getName();
+                var filepath = srcFiles[i].substring(0, srcFiles[i].lastIndexOf(project.getProperty("file.separator"))+1);
+
+                if (attributes.get("checkuptodate") == "true") {
+                    p = "xooki."+file.getAbsolutePath().replace(' ','_')+".uptodate";
+                    upToDate = project.createTask("uptodate");
+                    upToDate.setProperty(p);
+                    upToDate.setSrcfile(file);
+                    upToDate.setTargetFile(new File(attributes.get("destdir")+"/"+filepath+"/"+filename));
+                    upToDate.perform();
+                    if (project.getProperty(p) != null) {
+                        self.log(srcFiles[i]+" is up to date", 3);
+                        continue;
+                    }
+                }
+
+                exec = project.createTask("exec");
+                exec.setDir(new File(basedir));
+                exec.setExecutable("jrunscript");
+                exec.setTaskName("generate");
+                exec.createArg().setValue(srcDir+"/xooki/xooki.js");
+                exec.createArg().setValue(filename);
+                exec.createArg().setValue(attributes.get("destdir")+"/"+filepath);
+                if (attributes.get("printerfriendly") == "true") {
+                    exec.createArg().setValue("print");
+                }
+                exec.perform();
+            }
+        ]]>
+    </scriptdef>
+    <scriptdef name="print" language="javascript">
+        <attribute name="src"/>
+        <attribute name="dest"/>
+        <attribute name="checkUpToDate"/>
+        <![CDATA[
+            importClass(java.io.File);
+
+          var file = new File(attributes.get("src"));
+          var destFile = new File(attributes.get("dest"));
+
+      var basedir = file.getParent();
+      var filename = file.getName();
+
+      var perform = true;
+
+            if (attributes.get("checkuptodate") == "true") {
+                p = "xooki."+file.getAbsolutePath().replace(' ','_')+".uptodate";
+                upToDate = project.createTask("uptodate");
+                upToDate.setProperty(p);
+                upToDate.setSrcfile(file);
+                upToDate.setTargetFile(destFile);
+                upToDate.perform();
+                if (project.getProperty(p) != null) {
+                    self.log(file+" is up to date", 3);
+                    perform = false;
+                }
+            }
+
+            if (perform) {
+            exec = project.createTask("exec");
+            exec.setDir(new File(basedir));
+            exec.setExecutable("jrunscript");
+            exec.setTaskName("print");
+            exec.createArg().setValue(project.getProperty("basedir")+"/xooki/xooki.js");
+            exec.createArg().setValue(filename);
+            exec.createArg().setValue(destFile);
+            exec.createArg().setValue("print");
+            exec.perform();
+          }
+        ]]>
+    </scriptdef>
+</antlib>

Propchange: incubator/easyant/site/staging/history/trunk/xooki/antlib.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/site/staging/history/trunk/xooki/antlib.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/site/staging/history/trunk/xooki/antlib.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/easyant/site/staging/history/trunk/xooki/blankPageTpl.html
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/blankPageTpl.html?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/xooki/blankPageTpl.html (added)
+++ incubator/easyant/site/staging/history/trunk/xooki/blankPageTpl.html Mon Mar 14 14:29:00 2011
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<html>
+<head>
+    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+    <script type="text/javascript">var xookiConfig = {level: ${level}};</script>    
+    <script type="text/javascript" src="${relroot}xooki/xooki.js"></script>
+</head>
+<body>
+    <textarea id="xooki-source">
+    </textarea>
+<script type="text/javascript">xooki.postProcess();</script>
+</body>
+</html>

Propchange: incubator/easyant/site/staging/history/trunk/xooki/blankPageTpl.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/site/staging/history/trunk/xooki/blankPageTpl.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/site/staging/history/trunk/xooki/blankPageTpl.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: incubator/easyant/site/staging/history/trunk/xooki/images/addchild.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/images/addchild.gif?rev=1081393&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/site/staging/history/trunk/xooki/images/addchild.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/site/staging/history/trunk/xooki/images/debug.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/images/debug.gif?rev=1081393&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/site/staging/history/trunk/xooki/images/debug.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/site/staging/history/trunk/xooki/images/delete.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/images/delete.gif?rev=1081393&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/site/staging/history/trunk/xooki/images/delete.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/site/staging/history/trunk/xooki/images/down.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/images/down.gif?rev=1081393&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/site/staging/history/trunk/xooki/images/down.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/site/staging/history/trunk/xooki/images/edit.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/images/edit.gif?rev=1081393&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/site/staging/history/trunk/xooki/images/edit.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/site/staging/history/trunk/xooki/images/save.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/images/save.gif?rev=1081393&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/site/staging/history/trunk/xooki/images/save.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/site/staging/history/trunk/xooki/images/up.gif
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/images/up.gif?rev=1081393&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/easyant/site/staging/history/trunk/xooki/images/up.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: incubator/easyant/site/staging/history/trunk/xooki/messages.json
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/messages.json?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/xooki/messages.json (added)
+++ incubator/easyant/site/staging/history/trunk/xooki/messages.json Mon Mar 14 14:29:00 2011
@@ -0,0 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+{
+            "Impossible to save changes to ${0}": "Impossible to save changes to ${0}.
+ This could be because your browser doesn't support saving (instead, use FireFox if you can), or because the pathname to your Xooki file contains illegal characters"
+}

Added: incubator/easyant/site/staging/history/trunk/xooki/tiddly/util.js
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/tiddly/util.js?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/xooki/tiddly/util.js (added)
+++ incubator/easyant/site/staging/history/trunk/xooki/tiddly/util.js Mon Mar 14 14:29:00 2011
@@ -0,0 +1,182 @@
+// utility functions borrowed from tiddly wiki: http://www.tiddlywiki.com/
+// Tiddly Wiki License:
+/*
+TiddlyWiki 2.1.3 by Jeremy Ruston, (jeremy [at] osmosoft [dot] com)
+
+Copyright (c) Osmosoft Limited 2004-2006
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions and the following disclaimer in the documentation and/or other
+materials provided with the distribution.
+
+Neither the name of the Osmosoft Limited nor the names of its contributors may be
+used to endorse or promote products derived from this software without specific
+prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+*/
+
+if (typeof xooki.io == "undefined") {
+    xooki.io = {};
+}
+
+xooki.io.saveFile = function (fileUrl, content) {
+    var r = null;
+    if((r == null) || (r == false))
+        r = mozillaSaveFile(fileUrl, content);
+    if((r == null) || (r == false))
+        r = ieSaveFile(fileUrl, content);
+    return(r);
+}
+
+xooki.io.loadFile = function (fileUrl) {
+    var r = null;
+    if((r == null) || (r == false))
+        r = mozillaLoadFile(fileUrl);
+    if((r == null) || (r == false))
+        r = ieLoadFile(fileUrl);
+    return(r);
+}
+
+xooki.io.getLocalPath = function (originalPath) {
+    // Remove any location or query part of the URL
+    var argPos = originalPath.indexOf("?");
+    if(argPos != -1)
+        originalPath = originalPath.substr(0,argPos);
+    var hashPos = originalPath.indexOf("#");
+    if(hashPos != -1)
+        originalPath = originalPath.substr(0,hashPos);
+    // Convert file://localhost/ to file:///
+    if(originalPath.indexOf("file://localhost/") == 0)
+        originalPath = "file://" + originalPath.substr(16);
+    // Convert to a native file format assuming
+    // "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
+    // "file://///server/share/path/path/path..." - FireFox pc network file --> "\server\share\path\path\path..."
+    // "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
+    // "file://server/share/path/path/path..." - pc network file --> "\server\share\path\path\path..."
+    var localPath;
+    if(originalPath.charAt(9) == ":") // pc local file
+        localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\");
+    else if(originalPath.indexOf("file://///") == 0) // FireFox pc network file
+        localPath = "\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\");
+    else if(originalPath.indexOf("file:///") == 0) // mac/unix local file
+        localPath = unescape(originalPath.substr(7));
+    else if(originalPath.indexOf("file:/") == 0) // mac/unix local file
+        localPath = unescape(originalPath.substr(5));
+    else // pc network file
+        localPath = "\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\");
+    return localPath;
+}
+
+
+// Returns null if it can't do it, false if there's an error, true if it saved OK
+function ieSaveFile(filePath, content)
+{
+    try
+        {
+        var fso = new ActiveXObject("Scripting.FileSystemObject");
+        }
+    catch(e)
+        {
+        //alert("Exception while attempting to save
+
+" + e.toString());
+        return(null);
+        }
+    var file = fso.OpenTextFile(filePath,2,-1,0);
+    file.Write(content);
+    file.Close();
+    return(true);
+}
+
+// Returns null if it can't do it, false if there's an error, or a string of the content if successful
+function ieLoadFile(filePath)
+{
+    try
+        {
+        var fso = new ActiveXObject("Scripting.FileSystemObject");
+        var file = fso.OpenTextFile(filePath,1);
+        var content = file.ReadAll();
+        file.Close();
+        }
+    catch(e)
+        {
+        //alert("Exception while attempting to load
+
+" + e.toString());
+        return(null);
+        }
+    return(content);
+}
+
+// Returns null if it can't do it, false if there's an error, true if it saved OK
+function mozillaSaveFile(filePath, content)
+{
+    if(window.Components)
+        try
+            {
+            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+            var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+            file.initWithPath(filePath);
+            if (!file.exists())
+                file.create(0, 0664);
+            var out = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
+            out.init(file, 0x20 | 0x02, 00004,null);
+            out.write(content, content.length);
+            out.flush();
+            out.close();
+            return(true);
+            }
+        catch(e)
+            {
+            //alert("Exception while attempting to save
+
+" + e);
+            return(false);
+            }
+    return(null);
+}
+
+// Returns null if it can't do it, false if there's an error, or a string of the content if successful
+function mozillaLoadFile(filePath)
+{
+    if(window.Components)
+        try
+            {
+            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+            var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+            file.initWithPath(filePath);
+            if (!file.exists())
+                return(null);
+            var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
+            inputStream.init(file, 0x01, 00004, null);
+            var sInputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
+            sInputStream.init(inputStream);
+            return(sInputStream.read(sInputStream.available()));
+            }
+        catch(e)
+            {
+            //alert("Exception while attempting to load
+
+" + e);
+            return(false);
+            }
+    return(null);
+}
+
+// end tiddly wiki borrowed code

Propchange: incubator/easyant/site/staging/history/trunk/xooki/tiddly/util.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/site/staging/history/trunk/xooki/tiddly/util.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/site/staging/history/trunk/xooki/tiddly/util.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/easyant/site/staging/history/trunk/xooki/trimpath/template.js
URL: http://svn.apache.org/viewvc/incubator/easyant/site/staging/history/trunk/xooki/trimpath/template.js?rev=1081393&view=auto
==============================================================================
--- incubator/easyant/site/staging/history/trunk/xooki/trimpath/template.js (added)
+++ incubator/easyant/site/staging/history/trunk/xooki/trimpath/template.js Mon Mar 14 14:29:00 2011
@@ -0,0 +1,397 @@
+/**
+ * TrimPath Template. Release 1.0.38.
+ * Copyright (C) 2004, 2005 Metaha.
+ * 
+ * TrimPath Template is licensed under the GNU General Public License
+ * and the Apache License, Version 2.0, as follows:
+ *
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed WITHOUT ANY WARRANTY; without even the 
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+ * See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var TrimPath;
+
+// TODO: Debugging mode vs stop-on-error mode - runtime flag.
+// TODO: Handle || (or) characters and backslashes.
+// TODO: Add more modifiers.
+
+(function() {               // Using a closure to keep global namespace clean.
+    if (TrimPath == null)
+        TrimPath = new Object();
+    if (TrimPath.evalEx == null)
+        TrimPath.evalEx = function(src) { return eval(src); };
+
+    var UNDEFINED;
+    if (Array.prototype.pop == null)  // IE 5.x fix from Igor Poteryaev.
+        Array.prototype.pop = function() {
+            if (this.length === 0) {return UNDEFINED;}
+            return this[--this.length];
+        };
+    if (Array.prototype.push == null) // IE 5.x fix from Igor Poteryaev.
+        Array.prototype.push = function() {
+            for (var i = 0; i < arguments.length; ++i) {this[this.length] = arguments[i];}
+            return this.length;
+        };
+
+    TrimPath.parseTemplate = function(tmplContent, optTmplName, optEtc) {
+        if (optEtc == null)
+            optEtc = TrimPath.parseTemplate_etc;
+        var funcSrc = parse(tmplContent, optTmplName, optEtc);
+        var func = TrimPath.evalEx(funcSrc, optTmplName, 1);
+        if (func != null)
+            return new optEtc.Template(optTmplName, tmplContent, funcSrc, func, optEtc);
+        return null;
+    }
+    
+    try {
+        String.prototype.process = function(context, optFlags) {
+            var template = TrimPath.parseTemplate(this, null);
+            if (template != null)
+                return template.process(context, optFlags);
+            return this;
+        }
+    } catch (e) { // Swallow exception, such as when String.prototype is sealed.
+    }
+    
+    TrimPath.parseTemplate_etc = {};            // Exposed for extensibility.
+    TrimPath.parseTemplate_etc.statementTag = "forelse|for|if|elseif|else|var|macro";
+    TrimPath.parseTemplate_etc.statementDef = { // Lookup table for statement tags.
+        "if"     : { delta:  1, prefix: "if (", suffix: ") {", paramMin: 1 },
+        "else"   : { delta:  0, prefix: "} else {" },
+        "elseif" : { delta:  0, prefix: "} else if (", suffix: ") {", paramDefault: "true" },
+        "/if"    : { delta: -1, prefix: "}" },
+        "for"    : { delta:  1, paramMin: 3, 
+                     prefixFunc : function(stmtParts, state, tmplName, etc) {
+                        if (stmtParts[2] != "in")
+                            throw new etc.ParseError(tmplName, state.line, "bad for loop statement: " + stmtParts.join(' '));
+                        var iterVar = stmtParts[1];
+                        var listVar = "__LIST__" + iterVar;
+                        return [ "var ", listVar, " = ", stmtParts[3], ";",
+                             // Fix from Ross Shaull for hash looping, make sure that we have an array of loop lengths to treat like a stack.
+                             "var __LENGTH_STACK__;",
+                             "if (typeof(__LENGTH_STACK__) == 'undefined' || !__LENGTH_STACK__.length) __LENGTH_STACK__ = new Array();", 
+                             "__LENGTH_STACK__[__LENGTH_STACK__.length] = 0;", // Push a new for-loop onto the stack of loop lengths.
+                             "if ((", listVar, ") != null) { ",
+                             "var ", iterVar, "_ct = 0;",       // iterVar_ct variable, added by B. Bittman     
+                             "for (var ", iterVar, "_index in ", listVar, ") { ",
+                             iterVar, "_ct++;",
+                             "if (typeof(", listVar, "[", iterVar, "_index]) == 'function') {continue;}", // IE 5.x fix from Igor Poteryaev.
+                             "__LENGTH_STACK__[__LENGTH_STACK__.length - 1]++;",
+                             "var ", iterVar, " = ", listVar, "[", iterVar, "_index];" ].join("");
+                     } },
+        "forelse" : { delta:  0, prefix: "} } if (__LENGTH_STACK__[__LENGTH_STACK__.length - 1] == 0) { if (", suffix: ") {", paramDefault: "true" },
+        "/for"    : { delta: -1, prefix: "} }; delete __LENGTH_STACK__[__LENGTH_STACK__.length - 1];" }, // Remove the just-finished for-loop from the stack of loop lengths.
+        "var"     : { delta:  0, prefix: "var ", suffix: ";" },
+        "macro"   : { delta:  1, 
+                      prefixFunc : function(stmtParts, state, tmplName, etc) {
+                          var macroName = stmtParts[1].split('(')[0];
+                          return [ "var ", macroName, " = function", 
+                                   stmtParts.slice(1).join(' ').substring(macroName.length),
+                                   "{ var _OUT_arr = []; var _OUT = { write: function(m) { if (m) _OUT_arr.push(m); } }; " ].join('');
+                     } }, 
+        "/macro"  : { delta: -1, prefix: " return _OUT_arr.join(''); };" }
+    }
+    TrimPath.parseTemplate_etc.modifierDef = {
+        "eat"        : function(v)    { return ""; },
+        "escape"     : function(s)    { return String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"); },
+        "capitalize" : function(s)    { return String(s).toUpperCase(); },
+        "default"    : function(s, d) { return s != null ? s : d; }
+    }
+    TrimPath.parseTemplate_etc.modifierDef.h = TrimPath.parseTemplate_etc.modifierDef.escape;
+
+    TrimPath.parseTemplate_etc.Template = function(tmplName, tmplContent, funcSrc, func, etc) {
+        this.process = function(context, flags) {
+            if (context == null)
+                context = {};
+            if (context._MODIFIERS == null)
+                context._MODIFIERS = {};
+            if (context.defined == null)
+                context.defined = function(str) { return (context[str] != undefined); };
+            for (var k in etc.modifierDef) {
+                if (context._MODIFIERS[k] == null)
+                    context._MODIFIERS[k] = etc.modifierDef[k];
+            }
+            if (flags == null)
+                flags = {};
+            var resultArr = [];
+            var resultOut = { write: function(m) { resultArr.push(m); } };
+            try {
+                func(resultOut, context, flags);
+            } catch (e) {
+                if (flags.throwExceptions == true)
+                    throw e;
+                var result = new String(resultArr.join("") + "[ERROR: " + e.toString() + (e.message ? '; ' + e.message : '') + "]");
+                result["exception"] = e;
+                return result;
+            }
+            return resultArr.join("");
+        }
+        this.name       = tmplName;
+        this.source     = tmplContent; 
+        this.sourceFunc = funcSrc;
+        this.toString   = function() { return "TrimPath.Template [" + tmplName + "]"; }
+    }
+    TrimPath.parseTemplate_etc.ParseError = function(name, line, message) {
+        this.name    = name;
+        this.line    = line;
+        this.message = message;
+    }
+    TrimPath.parseTemplate_etc.ParseError.prototype.toString = function() { 
+        return ("TrimPath template ParseError in " + this.name + ": line " + this.line + ", " + this.message);
+    }
+    
+    var parse = function(body, tmplName, etc) {
+        body = cleanWhiteSpace(body);
+        var funcText = [ "var TrimPath_Template_TEMP = function(_OUT, _CONTEXT, _FLAGS) { with (_CONTEXT) {" ];
+        var state    = { stack: [], line: 1 };                              // TODO: Fix line number counting.
+        var endStmtPrev = -1;
+        while (endStmtPrev + 1 < body.length) {
+            var begStmt = endStmtPrev;
+            // Scan until we find some statement markup.
+            begStmt = body.indexOf("{", begStmt + 1);
+            while (begStmt >= 0) {
+                var endStmt = body.indexOf('}', begStmt + 1);
+                var stmt = body.substring(begStmt, endStmt);
+                var blockrx = stmt.match(/^\{(cdata|minify|eval)/); // From B. Bittman, minify/eval/cdata implementation.
+                if (blockrx) {
+                    var blockType = blockrx[1]; 
+                    var blockMarkerBeg = begStmt + blockType.length + 1;
+                    var blockMarkerEnd = body.indexOf('}', blockMarkerBeg);
+                    if (blockMarkerEnd >= 0) {
+                        var blockMarker;
+                        if( blockMarkerEnd - blockMarkerBeg <= 0 ) {
+                            blockMarker = "{/" + blockType + "}";
+                        } else {
+                            blockMarker = body.substring(blockMarkerBeg + 1, blockMarkerEnd);
+                        }                        
+                        
+                        var blockEnd = body.indexOf(blockMarker, blockMarkerEnd + 1);
+                        if (blockEnd >= 0) {                            
+                            emitSectionText(body.substring(endStmtPrev + 1, begStmt), funcText);
+                            
+                            var blockText = body.substring(blockMarkerEnd + 1, blockEnd);
+                            if (blockType == 'cdata') {
+                                emitText(blockText, funcText);
+                            } else if (blockType == 'minify') {
+                                emitText(scrubWhiteSpace(blockText), funcText);
+                            } else if (blockType == 'eval') {
+                                if (blockText != null && blockText.length > 0) // From B. Bittman, eval should not execute until process().
+                                    funcText.push('_OUT.write( (function() { ' + blockText + ' })() );');
+                            }
+                            begStmt = endStmtPrev = blockEnd + blockMarker.length - 1;
+                        }
+                    }                        
+                } else if (body.charAt(begStmt - 1) != '$' &&               // Not an expression or backslashed,
+                           body.charAt(begStmt - 1) != '\\') {              // so check if it is a statement tag.
+                    var offset = (body.charAt(begStmt + 1) == '/' ? 2 : 1); // Close tags offset of 2 skips '/'.
+                                                                            // 10 is larger than maximum statement tag length.
+                    if (body.substring(begStmt + offset, begStmt + 10 + offset).search(TrimPath.parseTemplate_etc.statementTag) == 0) 
+                        break;                                              // Found a match.
+                }
+                begStmt = body.indexOf("{", begStmt + 1);
+            }
+            if (begStmt < 0)                              // In "a{for}c", begStmt will be 1.
+                break;
+            var endStmt = body.indexOf("}", begStmt + 1); // In "a{for}c", endStmt will be 5.
+            if (endStmt < 0)
+                break;
+            emitSectionText(body.substring(endStmtPrev + 1, begStmt), funcText);
+            emitStatement(body.substring(begStmt, endStmt + 1), state, funcText, tmplName, etc);
+            endStmtPrev = endStmt;
+        }
+        emitSectionText(body.substring(endStmtPrev + 1), funcText);
+        if (state.stack.length != 0)
+            throw new etc.ParseError(tmplName, state.line, "unclosed, unmatched statement(s): " + state.stack.join(","));
+        funcText.push("}}; TrimPath_Template_TEMP");
+        return funcText.join("");
+    }
+    
+    var emitStatement = function(stmtStr, state, funcText, tmplName, etc) {
+        var parts = stmtStr.slice(1, -1).split(' ');
+        var stmt = etc.statementDef[parts[0]]; // Here, parts[0] == for/if/else/...
+        if (stmt == null) {                    // Not a real statement.
+            emitSectionText(stmtStr, funcText);
+            return;
+        }
+        if (stmt.delta < 0) {
+            if (state.stack.length <= 0)
+                throw new etc.ParseError(tmplName, state.line, "close tag does not match any previous statement: " + stmtStr);
+            state.stack.pop();
+        } 
+        if (stmt.delta > 0)
+            state.stack.push(stmtStr);
+
+        if (stmt.paramMin != null &&
+            stmt.paramMin >= parts.length)
+            throw new etc.ParseError(tmplName, state.line, "statement needs more parameters: " + stmtStr);
+        if (stmt.prefixFunc != null)
+            funcText.push(stmt.prefixFunc(parts, state, tmplName, etc));
+        else 
+            funcText.push(stmt.prefix);
+        if (stmt.suffix != null) {
+            if (parts.length <= 1) {
+                if (stmt.paramDefault != null)
+                    funcText.push(stmt.paramDefault);
+            } else {
+                for (var i = 1; i < parts.length; i++) {
+                    if (i > 1)
+                        funcText.push(' ');
+                    funcText.push(parts[i]);
+                }
+            }
+            funcText.push(stmt.suffix);
+        }
+    }
+
+    var emitSectionText = function(text, funcText) {
+        if (text.length <= 0)
+            return;
+        var nlPrefix = 0;               // Index to first non-newline in prefix.
+        var nlSuffix = text.length - 1; // Index to first non-space/tab in suffix.
+        while (nlPrefix < text.length && (text.charAt(nlPrefix) == '\n'))
+            nlPrefix++;
+        while (nlSuffix >= 0 && (text.charAt(nlSuffix) == ' ' || text.charAt(nlSuffix) == '\t'))
+            nlSuffix--;
+        if (nlSuffix < nlPrefix)
+            nlSuffix = nlPrefix;
+        if (nlPrefix > 0) {
+            funcText.push('if (_FLAGS.keepWhitespace == true) _OUT.write("');
+            var s = text.substring(0, nlPrefix).replace('\n', '\\n'); // A macro IE fix from BJessen.
+            if (s.charAt(s.length - 1) == '\n')
+            	s = s.substring(0, s.length - 1);
+            funcText.push(s);
+            funcText.push('");');
+        }
+        var lines = text.substring(nlPrefix, nlSuffix + 1).split('\n');
+        for (var i = 0; i < lines.length; i++) {
+            emitSectionTextLine(lines[i], funcText);
+            if (i < lines.length - 1)
+                funcText.push('_OUT.write("\\n");\n');
+        }
+        if (nlSuffix + 1 < text.length) {
+            funcText.push('if (_FLAGS.keepWhitespace == true) _OUT.write("');
+            var s = text.substring(nlSuffix + 1).replace('\n', '\\n');
+            if (s.charAt(s.length - 1) == '\n')
+            	s = s.substring(0, s.length - 1);
+            funcText.push(s);
+            funcText.push('");');
+        }
+    }
+    
+    var emitSectionTextLine = function(line, funcText) {
+        var endMarkPrev = '}';
+        var endExprPrev = -1;
+        while (endExprPrev + endMarkPrev.length < line.length) {
+            var begMark = "${", endMark = "}";
+            var begExpr = line.indexOf(begMark, endExprPrev + endMarkPrev.length); // In "a${b}c", begExpr == 1
+            if (begExpr < 0)
+                break;
+            if (line.charAt(begExpr + 2) == '%') {
+                begMark = "${%";
+                endMark = "%}";
+            }
+            var endExpr = line.indexOf(endMark, begExpr + begMark.length);         // In "a${b}c", endExpr == 4;
+            if (endExpr < 0)
+                break;
+            emitText(line.substring(endExprPrev + endMarkPrev.length, begExpr), funcText);                
+            // Example: exprs == 'firstName|default:"John Doe"|capitalize'.split('|')
+            var exprArr = line.substring(begExpr + begMark.length, endExpr).replace(/\|\|/g, "#@@#").split('|');
+            for (var k in exprArr) {
+                if (exprArr[k].replace) // IE 5.x fix from Igor Poteryaev.
+                    exprArr[k] = exprArr[k].replace(/#@@#/g, '||');
+            }
+            funcText.push('_OUT.write(');
+            emitExpression(exprArr, exprArr.length - 1, funcText); 
+            funcText.push(');');
+            endExprPrev = endExpr;
+            endMarkPrev = endMark;
+        }
+        emitText(line.substring(endExprPrev + endMarkPrev.length), funcText); 
+    }
+    
+    var emitText = function(text, funcText) {
+        if (text == null ||
+            text.length <= 0)
+            return;
+        text = text.replace(/\\/g, '\\\\');
+        text = text.replace(/\n/g, '\\n');
+        text = text.replace(/"/g,  '\\"');
+        funcText.push('_OUT.write("');
+        funcText.push(text);
+        funcText.push('");');
+    }
+    
+    var emitExpression = function(exprArr, index, funcText) {
+        // Ex: foo|a:x|b:y1,y2|c:z1,z2 is emitted as c(b(a(foo,x),y1,y2),z1,z2)
+        var expr = exprArr[index]; // Ex: exprArr == [firstName,capitalize,default:"John Doe"]
+        if (index <= 0) {          // Ex: expr    == 'default:"John Doe"'
+            funcText.push(expr);
+            return;
+        }
+        var parts = expr.split(':');
+        funcText.push('_MODIFIERS["');
+        funcText.push(parts[0]); // The parts[0] is a modifier function name, like capitalize.
+        funcText.push('"](');
+        emitExpression(exprArr, index - 1, funcText);
+        if (parts.length > 1) {
+            funcText.push(',');
+            funcText.push(parts[1]);
+        }
+        funcText.push(')');
+    }
+
+    var cleanWhiteSpace = function(result) {
+        result = result.replace(/\t/g,   "    ");
+        result = result.replace(/\r\n/g, "\n");
+        result = result.replace(/\r/g,   "\n");
+        result = result.replace(/^(\s*\S*(\s+\S+)*)\s*$/, '$1'); // Right trim by Igor Poteryaev.
+        return result;
+    }
+
+    var scrubWhiteSpace = function(result) {
+        result = result.replace(/^\s+/g,   "");
+        result = result.replace(/\s+$/g,   "");
+        result = result.replace(/\s+/g,   " ");
+        result = result.replace(/^(\s*\S*(\s+\S+)*)\s*$/, '$1'); // Right trim by Igor Poteryaev.
+        return result;
+    }
+
+    // The DOM helper functions depend on DOM/DHTML, so they only work in a browser.
+    // However, these are not considered core to the engine.
+    //
+    TrimPath.parseDOMTemplate = function(elementId, optDocument, optEtc) {
+        if (optDocument == null)
+            optDocument = document;
+        var element = optDocument.getElementById(elementId);
+        var content = element.value;     // Like textarea.value.
+        if (content == null)
+            content = element.innerHTML; // Like textarea.innerHTML.
+        content = content.replace(/&lt;/g, "<").replace(/&gt;/g, ">");
+        return TrimPath.parseTemplate(content, elementId, optEtc);
+    }
+
+    TrimPath.processDOMTemplate = function(elementId, context, optFlags, optDocument, optEtc) {
+        return TrimPath.parseDOMTemplate(elementId, optDocument, optEtc).process(context, optFlags);
+    }
+}) ();

Propchange: incubator/easyant/site/staging/history/trunk/xooki/trimpath/template.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/easyant/site/staging/history/trunk/xooki/trimpath/template.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: incubator/easyant/site/staging/history/trunk/xooki/trimpath/template.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message