<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marshal&#039;s Blog &#187; ant</title>
	<atom:link href="http://marshal.easymorse.com/archives/tag/ant/feed" rel="self" type="application/rss+xml" />
	<link>http://marshal.easymorse.com</link>
	<description>It&#039;s swap of marshal&#039;s memory.</description>
	<lastBuildDate>Mon, 30 Jan 2012 07:03:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>为android项目增加支持ant构建</title>
		<link>http://marshal.easymorse.com/archives/1665?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e4%25b8%25baandroid%25e9%25a1%25b9%25e7%259b%25ae%25e5%25a2%259e%25e5%258a%25a0%25e6%2594%25af%25e6%258c%2581ant%25e6%259e%2584%25e5%25bb%25ba</link>
		<comments>http://marshal.easymorse.com/archives/1665#comments</comments>
		<pubDate>Wed, 21 Oct 2009 06:34:44 +0000</pubDate>
		<dc:creator>Marshal</dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[ant]]></category>

		<guid isPermaLink="false">http://marshal.easymorse.com/archives/1665</guid>
		<description><![CDATA[使用eclipse adt插件创建和编辑android项目是最容易和方便的。但是项目源代码提交后，有可能需要自动构建，而不是通过ide工具构建。这时需要增加对脚本工具比如ant和maven的支持。 android SDK已经内置了对ant支持。安装好ant环境后（见：ubuntu下安装ant），就可以通过如下命令创建支持ant脚本的android项目： android create project -k com.easymorse -a MyActivity -t 2 -p . 这里-k是包名参数；-a是项目名称；-p是目录，-t是目标的id，可以通过： android list 查看可用的目标id。 如果是这样创建android项目的话，可以通过：共享eclipse android项目的步骤导入为eclipse项目。 或者，如果是eclipse adt生成的android项目，可以进入到项目目录，通过如下命令为项目增加ant支持： android update project -p . -t 3 ant脚本中可以使用的target有： debug：带调试用签名的构建 release：构建应用程序，生成的apk必须签名才可以发布 install：安装调试构建的包到运行着的模拟器或者设备； reinstall uninstall]]></description>
			<content:encoded><![CDATA[<p>使用eclipse adt插件创建和编辑android项目是最容易和方便的。但是项目源代码提交后，有可能需要自动构建，而不是通过ide工具构建。这时需要增加对脚本工具比如ant和maven的支持。</p>
<p>android SDK已经内置了对ant支持。安装好ant环境后（见：<a href="http://marshal.easymorse.com/archives/1658" title="ubuntu下安装ant">ubuntu下安装ant</a>），就可以通过如下命令创建支持ant脚本的android项目：</p>
<blockquote><p>android create project -k com.easymorse -a MyActivity -t 2 -p .</p>
</blockquote>
<p>这里-k是包名参数；-a是项目名称；-p是目录，-t是目标的id，可以通过：</p>
<blockquote><p><font style="background-color: #ffffff">android list</font></p>
</blockquote>
<p>查看可用的目标id。</p>
<p>如果是这样创建android项目的话，可以通过：<a href="http://marshal.easymorse.com/archives/1663" title="共享eclipse android项目的步骤">共享eclipse android项目的步骤</a>导入为eclipse项目。</p>
<p><span id="more-1665"></span>
<p>或者，如果是eclipse adt生成的android项目，可以进入到项目目录，通过如下命令为项目增加ant支持：</p>
<blockquote><p>android update project -p . -t 3</p>
</blockquote>
<p>ant脚本中可以使用的target有：</p>
<ul>
<li>debug：带调试用签名的构建</li>
<li>release：构建应用程序，生成的apk必须签名才可以发布</li>
<li>install：安装调试构建的包到运行着的模拟器或者设备；</li>
<li>reinstall</li>
<li>uninstall</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://marshal.easymorse.com/archives/1665/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ubuntu下安装ant</title>
		<link>http://marshal.easymorse.com/archives/1658?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu%25e4%25b8%258b%25e5%25ae%2589%25e8%25a3%2585ant</link>
		<comments>http://marshal.easymorse.com/archives/1658#comments</comments>
		<pubDate>Mon, 19 Oct 2009 10:30:46 +0000</pubDate>
		<dc:creator>Marshal</dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://marshal.easymorse.com/archives/1658</guid>
		<description><![CDATA[可以通过： sudo apt-get install ant 不过要附带安装一堆东西。 也可以手工安装，先下载ant： wget http://labs.xiaonei.com/apache-mirror/ant/binaries/apache-ant-1.7.1-bin.tar.gz 然后，解压缩： tar xvf apache-ant-1.7.1-bin.tar.gz 然后，移动到比如/opt目录下： sudo mv apache-ant-1.7.1 /opt/ 设置环境变量： sudo vim /etc/profile 加上以下粗体内容： export ANT_HOME=/opt/apache-ant-1.7.1PATH=$PATH:/opt/android-sdk-linux_x86-1.5_r3/tools/:/opt/apache-maven-2.2.1/bin:/opt/apache-ant-1.7.1/bin 让配置生效： source /etc/profile 检查一下是否安装成功： marshal@ubuntu-desktop:~$ ant -versionApache Ant version 1.7.1 compiled on June 27 2008]]></description>
			<content:encoded><![CDATA[<p>可以通过：</p>
<blockquote><p><font style="background-color: #ffffff">sudo apt-get install ant</font></p>
</blockquote>
<p>不过要附带安装一堆东西。</p>
<p>也可以手工安装，先下载ant：</p>
<blockquote><p>wget <a href="http://labs.xiaonei.com/apache-mirror/ant/binaries/apache-ant-1.7.1-bin.tar.gz">http://labs.xiaonei.com/apache-mirror/ant/binaries/apache-ant-1.7.1-bin.tar.gz</a></p>
</blockquote>
<p>然后，解压缩：</p>
<blockquote><p>tar xvf apache-ant-1.7.1-bin.tar.gz</p>
</blockquote>
<p><span id="more-1658"></span>
<p>然后，移动到比如/opt目录下：</p>
<blockquote><p>sudo mv apache-ant-1.7.1 /opt/</p>
</blockquote>
<p>设置环境变量：</p>
<blockquote><p>sudo vim /etc/profile</p>
</blockquote>
<p>加上以下粗体内容：</p>
<blockquote><p><strong>export ANT_HOME=/opt/apache-ant-1.7.1</strong><br />PATH=$PATH:/opt/android-sdk-linux_x86-1.5_r3/tools/:/opt/apache-maven-2.2.1/bin<strong>:/opt/apache-ant-1.7.1/bin</strong></p>
</blockquote>
<p>让配置生效：</p>
<blockquote><p>source /etc/profile</p>
</blockquote>
<p>检查一下是否安装成功：</p>
<blockquote><p>marshal@ubuntu-desktop:~$ ant -version<br />Apache Ant version 1.7.1 compiled on June 27 2008</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://marshal.easymorse.com/archives/1658/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ant与web开发</title>
		<link>http://marshal.easymorse.com/archives/466?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ant%25e4%25b8%258eweb%25e5%25bc%2580%25e5%258f%2591</link>
		<comments>http://marshal.easymorse.com/archives/466#comments</comments>
		<pubDate>Sun, 23 Jan 2005 04:57:24 +0000</pubDate>
		<dc:creator>Marshal</dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://marshal.easymorse.com/blog/archives/466</guid>
		<description><![CDATA[示例参见： http://code.google.com/p/simplelife/wiki/SimpleLife_Sample_Ant Ant编译和库的依赖 在项目中创建lib目录，放置项目需要的jar文件。并在ant文件中引用该目录下jar文件到classpath。 build文件 build文件的属性文件 buid.xml文件不需要修改，所有可变动的内容放置在build.properties文件中，供build.xml文件引用。 project.name=user_manager build.path=build build.path.class=${build.path}/classes lib.path=lib dist.path=dist src.path=src doc.path=${dist.path}/doc javadoc.path=${doc.path}/api javadoc.title=User Management API web.path=WebContent deploy.url=http://localhost:8080/manager deploy.userName=marshal deploy.password=password ant项目导入Eclipse 创建Eclipse Dynamic Web Project。复制lib，src和webcontent目录中的文件，build.xml，build.properties。选中lib目录下需要的jar文件，鼠标右键，add to build path。 在项目属性中，J2EE Module Dependences加入jar文件。通过Eclipse中集成的ant功能构建。]]></description>
			<content:encoded><![CDATA[<p>示例参见：</p>
<blockquote><p><a href="http://code.google.com/p/simplelife/wiki/SimpleLife_Sample_Ant">http://code.google.com/p/simplelife/wiki/SimpleLife_Sample_Ant</a></p>
</blockquote>
<h4>Ant编译和库的依赖</h4>
<p>在项目中创建lib目录，放置项目需要的jar文件。并在ant文件中引用该目录下jar文件到classpath。</p>
<p><span id="more-466"></span></p>
<h4>build文件</h4>
<pre lang="xml">
<project name="my.project" default="archive">
<property file="build.properties" />
<path id="run.lib">
                <fileset dir="${lib.path}">
                        <include name="*.jar" />
                </fileset>
        </path>
<path id="compile.classpath">
                <fileset dir="${build.path.class}" />
        </path>
        <taskdef name="deploy"
                 classname="org.apache.catalina.ant.DeployTask"
                 classpathref="run.lib" />
        <taskdef name="undeploy"
                 classname="org.apache.catalina.ant.UndeployTask"
                 classpathref="run.lib" />
        <tstamp>
<format property="buildDateFormat"
                  pattern="yyMMdd" />
        </tstamp>
        <target name="init" description="初始化工作">
                <mkdir dir="${build.path.class}" />
                <mkdir dir="${dist.path}" />
        </target>
        <target name="compile" depends="init"
                description="编译java程序">
                <javac srcdir="${src.path}"
                       destdir="${build.path.class}"
                       debug="true" encoding="UTF-8" />
        </target>
        <target name="archive" depends="compile"
                description="打包java程序">
                <jar destfile="${dist.path}/${project.name}-${buildDateFormat}.jar"
                     basedir="${build.path.class}" />
        </target>
        <target name="javadocs" depends="compile"
                description="生成javadoc">
                <javadoc access="protected" sourcepath="${src.path}"
                         destdir="${javadoc.path}" use="true"
                         windowtitle="${javadoc.title}"
                         encoding="UTF-8" charset="UTF-8"
                         overview="${src.path}/overview.html">
                </javadoc>
        </target>
        <target name="war" depends="compile"
                description="生成war文件">
                <war destfile="${dist.path}/${project.name}.war"
                     webxml="${web.path}/WEB-INF/web.xml">
                        <fileset dir="${web.path}">
                                <include name="*.jsp" />
                        </fileset>
                        <classes dir="${build.path.class}" />
                </war>
        </target>
        <target name="undeploy" description="卸载web项目">
                <undeploy url="${deploy.url}"
                          username="${deploy.userName}"
                          password="${deploy.password}"
                          path="/${project.name}"
                          failonerror="false" />
        </target>
        <target name="deploy" depends="war,undeploy"
                description="部署web项目">
                <deploy url="${deploy.url}"
                    username="${deploy.userName}"
                    password="${deploy.password}"
                    path="/${project.name}"
                    war="${dist.path}/${project.name}.war" />
        </target>
        <target name="clean" depends="init"
                 description="清理中间数据">
                <delete dir="${build.path}" />
                <delete dir="${dist.path}" />
        </target>
</project>
</pre>
<h4>build文件的属性文件</h4>
<p>buid.xml文件不需要修改，所有可变动的内容放置在build.properties文件中，供build.xml文件引用。</p>
<blockquote>
<p><font size="2">project.name=user_manager<br />
      <br />build.path=build</p>
<p>build.path.class=${build.path}/classes</p>
<p>lib.path=lib</p>
<p>dist.path=dist</p>
<p>src.path=src</p>
<p>doc.path=${dist.path}/doc</p>
<p>javadoc.path=${doc.path}/api</p>
<p>javadoc.title=User Management API</p>
<p>web.path=WebContent</p>
<p>deploy.url=</font><a href="http://localhost:8080/manager"><font size="2">http://localhost:8080/manager</font></a></p>
<p><font size="2">deploy.userName=marshal<br />
      <br />deploy.password=password</font></p>
</blockquote>
<h4>ant项目导入Eclipse</h4>
<p>创建Eclipse Dynamic Web Project。复制lib，src和webcontent目录中的文件，build.xml，build.properties。选中lib目录下需要的jar文件，鼠标右键，add to build path。</p>
<p>在项目属性中，J2EE Module Dependences加入jar文件。通过Eclipse中集成的ant功能构建。</p>
]]></content:encoded>
			<wfw:commentRss>http://marshal.easymorse.com/archives/466/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>最基本的ant构建过程</title>
		<link>http://marshal.easymorse.com/archives/445?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e6%259c%2580%25e5%259f%25ba%25e6%259c%25ac%25e7%259a%2584ant%25e6%259e%2584%25e5%25bb%25ba%25e8%25bf%2587%25e7%25a8%258b</link>
		<comments>http://marshal.easymorse.com/archives/445#comments</comments>
		<pubDate>Sat, 22 Jan 2005 03:38:16 +0000</pubDate>
		<dc:creator>Marshal</dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://marshal.easymorse.com/blog/archives/445</guid>
		<description><![CDATA[以下总结了大多数ant构建过程都会用到的通用功能。 准备工作 解压缩Ant分发包.设置JAVA_HOME变量.在Windwos系统环境中的Path变量中增加, {ant_home}/bin.打开命令行窗口（若能看到版本信息说明安装成功）: ant -version 创建项目目录和Java文件 创建一个任意的项目目录.在该目录下创建src目录.在src目录下创建test目录, 并在该目录下编写一个最简单的java程序: package test; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } 创建构建文件 构建文件一般被称作build文件.在刚才建立的项目根目录下,创建build.xml文件: &#60;?xml version="1.0" encoding="UTF-8"?&#62; &#60;project name="firstbuild" default="compile"&#62; &#60;target name="compile"&#62; &#60;javac srcdir="src" /&#62; &#60;echo&#62;构建成功!&#60;/echo&#62; &#60;/target&#62; &#60;/project&#62; 运行构建脚本 项目根目录下, 运行: ant 在运行中看到更详细信息的方法: ant -verbose 增加构建的功能 上面的构建只完成一个工作, 将java文件编译为class文件.存在的不足: 源文件和编译后的文件放在一起, 比较混乱.源文件和编译文件存放在不同的目录下;编译后的class文件打包为jar文件.一般的目录约定: 目录名称 功能 [...]]]></description>
			<content:encoded><![CDATA[<p>以下总结了大多数ant构建过程都会用到的通用功能。</p>
<h4>准备工作</h4>
<p>解压缩Ant分发包.设置JAVA_HOME变量.在Windwos系统环境中的Path变量中增加, <em>{ant_home}/bin</em>.打开命令行窗口（<em>若能看到版本信息说明安装成功</em>）:</p>
<blockquote><p>ant -version</p>
</blockquote>
<p> <span id="more-445"></span>
</p>
<h4>创建项目目录和Java文件</h4>
<p>创建一个任意的项目目录.在该目录下创建src目录.在src目录下创建test目录, 并在该目录下编写一个最简单的java程序:</p>
<blockquote><pre><span style="font-size: x-small"><font size="2">package test;

public class HelloWorld {
        public static void main(String[] args) {
                System.out.println("Hello World!");
        }
}</font></span></pre>
</blockquote>
<h4>创建构建文件</h4>
<p>构建文件一般被称作<em>build</em>文件.在刚才建立的项目根目录下,创建build.xml文件:</p>
<blockquote><pre><span style="font-size: x-small"><font size="2">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project name="firstbuild" default="compile"&gt;
        &lt;target name="compile"&gt;
                &lt;javac srcdir="src" /&gt;
                &lt;echo&gt;构建成功!&lt;/echo&gt;
        &lt;/target&gt;
&lt;/project&gt;</font></span></pre>
</blockquote>
<h4>运行构建脚本</h4>
<p>项目根目录下, 运行:</p>
<blockquote>
<p><span style="color: #808080">ant</span></p>
</blockquote>
<p>在运行中看到<em><strong>更详细信息</strong></em>的方法:</p>
<blockquote><pre><span style="font-size: x-small"><font size="2">ant -verbose</font></span></pre>
</blockquote>
<h4>增加构建的功能</h4>
<p>上面的构建只完成一个工作, 将java文件编译为class文件.<strong>存在的不足:</strong> 源文件和编译后的文件放在一起, 比较混乱.源文件和编译文件存放在不同的目录下;编译后的class文件打包为jar文件.一般的目录约定:</p>
<table cellspacing="0" cellpadding="2" width="445" border="0">
<tbody>
<tr>
<td valign="top" align="middle" width="134"><strong>目录名称</strong></td>
<td valign="top" align="middle" width="309"><strong>功能</strong></td>
</tr>
<tr>
<td valign="top" width="135">src</td>
<td valign="top" width="309">源文件</td>
</tr>
<tr>
<td valign="top" width="135">build</td>
<td valign="top" width="309">所有构建过程中产生的文件, 可以删除和重建</td>
</tr>
<tr>
<td valign="top" width="135">build/classes</td>
<td valign="top" width="309">构建中产生的类文件和相关文件</td>
</tr>
<tr>
<td valign="top" width="135">dist</td>
<td valign="top" width="309">分发包文件, 可以删除和重建</td>
</tr>
</tbody>
</table>
<h4>编写build文件</h4>
<pre lang="xml"></pre>
<h4>target的依赖关系</h4>
<p>如果循环依赖, ant会检测到并报错退出。</p>
<p><a href="http://marshal.easymorse.com/wp-content/uploads/2008/10/targetdependencies.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="190" alt="target.dependencies" src="http://marshal.easymorse.com/wp-content/uploads/2008/10/targetdependencies-thumb.png" width="240" border="0"></a></p>
<h4>更多的ant功能</h4>
<h5>了解build中所有任务</h5>
<blockquote>
<p>ant -projecthelp</p>
</blockquote>
<h5>增量构建</h5>
<p>再次运行, 将编译改动过的class文件。</p>
<h5>一次运行多个target</h5>
<blockquote>
<p>ant compile archive</p>
</blockquote>
<h5>指定运行的构建文件</h5>
<blockquote>
<p>ant -buildfile build.xml compile</p>
</blockquote>
<h5>减少构建中信息输出</h5>
<blockquote>
<p>ant -quiet</p>
</blockquote>
<h4>运行程序</h4>
<p>可以通过命令行执行java程序：</p>
<blockquote>
<p>java -cp build/classes test.HelloWorld</p>
</blockquote>
<p>通过ant执行的配置：</p>
<pre lang="xml">
<target name="execute" depends="compile">
        <java classname="test.HelloWorld" classpath="build/classes" />
</target>
</pre>
<p>使用ant执行的好处:</p>
<ul>
<li>可以比较容易的将复杂参数加入程序
<li>易于设置classpath
<li>直接使用ant配置的JVM </li>
</ul>
<h4>完整的构建文件</h4>
<pre lang="xml">
<project name="my.project" default="archive">
<property file="build.properties" />
<path id="run.lib">
                <fileset dir="${lib.path}">
                        <include name="*.jar" />
                </fileset>
        </path>
<path id="compile.classpath">
                <fileset dir="${build.path.class}" />
        </path>
        <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="run.lib" />
        <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="run.lib" />
        <tstamp>
<format property="buildDateFormat" pattern="yyMMdd" />
        </tstamp>
        <target name="init" description="初始化工作">
                <mkdir dir="${build.path.class}" />
                <mkdir dir="${dist.path}" />
        </target>
        <target name="compile" depends="init" description="编译java程序">
                <javac srcdir="${src.path}" destdir="${build.path.class}" debug="true" encoding="UTF-8" />
        </target>
        <target name="archive" depends="compile" description="打包java程序">
                <jar destfile="${dist.path}/${project.name}-${buildDateFormat}.jar" basedir="${build.path.class}" />
        </target>
        <target name="javadocs" depends="compile" description="生成javadoc">
                <javadoc access="protected" sourcepath="${src.path}" destdir="${javadoc.path}" use="true" windowtitle="${javadoc.title}" encoding="UTF-8" charset="UTF-8" overview="${src.path}/overview.html">
                </javadoc>
        </target>
        <target name="war" depends="compile" description="生成war文件">
                <war destfile="${dist.path}/${project.name}.war" webxml="${web.path}/WEB-INF/web.xml">
                        <fileset dir="${web.path}">
                                <include name="*.jsp" />
                        </fileset>
                        <classes dir="${build.path.class}" />
                </war>
        </target>
        <target name="undeploy" description="卸载web项目">
                <undeploy url="${deploy.url}" username="${deploy.userName}" password="${deploy.password}" path="/${project.name}" failonerror="false" />
        </target>
        <target name="deploy" depends="war,undeploy" description="部署web项目">
                <deploy url="${deploy.url}" username="${deploy.userName}" password="${deploy.password}" path="/${project.name}" war="${dist.path}/${project.name}.war" />
        </target>
        <target name="clean" depends="init" description="清理中间数据">
                <delete dir="${build.path}" />
                <delete dir="${dist.path}" />
        </target>
</project>
</pre>
<h4>build配置文件的组成</h4>
<ul>
<li>一个build文件包含一个project标签(根标签);
<li>project标签中包含多个target标签
<li>一个target可能依赖其他target(可以多个)
<li>target包含多个task
<li>task实现构建的各个任务 </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://marshal.easymorse.com/archives/445/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ant介绍</title>
		<link>http://marshal.easymorse.com/archives/442?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ant%25e4%25bd%25bf%25e7%2594%25a8%25e5%25b0%258f%25e7%25bb%2593</link>
		<comments>http://marshal.easymorse.com/archives/442#comments</comments>
		<pubDate>Sun, 16 Jan 2005 03:15:20 +0000</pubDate>
		<dc:creator>Marshal</dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jee]]></category>

		<guid isPermaLink="false">http://marshal.easymorse.com/blog/archives/442</guid>
		<description><![CDATA[Ant是构建工具。Ant由Java编写。网址： http://ant.apache.org/ 软件构建过程：从源代码和文档到交付使用的产品的过程。 使用IDE和ANT构建的区别 IDE是通过多次交互(比如点击按钮)完成构建过程, Ant是批处理方式自动完成构建过程; IDE的用户是专业的开发人员, Ant的用户可以是普通用户或者网管等; IDE工具依赖图形界面环境, Ant只使用命令行界面. Ant的特别之处 Ant是免费和开源的; 使开发人员构建项目容易; 使用广泛; 在构建过程中支持测试, 便于敏捷开发和测试驱动开发; 可用于持续集成; 可在IDE工具中使用, Eclipse,Netbeans&#8230; 何时使用Ant 如果只有一个开发人员, 使用IDE工具已经足够.当多人参与项目编码时, 为提高集成和构建的效率, 需要使用Ant. 何时不应该使用Ant： 脱离构建过程使用Ant, 因为Ant的功能是围绕构建展开的.另外, Ant不适合充当通用的工作流引擎, 因为缺乏相关的支持. Ant的替代品 IDE提供的构建功能. Unix下的make工具. 另一个构建工具, Maven.]]></description>
			<content:encoded><![CDATA[<p>Ant是构建工具。Ant由Java编写。网址：</p>
<blockquote><p><a title="http://ant.apache.org/" href="http://ant.apache.org/">http://ant.apache.org/</a></p>
</blockquote>
<p>软件构建过程：<em>从源代码和文档到交付使用的产品的过程。</em></p>
<p> <span id="more-442"></span><br />
<h3>使用IDE和ANT构建的区别</h3>
<ul>
<li>IDE是通过多次交互(比如点击按钮)完成构建过程, Ant是批处理方式自动完成构建过程;</li>
<li>IDE的用户是专业的开发人员, Ant的用户可以是普通用户或者网管等;</li>
<li>IDE工具依赖图形界面环境, Ant只使用命令行界面.</li>
</ul>
<h3>Ant的特别之处</h3>
<ul>
<li>Ant是免费和开源的;</li>
<li>使开发人员构建项目容易;</li>
<li>使用广泛;</li>
<li>在构建过程中支持测试, 便于敏捷开发和测试驱动开发;</li>
<li>可用于持续集成;</li>
<li>可在IDE工具中使用, Eclipse,Netbeans&#8230;</li>
</ul>
<h3>何时使用Ant</h3>
<p>如果只有一个开发人员, 使用IDE工具已经足够.当多人参与项目编码时, 为提高集成和构建的效率, 需要使用Ant.</p>
<p>何时不应该使用Ant：</p>
<blockquote><p>脱离构建过程使用Ant, 因为Ant的功能是围绕构建展开的.另外, Ant不适合充当通用的工作流引擎, 因为缺乏相关的支持.</p>
</blockquote>
<h3>Ant的替代品</h3>
<ul>
<li>IDE提供的构建功能.</li>
<li>Unix下的make工具.</li>
<li>另一个构建工具, Maven.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://marshal.easymorse.com/archives/442/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

