<?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>Blog &#187; maven</title>
	<atom:link href="http://blog.cliffano.com/tag/maven/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cliffano.com</link>
	<description>Geeking, Living, Travelling</description>
	<lastBuildDate>Thu, 26 Jan 2012 10:18:59 +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>Random Project Updates</title>
		<link>http://blog.cliffano.com/2008/04/02/random-project-updates/</link>
		<comments>http://blog.cliffano.com/2008/04/02/random-project-updates/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 13:00:01 +0000</pubDate>
		<dc:creator>Cliffano Subagio</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[blojsom]]></category>
		<category><![CDATA[kaptcha]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[wish]]></category>

		<guid isPermaLink="false">http://blog.cliffano.com/?p=88</guid>
		<description><![CDATA[Haven&#8217;t made any project related post since July last year, so here&#8217;s a list of little things I spent some time on: While playing around with Firefox Web Developer Extension, I found out that some Maven reports generated invalid HTML which could break the reports layout with non-default vm templates. Hence MFINDBUGS-29, MCHECKSTYLE-74, and MCHANGES-83. [...]]]></description>
			<content:encoded><![CDATA[<p>Haven&#8217;t made any project related post since July last year, so here&#8217;s a list of little things I spent some time on:</p>
<ul>
<li> While playing around with Firefox Web Developer Extension, I found out that some Maven reports generated invalid HTML which could break the reports layout with non-default vm templates. Hence <a href="http://jira.codehaus.org/browse/MFINDBUGS-29">MFINDBUGS-29</a>, <a href="http://jira.codehaus.org/browse/MCHECKSTYLE-74">MCHECKSTYLE-74</a>, and <a href="http://jira.codehaus.org/browse/MCHANGES-83">MCHANGES-83</a>.</li>
<li>After integrating Kaptcha in SCode Plugin 0.5, I spent some time working on the Kaptcha project itself where most of the effort was on refactoring the original SimpleCaptcha code. <a href="http://code.google.com/p/kaptcha/issues/detail?id=5">That</a>, and <a href="http://code.google.com/p/kaptcha/issues/detail?id=11&amp;can=1">some</a> <a href="http://code.google.com/p/kaptcha/issues/detail?id=10&amp;can=1">other</a> <a href="http://code.google.com/p/kaptcha/issues/detail?id=9&amp;can=1">patches</a> have made it to Kaptcha 2.1 and 2.2 .</li>
<li>I replaced all usages of JMock with EasyMock on all of my Java projects (I know, a stupid thing to do because EasyMock-ing is also no fun). Looking forward to giving <a href="http://code.google.com/p/mockito/">Mockito</a> a try at work. No, there will be no effort to replace EasyMock with Mockito regardless of the outcome.</li>
<li>As mentioned on my <a href="http://blog.cliffano.com/2008/02/17/slicehosted/">Slicehosted</a> post, I rewrote <a href="http://wish.cliffano.com">Wish</a> using Rails. I also spent more time playing with Ruby/Rails and I could see why some people love them. Personally, I&#8217;m still leaning towards Java. I think static typing is better in the long run. My take on the whole Ruby vs Java fiasco&#8230; people have different perspectives and opinions, there&#8217;s not one true programming language nirvana, Ruby and Java communities will learn to co-exist peacefully.</li>
<li>Since this blog is now using WordPress (damn, I hate upgrading WordPress everytime there&#8217;s a security fix), and because there hadn&#8217;t been any activity in Blojsom development, I decided to stop following Blojsom mailing lists for now. Nabble <a href="http://www.nabble.com/user/UserPosts.jtp?user=52428">shows</a> that I&#8217;ve been posting since July 2005 to February 2008, it didn&#8217;t feel that long at all :). I will still maintain the Blojsom plugins I created and I still have some patches to contribute to Blojsom core.</li>
</ul>

<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fblog.cliffano.com%2F2008%2F04%2F02%2Frandom-project-updates%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cliffano.com/2008/04/02/random-project-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going Java 1.5 With Maven2-Based Project</title>
		<link>http://blog.cliffano.com/2007/07/10/going-java-15-with-maven2-based-project/</link>
		<comments>http://blog.cliffano.com/2007/07/10/going-java-15-with-maven2-based-project/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 11:49:29 +0000</pubDate>
		<dc:creator>Cliffano Subagio</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[java 1.5]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://blog.cliffano.com/?p=3</guid>
		<description><![CDATA[I recently made some simple updates to Wish by using Java 1.5 generics and autoboxing/unboxing. Making Java source changes was the easy part, while the time consuming part was on hunting for information on Maven-related changes. I started by changing maven-compiler-plugin source and target in pom.xml: And got this error upon running mvn site which [...]]]></description>
			<content:encoded><![CDATA[<p>I recently made some simple updates to <a href="http://code.google.com/p/wish-anonymous/">Wish</a> by using Java 1.5 generics and autoboxing/unboxing. Making Java source changes was the easy part, while the time consuming part was on hunting for information on Maven-related changes.</p>
<p>I started by changing maven-compiler-plugin source and target in pom.xml:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;build&gt;
  &lt;plugins&gt;
    ...
    &lt;plugin&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
        &lt;source&gt;1.5&lt;/source&gt;
        &lt;target&gt;1.5&lt;/target&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
    ...
  &lt;/plugins&gt;
&lt;/build&gt;
</pre>
<p>And got this error upon running mvn site</p>
<pre class="brush: plain; title: ; notranslate">
Caused by: net.sourceforge.pmd.ast.ParseException: Can't use generics unless running in JDK 1.5 mode!
</pre>
<p>which led me to change maven-pmd-plugin targetJdk:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;reporting&gt;
  &lt;plugins&gt;
    ...
    &lt;plugin&gt;
      &lt;artifactId&gt;maven-pmd-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
        &lt;targetJdk&gt;1.5&lt;/targetJdk&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
    ...
  &lt;/plugins&gt;
&lt;/reporting&gt;
</pre>
<p>Then I found out that the angle brackets used by generics syntax resulted in checkstyle errors:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;' is not preceded with whitespace.
error	&lt;;' is not followed by whitespace.
error	'&gt;' is not preceded with whitespace.
</pre>
<p>which is fixed by <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1374798&amp;group_id=29721&amp;atid=397078">adding these modules</a> to checkstyle.xml .</p>
<p>If you don&#8217;t already have any existing checkstyle rules, create checkstyle.xml file and place it on the root directory of the project (i.e. same place as pom.xml) and add configLocation to maven-checkstyle-plugin:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;reporting&gt;
  &lt;plugins&gt;
    ...
    &lt;plugin&gt;
      &lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
        &lt;configLocation&gt;checkstyle.xml&lt;/configLocation&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
    ...
  &lt;/plugins&gt;
&lt;/reporting&gt;
</pre>

<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fblog.cliffano.com%2F2007%2F07%2F10%2Fgoing-java-15-with-maven2-based-project%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cliffano.com/2007/07/10/going-java-15-with-maven2-based-project/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>JSP Precompilation For Maven2 Project</title>
		<link>http://blog.cliffano.com/2006/08/16/jsp-precompilation-for-maven2-project/</link>
		<comments>http://blog.cliffano.com/2006/08/16/jsp-precompilation-for-maven2-project/#comments</comments>
		<pubDate>Wed, 16 Aug 2006 00:14:23 +0000</pubDate>
		<dc:creator>Cliffano Subagio</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[jspc]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://blog.cliffano.com/?p=40</guid>
		<description><![CDATA[You can precompile JSP as part of your Maven2 project build by using Maven2 JSPC Plugin. Follow the usage guide for copy-paste samples to add insert-fragment in web.xml file and jspc-maven-plugin + maven-war-plugin as part of build plugins in pom.xml file. Here are some problems that I encountered while adding JSP precompilation to Wish: Some [...]]]></description>
			<content:encoded><![CDATA[<p>You can precompile JSP as part of your Maven2 project build by using Maven2 JSPC Plugin.</p>
<p>Follow <a href="http://mojo.codehaus.org/jspc-maven-plugin/usage.html">the usage guide</a> for copy-paste samples to add insert-fragment in web.xml file and jspc-maven-plugin + maven-war-plugin as part of build plugins in pom.xml file.</p>
<p>Here are some problems that I encountered while adding JSP precompilation to <a href="http://code.google.com/p/wish-anonymous/">Wish</a>:</p>
<p>Some of the JSPs use <a href="http://www.opensymphony.com/sitemesh/">SiteMesh</a> taglib and since the application only needed it as part of the war package, I originally set the dependency scope to be runtime. This causes JSPC to complain because it needs the library in the classpath while compiling the JSPs.</p>
<pre class="brush: plain; title: ; notranslate">
Embedded error: file:E:/tazmania/eclipse-workspace/wish/src/main/webapp/404.jsp(1,1)
The absolute uri: http://www.opensymphony.com/sitemesh/decorator cannot be resolved
in either web.xml or the jar files deployed with this application
</pre>
<p>The solution is to change the scope from runtime to compile so SiteMesh becomes available during JSP precompilation.</p>
<p>The next problem is with JSP API and Jasper Runtime.</p>
<pre class="brush: plain; title: ; notranslate">
E:\tazmania\eclipse-workspace\wish\target\jsp-source\jsp\login_jsp.java:[194,68]
cannot resolve symbol
symbol  : class JspTag
location: package tagext
</pre>
<p>E:\tazmania\eclipse-workspace\wish\target\jsp-source\jsp\_404_jsp.java:[7,61]<br />
package org.apache.jasper.runtime does not exist<br />
The solution is to add the missing libraries as dependencies in pom.xml file.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dependency&gt;
  &lt;groupId&gt;tomcat&lt;/groupId&gt;
  &lt;artifactId&gt;jasper-runtime&lt;/artifactId&gt;
  &lt;version&gt;5.5.12&lt;/version&gt;
  &lt;scope&gt;compile&lt;/scope&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
  &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
  &lt;version&gt;2.0&lt;/version&gt;
  &lt;scope&gt;compile&lt;/scope&gt;
&lt;/dependency&gt;
</pre>
<p>Note that you might want to specify the library versions based on the target environment you&#8217;re going to deploy the application to.</p>

<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fblog.cliffano.com%2F2006%2F08%2F16%2Fjsp-precompilation-for-maven2-project%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cliffano.com/2006/08/16/jsp-precompilation-for-maven2-project/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My Maven2 Cheat Sheet</title>
		<link>http://blog.cliffano.com/2006/07/27/my-maven2-cheat-sheet/</link>
		<comments>http://blog.cliffano.com/2006/07/27/my-maven2-cheat-sheet/#comments</comments>
		<pubDate>Thu, 27 Jul 2006 01:53:55 +0000</pubDate>
		<dc:creator>Cliffano Subagio</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[mvn]]></category>

		<guid isPermaLink="false">http://blog.cliffano.com/?p=39</guid>
		<description><![CDATA[Here are some Maven2 command lines that I use most often: To create a new project: mvn archetype:create -DgroupId=com.mbledug.foo -DartifactId=bar To generate Eclipse project descriptor after configuring the dependencies in pom.xml: mvn eclipse:eclipse To run unit tests, obviously: mvn test Tun run a single test by test class name: mvn test -Dtest=FooBar To generate site [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some Maven2 command lines that I use most often:</p>
<p>To create a new project:</p>
<pre>mvn archetype:create -DgroupId=com.mbledug.foo -DartifactId=bar</pre>
<p>To generate Eclipse project descriptor after configuring the dependencies in pom.xml:</p>
<pre>mvn eclipse:eclipse</pre>
<p>To run unit tests, obviously:</p>
<pre>mvn test</pre>
<p>Tun run a single test by test class name:</p>
<pre>mvn test -Dtest=FooBar</pre>
<p>To generate site documentation without running the tests (handy while updating the APTs):</p>
<pre>mvn -Dmaven.test.skip=true clean site</pre>
<p>To build the package file (jar, war, etc) allowing test failure:</p>
<pre>mvn -Dmaven.test.failure.ignore=true package</pre>
<p>To distribute the source code:</p>
<pre>mvn assembly:assembly -DdescriptorId=src</pre>
<p>To install a jar file on local repo:</p>
<pre>mvn install:install-file -Dfile=foo.jar -DgroupId=bar -Dversion=x.y -Dpackaging=jar -DartifactId=blah</pre>
<p>To release an artifact (create a tag in the SCM and bump up SNAPSHOT version in the pom):</p>
<pre>mvn release:prepare release:perform</pre>

<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fblog.cliffano.com%2F2006%2F07%2F27%2Fmy-maven2-cheat-sheet%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cliffano.com/2006/07/27/my-maven2-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tagyu4J v0.3 and BlogMap4J v0.2 &#8211; More On Maven</title>
		<link>http://blog.cliffano.com/2006/06/04/tagyu4j-v03-and-blogmap4j-v02-more-on-maven/</link>
		<comments>http://blog.cliffano.com/2006/06/04/tagyu4j-v03-and-blogmap4j-v02-more-on-maven/#comments</comments>
		<pubDate>Sun, 04 Jun 2006 07:43:07 +0000</pubDate>
		<dc:creator>Cliffano Subagio</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[blogmap4j]]></category>
		<category><![CDATA[feedmap]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[tagyu]]></category>
		<category><![CDATA[tagyu4j]]></category>

		<guid isPermaLink="false">http://blog.cliffano.com/?p=34</guid>
		<description><![CDATA[Tagyu4J v0.3 and BlogMap4J v0.2 have been released. Included in this release: The use of Maven2. Spent some time on figuring out the equivalent of Maven1 goals in Maven2, e.g. distribution plugin in Maven1 is now assembly plugin in Maven2. Project sites (BlogMap4J, Tagyu4J) are now generated by Maven. It reminds me of the old [...]]]></description>
			<content:encoded><![CDATA[<p>Tagyu4J v0.3 and BlogMap4J v0.2 have been released. Included in this release:</p>
<ul>
<li>The use of Maven2. Spent some time on figuring out the equivalent of Maven1 goals in Maven2, e.g. distribution plugin in Maven1 is now assembly plugin in Maven2.</li>
<li>Project sites (<a href="http://code.google.com/p/blogmap4j/">BlogMap4J</a>, <a href="http://code.google.com/p/tagyu4j/">Tagyu4J</a>) are now generated by Maven. It reminds me of the old days of using <a href="http://forrest.apache.org/">Forrest</a> 0.6 back in 2004.</li>
<li>Lots of code refactoring, lots of &#8216;Why did I do it that way?&#8217; moments.</li>
<li>More unit tests with the aim of high test coverage and low code complexity. The effort of adding unit tests leads to code refactoring, should&#8217;ve done it much earlier.</li>
</ul>
<p>My plan is to Maven2ised the rest of my projects (Wish and the Blojsom plugins). With the recent effort on Blojsom 3 where David changed (for the better) the names of classes, methods, etc, my Blojsom plugins should now support Blojsom 2 and Blojsom 3 compatible builds. I&#8217;m thinking to use sub modules in each plugin project by pulling the plugin logic to a *-core module, which will be the dependency of *-blojsom3 and *-blojsom2 modules within the same pom.</p>
<p>My overall thoughts on using Maven as a build tool: I don&#8217;t see any reason of using plain Ant anymore while most of the things needed are readily available in Maven. At times you might need to do something very fancy where you need to create an Ant script or write your own Maven plugin.</p>
<p>I&#8217;ve heard the argument against using Maven because Maven is seen as another learning curve for the developers. My response to it is that I believe Maven is something worth learning and getting used to, really, it will simplify your life and it will help your projects (and fellow developers) in the long run.</p>
<p>Moreover, <a href="http://www.mergere.com/m2book_download.jsp">Maven is more than a build tool</a>.</p>

<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fblog.cliffano.com%2F2006%2F06%2F04%2Ftagyu4j-v03-and-blogmap4j-v02-more-on-maven%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cliffano.com/2006/06/04/tagyu4j-v03-and-blogmap4j-v02-more-on-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corrupted Jar On Local Maven Repository</title>
		<link>http://blog.cliffano.com/2006/02/28/corrupted-jar-on-local-maven-repository/</link>
		<comments>http://blog.cliffano.com/2006/02/28/corrupted-jar-on-local-maven-repository/#comments</comments>
		<pubDate>Mon, 27 Feb 2006 15:29:10 +0000</pubDate>
		<dc:creator>Cliffano Subagio</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://blog.cliffano.com/?p=28</guid>
		<description><![CDATA[After staring blankly on why the test failed with Maven but it was ok as a stand-alone, I remembered that I had this problem before. It was caused by corrupted jar on my local maven repository. The solution was to simply destroy the repository and rebuild it.]]></description>
			<content:encoded><![CDATA[<pre class="brush: plain; title: ; notranslate">
test:test:
[junit] Running
foo.bar.BlahTestCase java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.&amp;lt;init&amp;gt;(ZipFile.java:111)
at java.util.zip.ZipFile.&amp;lt;init&amp;gt;(ZipFile.java:127)
at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:870)
at org.apache.tools.ant.AntClassLoader.getResource(AntClassLoader.java:799)
</pre>
<p>After staring blankly on why the test failed with Maven but it was ok as a stand-alone, I remembered that I had this problem before. It was caused by corrupted jar on my local maven repository. The solution was to simply destroy the repository and rebuild it.</p>

<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fblog.cliffano.com%2F2006%2F02%2F28%2Fcorrupted-jar-on-local-maven-repository%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cliffano.com/2006/02/28/corrupted-jar-on-local-maven-repository/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

