<?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>No One Is Perfect &#187; ant</title>
	<atom:link href="http://watchitlater.com/blog/tag/ant/feed/" rel="self" type="application/rss+xml" />
	<link>http://watchitlater.com/blog</link>
	<description>A reluctant foray into the world of blogging.</description>
	<lastBuildDate>Tue, 08 Nov 2011 12:32:55 +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>JRuby Rake and Ivy</title>
		<link>http://watchitlater.com/blog/2011/08/jruby-rake-and-ivy/</link>
		<comments>http://watchitlater.com/blog/2011/08/jruby-rake-and-ivy/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 12:05:44 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[ivy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=284</guid>
		<description><![CDATA[Here&#8217;s a neat way of using ivy with jruby, rake &#38; ant. task :ivy_retrieve do ant.taskdef :resource =&#62; "org/apache/ivy/ant/antlib.xml" do classpath :location =&#62; "ivy/ivy-2.2.0.jar" end ant.configure :file =&#62; "ivy/ivysettings.xml" ant.resolve :file =&#62; "ivy/ivy.xml" ant.retrieve :pattern =&#62; "lib/[conf]/[type]/[artifact]-[revision].[ext]", :sync =&#62; "true" puts end Still using ant, still angle bracket free (except for ivy, sigh). Read my [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a neat way of using <a href="http://ant.apache.org/ivy/">ivy</a> with jruby, rake &amp; ant.</p>
<pre name="code" class="ruby:nogutter">task :ivy_retrieve do
  ant.taskdef :resource =&gt; "org/apache/ivy/ant/antlib.xml" do
    classpath :location =&gt; "ivy/ivy-2.2.0.jar"
  end
  ant.configure :file =&gt; "ivy/ivysettings.xml"
  ant.resolve :file =&gt; "ivy/ivy.xml"
  ant.retrieve :pattern =&gt; "lib/[conf]/[type]/[artifact]-[revision].[ext]", :sync =&gt; "true"
  puts
end</pre>
<p>Still using ant, still angle bracket free (except for ivy, sigh). Read my <a href="/blog/2011/03/jruby-rake-vs-ant/" title="JRuby Rake Vs Ant">previous post</a> if you want to know more about jruby, rake and ant.<br />
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2011/08/jruby-rake-and-ivy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JRuby Rake Vs Ant</title>
		<link>http://watchitlater.com/blog/2011/03/jruby-rake-vs-ant/</link>
		<comments>http://watchitlater.com/blog/2011/03/jruby-rake-vs-ant/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 11:08:16 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=260</guid>
		<description><![CDATA[For the longest time I&#8217;ve been writing Java build files in XML and I&#8217;ve always felt a little dirty. Not too long ago I was re-introduced to rake by a colleague (thanks Fabio) and how nicely it integrates with ant. *Headslap* This means that you can now turn this: &#60;project name=&#34;spring-conversations&#34; default=&#34;build&#34; basedir=&#34;.&#34;&#62; &#60;property name=&#34;src.dir&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>For the longest time I&#8217;ve been writing Java build files in XML and I&#8217;ve always felt a little dirty. Not too long ago I was re-introduced to rake by a colleague (thanks Fabio) and how nicely it integrates with ant. *Headslap*</p>
<p>This means that you can now turn this:</p>
<pre name="code" class="xml:nogutter">
&lt;project name=&quot;spring-conversations&quot; default=&quot;build&quot; basedir=&quot;.&quot;&gt;

    &lt;property name=&quot;src.dir&quot; location=&quot;src/main&quot; /&gt;
    &lt;property name=&quot;test.dir&quot; location=&quot;src/test&quot; /&gt;

    &lt;property name=&quot;build.dir&quot; location=&quot;build&quot; /&gt;
    &lt;property name=&quot;dist.dir&quot; location=&quot;${build.dir}/dist&quot; /&gt;
    &lt;property name=&quot;report.dir&quot; location=&quot;${build.dir}/report&quot; /&gt;
    &lt;property name=&quot;compile.dir&quot; location=&quot;${build.dir}/compile&quot; /&gt;

    &lt;path id=&quot;classpath&quot;&gt;
        &lt;fileset dir=&quot;${compile.dir}&quot; /&gt;
        &lt;fileset dir=&quot;lib/buildtime&quot; /&gt;
        &lt;fileset dir=&quot;lib/runtime&quot; /&gt;
    &lt;/path&gt;

    &lt;target name=&quot;build&quot;
            depends=&quot;clean,run-tests,make-war&quot;
            description=&quot;Main target to create WAR file.&quot; /&gt;

    &lt;target name=&quot;run-tests&quot;
            depends=&quot;make-jars,run-unit-tests,check-tests&quot;
            description=&quot;Run all tests&quot; /&gt;

    &lt;target name=&quot;clean&quot;&gt;
        &lt;delete dir=&quot;${build.dir}&quot; /&gt;
    &lt;/target&gt;

    &lt;macrodef name=&quot;make-jar&quot;&gt;
        &lt;attribute name=&quot;srcdir&quot; /&gt;
        &lt;attribute name=&quot;jarfile&quot; /&gt;
        &lt;sequential&gt;
            &lt;mkdir dir=&quot;${compile.dir}/classes&quot; /&gt;
            &lt;javac srcdir=&quot;@{srcdir}&quot; destdir=&quot;${compile.dir}/classes&quot; classpathref=&quot;classpath&quot; debug=&quot;yes&quot;
                   includeantruntime=&quot;no&quot; /&gt;
            &lt;jar jarfile=&quot;${compile.dir}/@{jarfile}&quot; basedir=&quot;${compile.dir}/classes&quot; /&gt;
            &lt;delete dir=&quot;${compile.dir}/classes&quot; /&gt;
        &lt;/sequential&gt;
    &lt;/macrodef&gt;

    &lt;target name=&quot;make-jars&quot;&gt;
        &lt;make-jar srcdir=&quot;${src.dir}/java&quot; jarfile=&quot;${ant.project.name}.jar&quot; /&gt;
        &lt;make-jar srcdir=&quot;${test.dir}/java&quot; jarfile=&quot;${ant.project.name}-tests.jar&quot; /&gt;
    &lt;/target&gt;

    &lt;target name=&quot;run-unit-tests&quot;&gt;
        &lt;mkdir dir=&quot;${report.dir}&quot; /&gt;
        &lt;junit fork=&quot;yes&quot; forkmode=&quot;once&quot; printsummary=&quot;yes&quot; haltonfailure=&quot;no&quot; failureproperty=&quot;tests.failed&quot;&gt;
            &lt;classpath location=&quot;${src.dir}/resources&quot; /&gt;
            &lt;classpath refid=&quot;classpath&quot; /&gt;
            &lt;formatter type=&quot;xml&quot; /&gt;
            &lt;batchtest todir=&quot;${report.dir}&quot;&gt;
                &lt;fileset dir=&quot;${test.dir}/java&quot;&gt;
                    &lt;include name=&quot;**/*Test.java&quot; /&gt;
                &lt;/fileset&gt;
            &lt;/batchtest&gt;
        &lt;/junit&gt;
    &lt;/target&gt;

    &lt;target name=&quot;check-tests&quot; if=&quot;tests.failed&quot;&gt;
        &lt;junitreport todir=&quot;${report.dir}&quot;&gt;
            &lt;fileset dir=&quot;${report.dir}&quot; includes=&quot;TEST-*.xml&quot; /&gt;
            &lt;report todir=&quot;${report.dir}/html&quot; /&gt;
        &lt;/junitreport&gt;
        &lt;fail message=&quot;One or more tests failed. Please check the logs for more info.&quot; /&gt;
    &lt;/target&gt;

    &lt;target name=&quot;make-war&quot; depends=&quot;make-jars&quot;&gt;
        &lt;mkdir dir=&quot;${dist.dir}&quot; /&gt;
        &lt;war warfile=&quot;${dist.dir}/${ant.project.name}.war&quot; webxml=&quot;src/main/webapp/WEB-INF/web.xml&quot;&gt;
            &lt;fileset dir=&quot;src/main/webapp&quot; excludes=&quot;**/web.xml&quot; /&gt;
            &lt;lib dir=&quot;${compile.dir}&quot; excludes=&quot;*-tests.jar&quot; /&gt;
            &lt;classes dir=&quot;${src.dir}/resources&quot; /&gt;
            &lt;lib dir=&quot;lib/runtime&quot; /&gt;
        &lt;/war&gt;
    &lt;/target&gt;

    &lt;target name=&quot;run-jetty&quot; depends=&quot;clean,make-jars&quot; description=&quot;Run application in Jetty.&quot;&gt;
        &lt;java classname=&quot;example.jetty.WebServer&quot; fork=&quot;true&quot; failonerror=&quot;true&quot;&gt;
            &lt;classpath location=&quot;${src.dir}/resources&quot; /&gt;
            &lt;classpath refid=&quot;classpath&quot; /&gt;
        &lt;/java&gt;
    &lt;/target&gt;

&lt;/project&gt;
</pre>
<p>Into this:</p>
<pre name="code" class="ruby:nogutter">
require &#x27;ant&#x27;

PROJECT_NAME = &#x27;spring-conversations&#x27;

MAIN_SRC_DIR = &#x27;src/main/java&#x27;
TEST_SRC_DIR = &#x27;src/test/java&#x27;

RUNTIME_LIB_DIR = &#x27;lib/runtime&#x27;
BUILDTIME_LIB_DIR = &#x27;lib/buildtime&#x27;

BUILD_DIR = &#x27;build&#x27;
DIST_DIR = &quot;#{BUILD_DIR}/dist&quot;
COMPILE_DIR = &quot;#{BUILD_DIR}/compile&quot;
CLASSES_DIR = &quot;#{COMPILE_DIR}/classes&quot;
TEST_REPORT_DIR = &quot;#{BUILD_DIR}/report&quot;

task :default =&gt; [:clean, :run_tests, :make_war]

task :clean do
  ant.delete :dir =&gt; BUILD_DIR
  puts
end

task :setup do
  ant.path :id =&gt; &#x27;classpath&#x27; do
    fileset :dir =&gt; COMPILE_DIR
    fileset :dir =&gt; RUNTIME_LIB_DIR
    fileset :dir =&gt; BUILDTIME_LIB_DIR
  end
end

task :make_jars =&gt; :setup do
  make_jar MAIN_SRC_DIR, &quot;#{PROJECT_NAME}.jar&quot;
  make_jar TEST_SRC_DIR, &quot;#{PROJECT_NAME}-tests.jar&quot;
end

def make_jar(source_folder, jar_file_name)
  ant.mkdir :dir =&gt; CLASSES_DIR
  ant.javac :srcdir =&gt; source_folder, :destdir =&gt; CLASSES_DIR, :classpathref =&gt; &#x27;classpath&#x27;,
            :source =&gt; &quot;1.6&quot;, :target =&gt; &quot;1.6&quot;, :debug =&gt; &quot;yes&quot;, :includeantruntime =&gt; &quot;no&quot;
  ant.jar :jarfile =&gt; &quot;#{COMPILE_DIR}/#{jar_file_name}&quot;, :basedir =&gt; CLASSES_DIR
  ant.delete :dir =&gt; CLASSES_DIR
  puts
end

task :run_tests =&gt; :make_jars do
  ant.mkdir :dir =&gt; TEST_REPORT_DIR
  ant.junit :fork =&gt; &quot;yes&quot;, :forkmode =&gt; &quot;once&quot;, :printsummary =&gt; &quot;yes&quot;,
            :haltonfailure =&gt; &quot;no&quot;, :failureproperty =&gt; &quot;tests.failed&quot; do
    classpath :refid =&gt; &#x27;classpath&#x27;
    formatter :type =&gt; &quot;xml&quot;
    batchtest :todir =&gt; TEST_REPORT_DIR do
      fileset :dir =&gt; TEST_SRC_DIR, :includes =&gt; &#x27;**/*Test.java&#x27;
    end
  end
  if ant.project.getProperty(&quot;tests.failed&quot;)
    ant.junitreport :todir =&gt; TEST_REPORT_DIR do
      fileset :dir =&gt; TEST_REPORT_DIR, :includes =&gt; &quot;TEST-*.xml&quot;
      report :todir =&gt; &quot;#{TEST_REPORT_DIR}/html&quot;
    end
    ant.fail :message =&gt; &quot;One or more tests failed. Please check the test report for more info.&quot;
  end
  puts
end

task :make_war =&gt; :make_jars do
  ant.mkdir :dir =&gt; DIST_DIR
  ant.war :warfile =&gt; &quot;#{DIST_DIR}/#{PROJECT_NAME}.war&quot;, :webxml =&gt; &quot;src/main/webapp/WEB-INF/web.xml&quot; do
    fileset :dir =&gt; &quot;src/main/webapp&quot;, :excludes =&gt; &quot;**/web.xml&quot;
    lib :dir =&gt; COMPILE_DIR, :excludes =&gt; &quot;*-tests.jar&quot;
    classes :dir =&gt; &quot;src/main/resources&quot;
    lib :dir =&gt; RUNTIME_LIB_DIR
  end
  puts
end

task :run_jetty =&gt; [:clean, :make_jars] do
  ant.java :classname =&gt; &quot;example.jetty.WebServer&quot;, :fork =&gt; &#x27;yes&#x27;, :failonerror =&gt; &#x27;yes&#x27; do
    classpath :location =&gt; &quot;src/main/resources&quot;
    classpath :refid =&gt; &quot;classpath&quot;
  end
end
</pre>
<p>Damn, this feels like code.</p>
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2011/03/jruby-rake-vs-ant/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Apache Ivy and Spring EBR</title>
		<link>http://watchitlater.com/blog/2010/11/apache-ivy-and-spring-ebr/</link>
		<comments>http://watchitlater.com/blog/2010/11/apache-ivy-and-spring-ebr/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 00:03:32 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Reminders]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[ebr]]></category>
		<category><![CDATA[ivy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[springframework]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=238</guid>
		<description><![CDATA[Here is how I set up the Apache Ivy dependency manager so that it can fetch springframework JARs from the SpringSource Enterprise Bundle Repository. Listing: ivysettings-custom.xml &#60;ivysettings&#62; &#60;resolvers&#62; &#60;url name=&#34;com.springsource.repository.bundles.release&#34;&#62; &#60;ivy pattern=&#34;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&#34; /&#62; &#60;artifact pattern=&#34;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&#34; /&#62; &#60;/url&#62; &#60;url name=&#34;com.springsource.repository.bundles.external&#34;&#62; &#60;ivy pattern=&#34;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&#34; /&#62; &#60;artifact pattern=&#34;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&#34; /&#62; &#60;/url&#62; &#60;chain name=&#34;spring&#34;&#62; &#60;resolver ref=&#34;com.springsource.repository.bundles.release&#34;/&#62; &#60;resolver ref=&#34;com.springsource.repository.bundles.external&#34;/&#62; &#60;/chain&#62; &#60;ibiblio name=&#34;jboss&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how I set up the <a href="http://ant.apache.org/ivy/">Apache Ivy</a> dependency manager so that it can fetch springframework JARs from the <a href="https://ebr.springsource.com/repository/app/">SpringSource Enterprise Bundle Repository</a>.</p>
<p><strong>Listing: ivysettings-custom.xml</strong></p>
<pre name="code" class="xml:nogutter">
&lt;ivysettings&gt;
    &lt;resolvers&gt;
        &lt;url name=&quot;com.springsource.repository.bundles.release&quot;&gt;
            &lt;ivy pattern=&quot;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
            &lt;artifact pattern=&quot;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
        &lt;/url&gt;
        &lt;url name=&quot;com.springsource.repository.bundles.external&quot;&gt;
            &lt;ivy pattern=&quot;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
            &lt;artifact pattern=&quot;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
        &lt;/url&gt;
        &lt;chain name=&quot;spring&quot;&gt;
            &lt;resolver ref=&quot;com.springsource.repository.bundles.release&quot;/&gt;
            &lt;resolver ref=&quot;com.springsource.repository.bundles.external&quot;/&gt;
        &lt;/chain&gt;
        &lt;ibiblio name=&quot;jboss&quot; root=&quot;http://repository.jboss.org/maven2/&quot; m2compatible=&quot;true&quot;/&gt;
        &lt;chain name=&quot;main&quot; dual=&quot;true&quot;&gt;
            &lt;resolver ref=&quot;shared&quot; /&gt;
            &lt;resolver ref=&quot;public&quot; /&gt;
            &lt;resolver ref=&quot;spring&quot; /&gt;
            &lt;resolver ref=&quot;jboss&quot; /&gt;
        &lt;/chain&gt;
        &lt;chain name=&quot;default&quot; returnFirst=&quot;true&quot;&gt;
            &lt;resolver ref=&quot;local&quot; /&gt;
            &lt;resolver ref=&quot;main&quot; /&gt;
        &lt;/chain&gt;
    &lt;/resolvers&gt;
&lt;/ivysettings&gt;
</pre>
<p><strong>Listing: ivysettings.xml</strong></p>
<pre name="code" class="xml:nogutter">
&lt;ivysettings&gt;
    &lt;settings defaultResolver=&quot;default&quot; /&gt;
    &lt;include url=&quot;${ivy.default.settings.dir}/ivysettings-public.xml&quot; /&gt;
    &lt;include url=&quot;${ivy.default.settings.dir}/ivysettings-shared.xml&quot; /&gt;
    &lt;include url=&quot;${ivy.default.settings.dir}/ivysettings-local.xml&quot; /&gt;
    &lt;include file=&quot;ivysettings-custom.xml&quot; /&gt;
&lt;/ivysettings&gt;
</pre>
<p>This means that dependencies such as:</p>
<pre name="code" class="xml:nogutter">
&lt;dependency org=&quot;org.springframework&quot; name=&quot;org.springframework.web.servlet&quot; rev=&quot;3.0.2.RELEASE&quot; /&gt;
</pre>
<p>should now be resolved correctly from the EBR.</p>
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2010/11/apache-ivy-and-spring-ebr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

