<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>maven &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/maven/</link>
	<description>Feed of posts on WordPress.com tagged "maven"</description>
	<pubDate>Sat, 28 Nov 2009 13:42:55 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Getting Multi-module projects to work in eclipse WTP]]></title>
<link>http://numberformat.wordpress.com/2009/11/27/getting-multi-module-projects-to-work-in-eclipse/</link>
<pubDate>Fri, 27 Nov 2009 20:41:50 +0000</pubDate>
<dc:creator>numberformat</dc:creator>
<guid>http://numberformat.wordpress.com/2009/11/27/getting-multi-module-projects-to-work-in-eclipse/</guid>
<description><![CDATA[Multi module projects work in eclipse by doing the following&#8230; Specify the server runtime envir]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Multi module projects work in eclipse by doing the following&#8230;</p>
<h3>Specify the server runtime environment</h3>
<p>Include the Server run-time environment in the web project&#8217;s pom.xml file. For example for tomcat<br />
Inside the build section of the pom put in the following.</p>
<pre class="brush: xml;">
&#60;plugin&#62;
	&#60;groupid&#62;org.apache.maven.plugins&#60;/groupid&#62;
	&#60;artifactid&#62;maven-eclipse-plugin&#60;/artifactid&#62;
	&#60;configuration&#62;
		&#60;downloadsources&#62;true&#60;/downloadsources&#62;
		&#60;downloadjavadocs&#62;true&#60;/downloadjavadocs&#62;
		&#60;wtpapplicationxml&#62;true&#60;/wtpapplicationxml&#62;
		&#60;wtpversion&#62;1.5&#60;/wtpversion&#62;
		&#60;classpathcontainers&#62;
			&#60;classpathcontainer&#62;org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0&#60;/classpathcontainer&#62;
			&#60;classpathcontainer&#62;org.eclipse.jst.j2ee.internal.web.container
			&#60;/classpathcontainer&#62;
			&#60;classpathcontainer&#62;org.eclipse.jst.j2ee.internal.module.container
			&#60;/classpathcontainer&#62;
		&#60;/classpathcontainers&#62;
		&#60;additionalprojectfacets&#62;
			&#60;jst.web&#62;2.5&#60;/jst.web&#62;
		&#60;/additionalprojectfacets&#62;
	&#60;/configuration&#62;
&#60;/plugin&#62;
</pre>
<h3>Specify J2EE module dependencies</h3>
<p>The dependent projects need to specify the library projects as J2EE module dependencies.</p>
<p>Right click on the project -&#62; properties -&#62; J2EE Module dependency. Just click on the projects the current project depends on.</p>
<h3>Build Time</h3>
<p>Unless necessary don&#8217;t specify the groupId and version in a sub-module unless specifically needed. As per Maven if those tags are not specified then the parent&#8217;s tags are read. In most cases this is the desired behavior.</p>
<h3>Dependencies between projects</h3>
<p>Say you have a parent project with 2 sub projects.</p>
<ul>
<li>test-parent
<ul>
<li>test-common</li>
<li>test-web-project</li>
</ul>
</li>
</ul>
<p>Say test-web-project depends on test-common you can specify the following in the test-web-project.</p>
<pre class="brush: xml;">
    &#60;dependency&#62;
      &#60;groupId&#62;com.test&#60;/groupId&#62;
      &#60;artifactId&#62;test-common&#60;/artifactId&#62;
      &#60;version&#62;${version}&#60;/version&#62;
    &#60;/dependency&#62;
</pre>
<p>When the project is built the system will include the dependency in the WAR files WEB-INF/lib directory. You would not need to worry about changing the version of the dependency for each sub-module since the ${version} expression will grab from the parent&#8217;s version number.</p>
<h3>Jetty implementation broken?</h3>
<p>At the time of this writing it seems like Jetty does not behave as expected. I am expecting the changes I make to test-common be visible when I restart jetty. At this moment the only time jetty picks up the changes is when I &#8220;mvn install&#8221; on the parent. Why jetty does not have a concept of &#8220;J2EE module dependencies&#8221; like eclipse is beyond me.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Status code 401 on mvn site:deploy?]]></title>
<link>http://benkiew.wordpress.com/2009/11/27/status-code-401-on-mvn-sitedeploy/</link>
<pubDate>Fri, 27 Nov 2009 17:33:59 +0000</pubDate>
<dc:creator>bkiew</dc:creator>
<guid>http://benkiew.wordpress.com/2009/11/27/status-code-401-on-mvn-sitedeploy/</guid>
<description><![CDATA[Are you faced to a 401 status code when invoking mvn site:deploy? Like this one? Embedded error: Fai]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Are you faced to a 401 status code when invoking <code>mvn site:deploy</code>?</p>
<p>Like this one?<br />
<code>Embedded error: Failed to transfer file: http://server:port/dir/projectname//./changes-report.html. Return code is: 401<br />
</code></p>
<p>Then </p>
<ol>
<li> check your pom.xml if the site-id in the distribution-section of the <code>pom.xml</code> matches any server-id setting in your <code>settings.xml</code>. </li>
<li> check if the password is still valid!</li>
</ol>
<p>For example the following <code>pom.xml</code> and <code>settings.xml</code> DO NOT match. Note the difference between <em>BARNAME </em>and <em>FOONAME</em>! This cannot work. </p>
<p>pom.xml:</p>
<pre class="brush: xml;">
   &#60;distributionManagement&#62;
     &#60;site&#62;
       &#60;!-- does not match FOONAME --&#62;
       &#60;id&#62;BARNAME&#60;/id&#62;
       &#60;url&#62;${site-base-url}/projectname/&#60;/url&#62;
     &#60;/site&#62;
   &#60;/distributionManagement&#62;
</pre>
<p>.m2/settings.xml:</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;settings xmlns=&#34;http://maven.apache.org/POM/4.0.0&#34;
  xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
  xsi:schemaLocation=&#34;http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd&#34;&#62;
  &#60;servers&#62;
    &#60;server&#62;
       &#60;!-- does not match BARNAME --&#62;
      &#60;id&#62;FOONAME&#60;/id&#62;
      &#60;username&#62;XXXXXX&#60;/username&#62;
      &#60;password&#62;XXXXXX&#60;/password&#62;
    &#60;/server&#62;
  &#60;/servers&#62;
&#60;/settings&#62;
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Proxy setup in Java / Maven project]]></title>
<link>http://bittersweetjava.wordpress.com/2009/11/27/proxy-setup-in-java-maven-project/</link>
<pubDate>Fri, 27 Nov 2009 16:59:28 +0000</pubDate>
<dc:creator>.|2ic|K</dc:creator>
<guid>http://bittersweetjava.wordpress.com/2009/11/27/proxy-setup-in-java-maven-project/</guid>
<description><![CDATA[To setup a proxy to be used by Maven only, you need to have it defined in the settings.xml file. Thi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>To setup a proxy to be used by Maven only, you need to have it defined in the settings.xml file.<br />
This file is located in [USR_HOME]\.m2 directory (C:\Documents and Settings\[USERNAME]\.m2 for Windows users).<br />
Here&#8217;s an example of the file:</p>
<p><code><br />
&#60;settings&#62;<br />
&#160;&#160;&#60;proxies&#62;<br />
&#160;&#160;&#160;&#60;proxy&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;active&#62;true&#60;/active&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;protocol&#62;http&#60;/protocol&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;host&#62;[PROXY&#160;SERVER]&#60;/host&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;port&#62;[PROXY&#160;PORT]&#60;/port&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;username&#62;[PROXY&#160;USERNAME]&#60;/username&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;password&#62;[PROXY&#160;PASSWORD]&#60;/password&#62;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#60;nonProxyHosts&#62;www.website1.com&#124;*.website2.com&#60;/nonProxyHosts&#62;<br />
&#160;&#160;&#160;&#160;&#60;/proxy&#62;<br />
&#160;&#160;&#60;/proxies&#62;<br />
&#60;/settings&#62;<br />
</code></p>
<p>To setup a proxy to be used for a Java application: </p>
<p><code><br />
System.getProperties().put("http.proxyHost", [PROXY SERVER]);<br />
System.getProperties().put("http.proxyPort", [PROXY PORT]);<br />
System.getProperties().put("http.proxyUser", [PROXY USERNAME]);<br />
System.getProperties().put("http.proxyPassword", [PROXY PASSWORD]);<br />
</code></p>
<p>To display the proxy server used for a particular URL:<br />
<code><br />
URL url = new URL("http://www.treasurydirect.gov/xml/CPI_20090814.xml");<br />
System.out.println(ProxySelector.getDefault().select(url.toURI()));<br />
</code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Own maven archetype problem with Eclipse Java Nature]]></title>
<link>http://daills.wordpress.com/2009/11/27/own-maven-archetype-problem-with-eclipse-java-nature/</link>
<pubDate>Fri, 27 Nov 2009 13:48:06 +0000</pubDate>
<dc:creator>daill</dc:creator>
<guid>http://daills.wordpress.com/2009/11/27/own-maven-archetype-problem-with-eclipse-java-nature/</guid>
<description><![CDATA[Yep, i&#8217;ve build my own archetype and everytime i&#8217;ve created a new maven project with thi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Yep, i&#8217;ve build my own archetype and everytime i&#8217;ve created a new maven project with this archetype the java nature has been missing. So i&#8217;ve searched for more then 8 hours for a solution and finally found a small page of a developer who had the same problem. The solution is so easy &#8230; just delete the .metadata directory of you Eclipse Workspace and every Maven Project with your archetype will have the java nature in that Workspace out of the box.</p>
<p>Hope this helps some people <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Spring and JSF Integrated]]></title>
<link>http://numberformat.wordpress.com/2009/11/26/spring-and-jsf-integrated/</link>
<pubDate>Thu, 26 Nov 2009 21:33:23 +0000</pubDate>
<dc:creator>numberformat</dc:creator>
<guid>http://numberformat.wordpress.com/2009/11/26/spring-and-jsf-integrated/</guid>
<description><![CDATA[This page describes the process of integrating the Spring framework with JSF. We will take an applic]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This page describes the process of integrating the Spring framework with JSF. We will take an application that already has JSF and Spring components fully initialized and ready to go. We will prove this by displaying 2 links that allow those 2 frameworks to draw a page.</p>
<p>The integration will consist of having the user submit a JSF page. The JSF framework will handle the page submit and pass the information on to a spring enabled beans.</p>
<p>Spring MVC is not absolutely required to get this to work. You could have only used the core spring (DI) container but for the purposes of this page we will have it hang around.</p>
<h3>Requirements</h3>
<ul>
<li>Maven2</li>
<li>Basic understanding of IOC and The Spring</li>
<li>Basic understanding of JSF</li>
</ul>
<h3>Having JSF Managed Beans Delegate to Spring Managed Beans</h3>
<p>We will be using the popular &#8220;DelegatingVariableResolver&#8221; to integrate these two frameworks together. The DelegatingVariableResolver class provides the ability for Spring managed beans to be injected into JSF manged beans. This is a powerful technique to allow business logic that is managed in the spring container  available for JSF applications to use.</p>
<h3>Creating the Project</h3>
<p>We will create this project using an archetype and walk thru the different parts that make this all work.</p>
<h3>generate</h3>
<pre class="brush: bash;">
mvn archetype:generate -DarchetypeGroupId=org.vtechfw -DarchetypeArtifactId=springmvc-jsf-archetype -DarchetypeVersion=1.0-SNAPSHOT -DarchetypeRepository=http://www.vermatech.com/m2repo
</pre>
<p>Maven will prompt you for some information. It is best to answer like the following.</p>
<p>groupId: testpackage<br />
artifactId: springJSF</p>
<p>Hit enter for defaults for the rest of the questions.</p>
<h3>Run</h3>
<p>cd to the project&#8217;s directory. (cd springJSF)</p>
<pre class="brush: bash;">
mvn jetty:run
</pre>
<h3>View the project</h3>
<p>Navigate to the following page: http://localhost:8080/</p>
<ol>
<li>The spring mvc configuration is read applicationContext.xml and spring-servlet.xml</li>
<li>The faces configuration file is read faces-config.xml</li>
</ol>
<p>The system completes the initialization and the web application is ready to serve requests at http://localhost:8080</p>
<p>The application displays a welcome page with 2 links. One points to the Faces JSP file that displays a text box that allows the user to enter values and submit. The second link displays a welcome page that is rendered by the SpringMVC framework.</p>
<h3>How to get JSF to use Spring Beans Works</h3>
<p>Enable the JSF system to use DelegatingVariableResolver.</p>
<p>Add the following in the faces-config.xml</p>
<pre class="brush: xml;">
&#60;application&#62;
   &#60;variable-resolver&#62;org.springframework.web.jsf.DelegatingVariableResolver&#60;/variable-resolver&#62;
&#60;/application&#62;
</pre>
<h3>Create a Spring Managed Bean</h3>
<p>Actually you dont need to create one if you already generated the project. For documentation purposes the bean is listed here.</p>
<pre class="brush: java;">
package testpackage.quickstart.springmvc;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.stereotype.Service;

@Service(&#34;datePrintModel&#34;)
public class DatePrintModelImpl implements DatePrintModel {
	private DateFormat dateFormat = new SimpleDateFormat(&#34;EEE, d MMM yyyy HH:mm:ss Z&#34;);

	public String getDateAsString() {
		System.out.println(&#34;getDataAsString called.&#34;);
		return dateFormat.format(new Date());
	}
}
</pre>
<h3>Setup the JSF Managed Bean</h3>
<p>Add the DatePrintModel and its setters and getters to the managed been below.</p>
<p>After the change it should look something like this.</p>
<pre class="brush: java;">
package testpackage.jsftest;

import javax.faces.event.ValueChangeEvent;

import testpackage.quickstart.springmvc.DatePrintModel;

public class MessageModel {

	private DatePrintModel datePrintModel;

	public DatePrintModel getDatePrintModel() {
		return datePrintModel;
	}

	public void setDatePrintModel(DatePrintModel datePrintModel) {
		this.datePrintModel = datePrintModel;
	}

	public void printMessage(ValueChangeEvent e) {
		System.out.println(&#34;old value was: &#34; + e.getOldValue());
		System.out.println(&#34;new value is: &#34; + e.getNewValue());
	}

	public void callSpringModel() {
		System.out.println(&#34;calling the spring model...&#34;);
		datePrintModel.getDateAsString();
	}
}
</pre>
<p>Modify the faces-config.xml to look like this&#8230;</p>
<pre class="brush: xml;">
&#60;?xml version='1.0' encoding='UTF-8'?&#62;
&#60;faces-config xmlns=&#34;http://java.sun.com/xml/ns/javaee&#34;
              xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
              xsi:schemaLocation=&#34;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd&#34;
              version=&#34;1.2&#34;&#62;

&#60;managed-bean&#62;
	&#60;managed-bean-name&#62;message&#60;/managed-bean-name&#62;
	&#60;managed-bean-class&#62;java.lang.String&#60;/managed-bean-class&#62;
	&#60;managed-bean-scope&#62;session&#60;/managed-bean-scope&#62;
&#60;/managed-bean&#62;
&#60;managed-bean&#62;
	&#60;managed-bean-name&#62;messageModel&#60;/managed-bean-name&#62;
	&#60;managed-bean-class&#62;testpackage.jsftest.MessageModel&#60;/managed-bean-class&#62;
	&#60;managed-bean-scope&#62;session&#60;/managed-bean-scope&#62;
	&#60;managed-property&#62;
		&#60;property-name&#62;datePrintModel&#60;/property-name&#62;
		&#60;value&#62;#{datePrintModel}&#60;/value&#62;
	&#60;/managed-property&#62;
&#60;/managed-bean&#62;
&#60;/faces-config&#62;
</pre>
<p>As you can see above the managed-bean property has been added.</p>
<h3>Modify the JSP</h3>
<p>helloWorld.jsp</p>
<pre class="brush: xml;">
&#60;!DOCTYPE html
PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34;
&#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;
&#60;%@ page contentType=&#34;text/html;charset=UTF-8&#34; language=&#34;java&#34; %&#62;
&#60;%@ taglib prefix=&#34;f&#34; uri=&#34;http://java.sun.com/jsf/core&#34; %&#62;
&#60;%@ taglib prefix=&#34;h&#34; uri=&#34;http://java.sun.com/jsf/html&#34; %&#62;

&#60;f:view&#62;
    &#60;html&#62;
    &#60;head&#62;
        &#60;title&#62;Hello World JSF Example&#60;/title&#62;
    &#60;/head&#62;
    &#60;body&#62;
    &#60;h:form&#62;
		&#60;p&#62;This is a simple hello world page using Faces.&#60;/p&#62;
		&#60;p&#62;Enter your message here: &#60;br/&#62;
		&#60;h:inputText valueChangeListener=&#34;#{messageModel.printMessage}&#34; value=&#34;#{message}&#34; size=&#34;35&#34;/&#62;&#60;/p&#62;
		&#60;h:commandButton value=&#34;Submit&#34; action=&#34;#{messageModel.callSpringModel}&#34;/&#62;
    &#60;/h:form&#62;
    &#60;p&#62;after submit check server console for output.&#60;/p&#62;
    &#60;/body&#62;
    &#60;/html&#62;
&#60;/f:view&#62;
</pre>
<h3>Run and view The Project</h3>
<pre class="brush: bash;">
mvn jetty:run
</pre>
<p>http://localhost:8080</p>
<h3>That&#8217;s all for now!</h3>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Concept to handle minimal and maximal tests in a maven project]]></title>
<link>http://ahoehma.wordpress.com/2009/11/26/concept-to-handle-minimal-and-maximal-tests-in-a-maven-project/</link>
<pubDate>Thu, 26 Nov 2009 13:03:29 +0000</pubDate>
<dc:creator>Andreas Höhmann</dc:creator>
<guid>http://ahoehma.wordpress.com/2009/11/26/concept-to-handle-minimal-and-maximal-tests-in-a-maven-project/</guid>
<description><![CDATA[In real world applications we have all too often external dependencies in test cases. Sometimes thes]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In real world applications we have all too often external dependencies in test cases. Sometimes theses third party are not always available (i.e. remote webservices).</p>
<p>For continuous integration I want check a minimal set of tests but for my local development i want check a maximal set of tests. I want run my tests on command line (via <a href="http://maven.apache.org/" target="_blank">maven</a>) and in eclipse (via <a href="http://testng.org/doc/eclipse.html" target="_blank">testng-plugin</a>).</p>
<p>Here is my idea to do that &#8230;</p>
<p>My project super pom defines 2 profiles:</p>
<ul>
<li>test-min
<ol>
<li> active by default</li>
<li>exclude testng groups (online-tests, thirdparty-tests,&#8230;)</li>
</ol>
</li>
<li>test-max
<ol>
<li>run a defined testng suite</li>
<li>the suite defines a maximal set of test (all testng groups)</li>
</ol>
</li>
</ul>
<pre class="brush: xml;">
&#60;profiles&#62;
  &#60;profile&#62;
    &#60;id&#62;test-min&#60;/id&#62;
    &#60;activation&#62;
      &#60;activeByDefault&#62;true&#60;/activeByDefault&#62;
    &#60;/activation&#62;
    &#60;build&#62;
      &#60;plugins&#62;
        &#60;plugin&#62;
          &#60;artifactId&#62;maven-surefire-plugin&#60;/artifactId&#62;
          &#60;inherited&#62;true&#60;/inherited&#62;
          &#60;configuration&#62;
            &#60;excludedGroups&#62;${excludedTestGroups}&#60;/excludedGroups&#62;
          &#60;/configuration&#62;
        &#60;/plugin&#62;
      &#60;/plugins&#62;
    &#60;/build&#62;
  &#60;/profile&#62;
  &#60;profile&#62;
    &#60;id&#62;test-max&#60;/id&#62;
    &#60;build&#62;
      &#60;plugins&#62;
        &#60;plugin&#62;
          &#60;artifactId&#62;maven-surefire-plugin&#60;/artifactId&#62;
          &#60;inherited&#62;true&#60;/inherited&#62;
          &#60;configuration&#62;
            &#60;suiteXmlFiles&#62;
              ${basedir}/src/test/resources/Testsuite.xml
            &#60;/suiteXmlFiles&#62;
          &#60;/configuration&#62;
        &#60;/plugin&#62;
      &#60;/plugins&#62;
    &#60;/build&#62;
  &#60;/profile&#62;
&#60;/profiles&#62;
&#60;properties&#62;
  &#60;excludedTestGroups&#62;online,integration,thirdparty&#60;/excludedTestGroups&#62;
&#60;/properties&#62;
</pre>
<p>Each subproject must define a testng <strong>src/test/resources/Testsuite.xml</strong>:</p>
<pre class="brush: xml;">
&#60;!DOCTYPE suite SYSTEM &#34;http://testng.org/testng-1.0.dtd&#34;&#62;
&#60;suite name=&#34;TestSuite for Foobar&#34;&#62;
  &#60;test name=&#34;Online Tests&#34;&#62;
    &#60;packages&#62;
      &#60;package name=&#34;de.foobar.*&#34; /&#62;
    &#60;/packages&#62;
    &#60;groups&#62;
      &#60;run&#62;
        &#60;include name=&#34;online&#34; /&#62;
      &#60;/run&#62;
    &#60;/groups&#62;
  &#60;/test&#62;
  &#60;test name=&#34;Integration Tests&#34;&#62;
    &#60;packages&#62;
      &#60;package name=&#34;de.foobar.*&#34; /&#62;
    &#60;/packages&#62;
    &#60;groups&#62;
      &#60;run&#62;
        &#60;include name=&#34;integration&#34; /&#62;
      &#60;/run&#62;
    &#60;/groups&#62;
  &#60;/test&#62;
  &#60;test name=&#34;Thirdparty Tests&#34;&#62;
    &#60;packages&#62;
      &#60;package name=&#34;de.foobar.*&#34; /&#62;
    &#60;/packages&#62;
    &#60;groups&#62;
      &#60;run&#62;
        &#60;include name=&#34;thirdparty&#34; /&#62;
      &#60;/run&#62;
    &#60;/groups&#62;
  &#60;/test&#62;
  &#60;!-- Each project can define MORE groups: i.e. &#34;interactive&#34; --&#62;
  &#60;test name=&#34;Other Tests&#34;&#62;
    &#60;packages&#62;
      &#60;package name=&#34;de.foobar.*&#34; /&#62;
    &#60;/packages&#62;
    &#60;groups&#62;
      &#60;run&#62;
        &#60;exclude name=&#34;online&#34; /&#62;
        &#60;exclude name=&#34;integration&#34; /&#62;
        &#60;exclude name=&#34;thirdparty&#34; /&#62;
        &#60;!-- Each project can define MORE groups: i.e. &#34;interactive&#34; --&#62;
      &#60;/run&#62;
    &#60;/groups&#62;
  &#60;/test&#62;
&#60;/suite&#62;
</pre>
<p>If the sub project defines more exclude groups (i.e. a additional &#8220;interactive&#8221; group) then the pom must overwrite the excludedTestGroups property:</p>
<pre class="brush: xml;">
&#60;properties&#62;
  &#60;excludedTestGroups&#62;online,integration,thirdparty,interactive&#60;/excludedTestGroups&#62;
&#60;/properties&#62;
</pre>
<p>To check the correct configuration of the two profiles we can use <strong>help:effective-pom</strong>:</p>
<p><code>mvn -Ptest-min help:effective-pom &#124; less</code></p>
<pre class="brush: xml;">
&#60;plugin&#62;
  &#60;artifactId&#62;maven-surefire-plugin&#60;/artifactId&#62;
  &#60;configuration&#62;
    &#60;excludedGroups&#62;online,integration,thirdparty,interactive&#60;/excludedGroups&#62;
  &#60;/configuration&#62;
&#60;/plugin&#62;
</pre>
<p><code>mvn -Ptest-max help:effective-pom &#124; less</code></p>
<pre class="brush: xml;">
&#60;plugin&#62;
  &#60;artifactId&#62;maven-surefire-plugin&#60;/artifactId&#62;
  &#60;configuration&#62;
    &#60;suiteXmlFiles&#62;
      &#60;suiteXmlFile&#62;d:\foobar\src/test/resources/Testsuite.xml&#60;/suiteXmlFile&#62;
    &#60;/suiteXmlFiles&#62;
  &#60;/configuration&#62;
&#60;/plugin&#62;
</pre>
<p>Now I can run min/max tests for each project which depend on the above super-pom. The test-min is the default profile and would be used on the continuous integration system (i.e. <a href="http://www.jetbrains.com/teamcity/">TeamCity</a>).</p>
<p>Try it <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Creating a JSF application in 10 minutes]]></title>
<link>http://numberformat.wordpress.com/2009/11/25/creating-a-jsf-application-in-10-minutes/</link>
<pubDate>Wed, 25 Nov 2009 06:18:29 +0000</pubDate>
<dc:creator>numberformat</dc:creator>
<guid>http://numberformat.wordpress.com/2009/11/25/creating-a-jsf-application-in-10-minutes/</guid>
<description><![CDATA[This page will describe the process of creating a JSF application and running it within 10 minutes. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This page will describe the process of creating a JSF application and running it within 10 minutes.</p>
<h3>Requirements</h3>
<ul>
<li>Maven 2</li>
</ul>
<h3>Generate the web application</h3>
<p>First we start with a maven archetype</p>
<p>mvn archetype:generate</p>
<p>Choose option 18 which is a (maven-archetype-webapp)</p>
<p>For the group id enter: test</p>
<p>For the artifactId enter: jsfTestWeb</p>
<p>cd to the project directory and modify the pom.xml file. It should look like this&#8230;</p>
<pre class="brush: xml;">
&#60;project xmlns=&#34;http://maven.apache.org/POM/4.0.0&#34; xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
	xsi:schemaLocation=&#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&#34;&#62;
	&#60;modelVersion&#62;4.0.0&#60;/modelVersion&#62;
	&#60;groupId&#62;test&#60;/groupId&#62;
	&#60;artifactId&#62;jsfTestWeb&#60;/artifactId&#62;
	&#60;packaging&#62;war&#60;/packaging&#62;
	&#60;version&#62;1.0-SNAPSHOT&#60;/version&#62;
	&#60;name&#62;jsfTestWeb Maven Webapp&#60;/name&#62;
	&#60;url&#62;http://maven.apache.org&#60;/url&#62;
	&#60;dependencies&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;junit&#60;/groupId&#62;
			&#60;artifactId&#62;junit&#60;/artifactId&#62;
			&#60;version&#62;3.8.1&#60;/version&#62;
			&#60;scope&#62;test&#60;/scope&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;javax.faces&#60;/groupId&#62;
			&#60;artifactId&#62;jsf-api&#60;/artifactId&#62;
			&#60;version&#62;1.2_02&#60;/version&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;javax.faces&#60;/groupId&#62;
			&#60;artifactId&#62;jsf-impl&#60;/artifactId&#62;
			&#60;version&#62;1.2-b19&#60;/version&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;javax.servlet&#60;/groupId&#62;
			&#60;artifactId&#62;jstl&#60;/artifactId&#62;
			&#60;version&#62;1.1.2&#60;/version&#62;
		&#60;/dependency&#62;
		&#60;dependency&#62;
			&#60;groupId&#62;taglibs&#60;/groupId&#62;
			&#60;artifactId&#62;standard&#60;/artifactId&#62;
			&#60;version&#62;1.1.2&#60;/version&#62;
		&#60;/dependency&#62;
	&#60;/dependencies&#62;
	&#60;build&#62;
		&#60;finalName&#62;jsfTestWeb&#60;/finalName&#62;
		&#60;plugins&#62;
			&#60;plugin&#62;
				&#60;groupId&#62;org.mortbay.jetty&#60;/groupId&#62;
				&#60;artifactId&#62;jetty-maven-plugin&#60;/artifactId&#62;
			&#60;/plugin&#62;
		&#60;/plugins&#62;
	&#60;/build&#62;
&#60;/project&#62;
</pre>
<p>Modify the WEB-INF/web.xml</p>
<pre class="brush: xml;">
&#60;!DOCTYPE web-app PUBLIC
 &#34;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&#34;
 &#34;http://java.sun.com/dtd/web-app_2_3.dtd&#34; &#62;

&#60;web-app&#62;
  &#60;display-name&#62;Archetype Created Web Application&#60;/display-name&#62;

  &#60;servlet&#62;
  	&#60;servlet-name&#62;Faces Servlet&#60;/servlet-name&#62;
  	&#60;servlet-class&#62;javax.faces.webapp.FacesServlet&#60;/servlet-class&#62;
  	&#60;load-on-startup&#62;1&#60;/load-on-startup&#62;
  &#60;/servlet&#62;

  &#60;servlet-mapping&#62;
  	&#60;servlet-name&#62;Faces Servlet&#60;/servlet-name&#62;
  	&#60;url-pattern&#62;*.faces&#60;/url-pattern&#62;
  &#60;/servlet-mapping&#62;

  &#60;welcome-file-list&#62;
  	&#60;welcome-file&#62;index.jsp&#60;/welcome-file&#62;
  &#60;/welcome-file-list&#62;

&#60;/web-app&#62;
</pre>
<p>Create a WEB-INF/faces-config.xml</p>
<pre class="brush: xml;">
&#60;?xml version='1.0' encoding='UTF-8'?&#62;
&#60;faces-config xmlns=&#34;http://java.sun.com/xml/ns/javaee&#34;
              xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;
              xsi:schemaLocation=&#34;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd&#34;
              version=&#34;1.2&#34;&#62;

&#60;managed-bean&#62;
	&#60;managed-bean-name&#62;message&#60;/managed-bean-name&#62;
	&#60;managed-bean-class&#62;java.lang.String&#60;/managed-bean-class&#62;
	&#60;managed-bean-scope&#62;session&#60;/managed-bean-scope&#62;
&#60;/managed-bean&#62;
&#60;managed-bean&#62;
	&#60;managed-bean-name&#62;messageModel&#60;/managed-bean-name&#62;
	&#60;managed-bean-class&#62;test.MessageModel&#60;/managed-bean-class&#62;
	&#60;managed-bean-scope&#62;session&#60;/managed-bean-scope&#62;
&#60;/managed-bean&#62;
&#60;/faces-config&#62;
</pre>
<p>Create a jsp helloWorld.jsp</p>
<pre class="brush: xml;">
&#60;!DOCTYPE html
PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34;
&#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;
&#60;%@ page contentType=&#34;text/html;charset=UTF-8&#34; language=&#34;java&#34; %&#62;
&#60;%@ taglib prefix=&#34;f&#34; uri=&#34;http://java.sun.com/jsf/core&#34; %&#62;
&#60;%@ taglib prefix=&#34;h&#34; uri=&#34;http://java.sun.com/jsf/html&#34; %&#62;

&#60;f:view&#62;
    &#60;html&#62;
    &#60;head&#62;
        &#60;title&#62;Hello World JSF Example&#60;/title&#62;
    &#60;/head&#62;
    &#60;body&#62;
    &#60;h:form&#62;
		&#60;p&#62;This is a simple hello world page using Faces.&#60;/p&#62;
		&#60;p&#62;Enter your message here: &#60;br/&#62;
		&#60;h:inputText valueChangeListener=&#34;#{messageModel.printMessage}&#34; value=&#34;#{message}&#34; size=&#34;35&#34;/&#62;&#60;/p&#62;
		&#60;h:commandButton value=&#34;Submit&#34; action=&#34;submit&#34;/&#62;
    &#60;/h:form&#62;
    &#60;/body&#62;
    &#60;/html&#62;
&#60;/f:view&#62;
</pre>
<h3>Create a managed Bean</h3>
<p>src/main/java/test.MessageModel.java</p>
<pre class="brush: java;">
package test;

import javax.faces.event.ValueChangeEvent;

public class MessageModel {
	public void printMessage(ValueChangeEvent e) {
		System.out.println(&#34;old value was: &#34; + e.getOldValue());
		System.out.println(&#34;new value is: &#34; + e.getNewValue());
	}
}
</pre>
<h3>Run the JSF application</h3>
<p>Save all files and run the application in jetty.</p>
<p>mvn jetty:run</p>
<p>The application should come up when you point your browser to http://localhost:8080</p>
<p>Type in some text and you should see some output on the console window.</p>
<p>Right click on the page and click view source. You will notice JSF generated code.</p>
<h3>That&#8217;s all for Now!</h3>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Application Administrator]]></title>
<link>http://mindsourceinc.wordpress.com/2009/11/24/application-administrator/</link>
<pubDate>Tue, 24 Nov 2009 22:33:50 +0000</pubDate>
<dc:creator>Michelle</dc:creator>
<guid>http://mindsourceinc.wordpress.com/2009/11/24/application-administrator/</guid>
<description><![CDATA[This position is an Application Administrator to support operations within our client&#8217;s depart]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This position is an Application Administrator to support operations within our client&#8217;s department. This position has a critical role in delivering our services to clients and ensuring successful ongoing operation of our applications and services. It services a highly interactive software development build/release process as well as a rich operational environment with many interrelated applications/database services. The candidate should be self-motivated, detail oriented, adaptable to change and must work well in a flexible team environment with developers, QA, operations staff, system administrators and managers.</p>
<p><strong>RESPONSIBILITIES:</strong></p>
<p><span style="text-decoration:underline;"> </span></p>
<p><span style="text-decoration:underline;">Application and database support </span></p>
<ul>
<li>Provide on-going database administration in both back-end and front-end with application infrastructure support for our client&#8217;s administration systems, including the deployment of new applications.</li>
<li>Review the physical design of existing databases for optimal database structures, database performance tuning, security, database backup/recovery strategy, implementing high-availability, and pro-active and reactive performance analysis, monitoring, troubleshooting and resolution of issues, capacity planning, monitoring data growth and system utilization, trend analysis and predicting future database resource requirements.</li>
<li>Install web-base applications from ground up to full-ballooned implementation and support, including configuration at Unix/Linux/Windows system level, back-end integration with database, front-end integration with user-interface, final delivery to users to fulfill users’ requirement and on-going maintenance.</li>
<li>Take the lead in ensuring that application and web services are configured and tuned according to application needs; provide troubleshooting as needed.</li>
<li>Work with System Administrators to ensure test and production boxes conform to the software application configuration needs.</li>
<li>Support the department-wide infrastructure application for database management, system monitoring and notification, job scheduling, deployment, provision and patching automation, application topology and service level management for campus-wide system performance.</li>
</ul>
<p><span style="text-decoration:underline;">Build/release activities</span></p>
<ul>
<li>Manage the build, tagging and release processes for a number of interdependent Java web applications and background processes in the QA and production environments. Ensure the build and release process is scalable and repeatable.</li>
<li>Work with the development team to ensure efficient and understandable build procedures are adhered to and conform to a standard process for configuration and release management</li>
<li>Develop and maintain tools that automate the building of software releases for an Agile-based development process. This is one of continuous integration, where the automated build process can be run many times a day if necessary.</li>
<li>Work with and support the QA team to ensure automated test suites run as part of the continuous integration build process.</li>
</ul>
<p><strong>REQUIREMENT FOR SKILL AND COMPETENCIES:</strong></p>
<ul>
<li>Expert hands-on with shell scripts, other scripting languages, preferably Perl, and tool automations</li>
<li>Minimum 2 years database administration experience in Oracle and 3 years Application administration experience in Unix/Linux infrastructure environments is required.</li>
<li>Hands-on experience of Oracle databases 10g for 24/7 database operations and tool automation in installation, configuration, backup/recovery, startup/shutdown, data refresh, and application integrations.</li>
<li>Experience with OEM/Grid Control is highly desired.</li>
<li>Knowledge and understanding of large scale ERP implementation and support like Oracle Financial and PeopleSoft systems.</li>
<li>Expert knowledge of Apache and Tomcat, and other web/application servers such as JBoss</li>
<li>Strong Unix and system administration skills with basic network and security knowledge</li>
<li>Strong experience and ability in web applications deployment, configuration and integration from both OpenSource and Commercial based systems with or without sophisticated vendor support.</li>
<li>Java/J2EE based programs</li>
<li>Java/servlet/JSP based web applications</li>
<li>Experience with Subversion, PVCS or similar source code repository</li>
<li>Experience with Maven and familiarity with automated build processes</li>
<li>Experience with the Agile development methodology and concepts of extreme programming and continuous integration</li>
<li>Understanding of the layers/tiers of web applications and the communication protocol between the tiers with networking protocols (TCP/IP, HTTP, SSL, DNS, FTP, etc.)</li>
<li>Ability to multi-task and work in a team environment is critical and should have excellent communication skills in both verbal and written forms.</li>
<li>Ability to manage multiple competing priorities and work under pressure in high stress situations</li>
<li>Excellent communication skills in both verbal and written</li>
<li>Ability to work under pressure and to deliver results in a complex and dynamic operational environment</li>
</ul>
<p><strong>Qualifications</strong></p>
<p>Minimum 5 years as an IT professional in build/release and application/database administration, plus one or more of the following areas: IT infrastructure operations 24/7, systems analysis and design, or application development.</p>
<p><strong>Education</strong><br />
Bachelors Degree in Computer Science, Engineering or related field or equivalent experience</p>
<p>If you are interested, please send your resume to <a href="mailto:tsotelo@mindsource.com?subject=Application Administrator">tsotelo@mindsource.com</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[maven-surefire-plugin only uses 67MB of heap?]]></title>
<link>http://benkiew.wordpress.com/2009/11/24/maven-surefire-plugin-only-uses-67mb-heap/</link>
<pubDate>Tue, 24 Nov 2009 16:24:27 +0000</pubDate>
<dc:creator>bkiew</dc:creator>
<guid>http://benkiew.wordpress.com/2009/11/24/maven-surefire-plugin-only-uses-67mb-heap/</guid>
<description><![CDATA[Today i  had to do some merging of artifacts (code and pom.xml). Then i wondered, why the tests didn]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Today i  had to do some merging of artifacts (code and pom.xml). Then i wondered, why the tests didn&#8217;t run properly.</p>
<p>&#8220;<code>java.lang.OutOfMemoryError: Java heap space</code>&#8221; was the reason. But why? I didn&#8217;t change the tests and i carefully merged the configuration. So i connected VisualVM to the surefire process and saw that only ca. 67MB max heap were available. I reviewed my MAVEN_OPTS, but my settings didn&#8217;t apply&#8230;</p>
<p>The culprit is a bug. See <a title="http://jira.codehaus.org/browse/SUREFIRE-501" href="http://jira.codehaus.org/browse/SUREFIRE-501" target="_blank">http://jira.codehaus.org/browse/SUREFIRE-501</a>.</p>
<p>The workaround is to place your max heap configuration in the configuration section of the plugin. As seen in the linked bug issue:</p>
<pre class="brush: xml;">
&#60;plugin&#62;
  &#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;
  &#60;artifactId&#62;maven-surefire-plugin&#60;/artifactId&#62;
  &#60;configuration&#62;
    &#60;!-- http://jira.codehaus.org/browse/SUREFIRE-501 --&#62;
    &#60;argLine&#62;-Xmx256m&#60;/argLine&#62;
  &#60;/configuration&#62;
&#60;/plugin&#62;
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Create Webapp in Maven]]></title>
<link>http://rschmid.wordpress.com/2009/11/24/create-webapp-in-maven/</link>
<pubDate>Tue, 24 Nov 2009 09:45:04 +0000</pubDate>
<dc:creator>rschmid</dc:creator>
<guid>http://rschmid.wordpress.com/2009/11/24/create-webapp-in-maven/</guid>
<description><![CDATA[mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><code>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp</code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Create multi-mode maven projects in Eclipse]]></title>
<link>http://almeidamike.wordpress.com/2009/11/23/create-multi-mode-maven-projects-in-eclipse/</link>
<pubDate>Mon, 23 Nov 2009 18:40:58 +0000</pubDate>
<dc:creator>almeidamike</dc:creator>
<guid>http://almeidamike.wordpress.com/2009/11/23/create-multi-mode-maven-projects-in-eclipse/</guid>
<description><![CDATA[This is a good guide to create multi-mode maven projects in Eclipse: http://maven.apache.org/plugins]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is a good guide to create multi-mode maven projects in Eclipse:</p>
<p><a href="http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html">http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html</a></p>
<p>&#160;</p>
<p>Also useful to refactor existing project to put several modules bellow a parent module that wasn&#8217;t created when it should.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Space and Beyond]]></title>
<link>http://eepublishers.wordpress.com/2009/11/23/space-and-beyond-2/</link>
<pubDate>Mon, 23 Nov 2009 10:50:55 +0000</pubDate>
<dc:creator>Annette Thompson</dc:creator>
<guid>http://eepublishers.wordpress.com/2009/11/23/space-and-beyond-2/</guid>
<description><![CDATA[Read all about a tale of planetary woe; SumbandilaSat payload activation going well;  astronomy star]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Read all about a tale of planetary woe; SumbandilaSat payload activation going well;  astronomy stars and a giant ribbon discovered at the edge of the solar system&#8230; <a href="http://www.eepublishers.co.za/view.php?sid=19490" target="_blank">(more</a>)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Hello Enterprise Application]]></title>
<link>http://numberformat.wordpress.com/2009/11/23/hello-enterprise-application/</link>
<pubDate>Mon, 23 Nov 2009 05:36:21 +0000</pubDate>
<dc:creator>numberformat</dc:creator>
<guid>http://numberformat.wordpress.com/2009/11/23/hello-enterprise-application/</guid>
<description><![CDATA[This page will show you how to create an Jave Enterprise application using Maven&#8217;s multi-modul]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This page will show you how to create an Jave Enterprise application using Maven&#8217;s multi-module and archetype capabilities.</p>
<h3>Requirements</h3>
<ul>
<li>Maven</li>
<li>Eclipse IDE</li>
<li>Java 5 or above</li>
<li>Access to the Command Prompt</li>
</ul>
<h3>Hello Enterprise</h3>
<p>In the example we will name the application HelloEnterprise. This will be the parent project. The project will have 3 sub-projects listed below.</p>
<ol>
<li>HelloModel &#8211; contains the business logic</li>
<li>HelloWeb &#8211; contains the Web application flow control logic</li>
<li>HelloEar &#8211; small sub-project used simply to create the ear</li>
</ol>
<h3>Create the Parent Project</h3>
<p>The first step we will do is to create the parent project. This project will contain the others. Name the project something that is generic to the problem at hand.</p>
<p>mvn archetype:generate</p>
<p>choose the default (15) &#8220;maven-archetype-quickstart&#8221;</p>
<pre class="brush: bash;">
Define value for groupId: : test
Define value for artifactId: : hello-enterprise
Define value for version:  1.0-SNAPSHOT: :
Define value for package:  test: :
Confirm properties configuration:
groupId: test
artifactId: hello-enterprise
version: 1.0-SNAPSHOT
package: test
 Y: :
</pre>
<p>cd hello-enterprise<br />
Edit the pom.xml and change the packaging to say pom instead of jar.</p>
<h3>Create the Model project</h3>
<p>For this step we will create a very simple model project that simply contains a single Model class. Though this is a very simple project it does show you how you can combine sub-modules into one ear file in the end.</p>
<p>mvn archetype:generate</p>
<p>Again choose option 15 just like before. This time answer the artifact id should be &#8220;hello-enterprise-model&#8221;.</p>
<p>Go ahead and create the model class</p>
<p>cd hello-enterprise-model</p>
<p>mvn eclipse:eclipse</p>
<p>Import the project into eclipse and create the following class and interface</p>
<p><strong>Bean</strong></p>
<pre class="brush: java;">
package test;

import java.math.BigDecimal;

public class Product {
	private Integer id;
	private String name;
	private BigDecimal price;

	public Product(Integer id, String name, BigDecimal price) {
		this.id = id;
		this.name = name;
		this.price = price;
	}

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public BigDecimal getPrice() {
		return price;
	}
	public void setPrice(BigDecimal price) {
		this.price = price;
	}
}
</pre>
<p><strong>Interface</strong></p>
<pre class="brush: java;">
package test;

import java.util.List;

public interface ProductDataManager {

	public abstract List&#60;Product&#62; getAllProducts();

}
</pre>
<p><strong>Class</strong></p>
<pre class="brush: java;">
package test;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class ProductDataManagerImpl implements ProductDataManager {
	/* (non-Javadoc)
	 * @see test.ProductDataManager#getAllProducts()
	 */
	public List&#60;Product&#62; getAllProducts() {
		List&#60;Product&#62; list = new ArrayList&#60;Product&#62;();

		list.add(createProduct(1, &#34;test1&#34;, BigDecimal.valueOf(12)));
		list.add(createProduct(2, &#34;test2&#34;, BigDecimal.valueOf(13)));
		list.add(createProduct(3, &#34;test3&#34;, BigDecimal.valueOf(14)));

		return list;
	}
	private Product createProduct(Integer id, String name, BigDecimal price) {
		Product product = new Product(id, name, price);
		return product;
	}
}
</pre>
<p>cd ..</p>
<h3>Create the web project</h3>
<p>To create the web project we will use an existing archetype that was created my me. It is an archetype of a very simple spring MVC application that prints some static text on the screen.</p>
<pre class="brush: bash;">
mvn archetype:generate -DarchetypeGroupId=com.vermatech \
-DarchetypeArtifactId=springmvc-archetype -DarchetypeVersion=1.0-SNAPSHOT \
-DarchetypeRepository=http://www.vermatech.com/m2repo
</pre>
<p>Answer the questions like this:</p>
<pre class="brush: bash;">
Define value for groupId: : test
Define value for artifactId: : hello-enterprise-web
Define value for version:  1.0-SNAPSHOT: :
Define value for package:  test: :
Confirm properties configuration:
groupId: test
artifactId: hello-enterprise-web
version: 1.0-SNAPSHOT
package: test
 Y: :
</pre>
<p>You may test the project you just created from an archetype by typing mvn jetty:run from the hello-enterprise-web folder. Point your browser to: http://localhost:8080/ and verify everything is ok.</p>
<p>When you are done return to the command prompt and cd to the hello-enterprise directory again.</p>
<h3>Create the Ear Project</h3>
<p>Finally we will create an EAR project that will allow us to create an EAR file.</p>
<p>mvn archetype:generate</p>
<p>choose option 15 (default)</p>
<p>Edit pom.xml and make sure it looks like the following.</p>
<p>hello-enterprise/hello-enterprise-ear/pom.xml</p>
<pre class="brush: xml;">
&#60;?xml version=&#34;1.0&#34;?&#62;
&#60;project xsi:schemaLocation=&#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&#34; xmlns=&#34;http://maven.apache.org/POM/4.0.0&#34;
    xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34;&#62;
  &#60;modelVersion&#62;4.0.0&#60;/modelVersion&#62;
  &#60;parent&#62;
    &#60;artifactId&#62;hello-enterprise&#60;/artifactId&#62;
    &#60;groupId&#62;test&#60;/groupId&#62;
    &#60;version&#62;1.0-SNAPSHOT&#60;/version&#62;
  &#60;/parent&#62;
  &#60;groupId&#62;test&#60;/groupId&#62;
  &#60;artifactId&#62;hello-enterprise-ear&#60;/artifactId&#62;
  &#60;packaging&#62;ear&#60;/packaging&#62;
  &#60;version&#62;1.0-SNAPSHOT&#60;/version&#62;
  &#60;name&#62;hello-enterprise-ear&#60;/name&#62;
  &#60;url&#62;http://maven.apache.org&#60;/url&#62;
  &#60;dependencies&#62;
    &#60;dependency&#62;
      &#60;groupId&#62;junit&#60;/groupId&#62;
      &#60;artifactId&#62;junit&#60;/artifactId&#62;
      &#60;version&#62;3.8.1&#60;/version&#62;
      &#60;scope&#62;test&#60;/scope&#62;
    &#60;/dependency&#62;
    &#60;dependency&#62;
      &#60;groupId&#62;test&#60;/groupId&#62;
      &#60;artifactId&#62;hello-enterprise-model&#60;/artifactId&#62;
      &#60;version&#62;1.0-SNAPSHOT&#60;/version&#62;
    &#60;/dependency&#62;
    &#60;dependency&#62;
      &#60;groupId&#62;test&#60;/groupId&#62;
      &#60;artifactId&#62;hello-enterprise-web&#60;/artifactId&#62;
      &#60;version&#62;1.0-SNAPSHOT&#60;/version&#62;
      &#60;type&#62;war&#60;/type&#62;
    &#60;/dependency&#62;

  &#60;/dependencies&#62;
  &#60;build&#62;
    &#60;plugins&#62;
      &#60;plugin&#62;
        &#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;
        &#60;artifactId&#62;maven-ear-plugin&#60;/artifactId&#62;
        &#60;version&#62;2.3.2&#60;/version&#62;
        &#60;!-- configuring the ear plugin --&#62;
        &#60;configuration&#62;
          &#60;modules&#62;
            &#60;webModule&#62;
              &#60;groupId&#62;test&#60;/groupId&#62;
              &#60;artifactId&#62;hello-enterprise-web&#60;/artifactId&#62;
            &#60;/webModule&#62;
          &#60;/modules&#62;
        &#60;/configuration&#62;
      &#60;/plugin&#62;
    &#60;/plugins&#62;
  &#60;/build&#62;
&#60;/project&#62;
</pre>
<p>Save and exit. Return to the hello-enterprise (parent) directory and run the following command:</p>
<h3>Start the build process</h3>
<p>mvn package</p>
<p>You will see a bunch of stuff happen and at the end you will see the following results.</p>
<pre class="brush: bash;">
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] hello-enterprise ...................................... SUCCESS [1.194s]
[INFO] hello-enterprise-model ................................ SUCCESS [0.938s]
[INFO] springmvc-quickstart Maven Webapp ..................... SUCCESS [1.078s]
[INFO] hello-enterprise-ear .................................. SUCCESS [0.647s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
</pre>
<p>At this time you can open the ear project&#8217;s target folder and you will see the newly created ear.</p>
<h3>Deploy The Ear file</h3>
<p>Deploy the Ear to your Application server and do an application checkout.</p>
<h3>That&#8217;s All</h3>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:3979px;width:1px;height:1px;">[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] Reactor Summary:<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] hello-enterprise &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. SUCCESS [1.194s]<br />
[INFO] hello-enterprise-model &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. SUCCESS [0.938s]<br />
[INFO] springmvc-quickstart Maven Webapp &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; SUCCESS [1.078s]<br />
[INFO] hello-enterprise-ear &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. SUCCESS [0.647s]<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] BUILD SUCCESSFUL<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Spring MVC application using Archetypes]]></title>
<link>http://numberformat.wordpress.com/2009/11/22/spring-mvc-application-using-archetypes/</link>
<pubDate>Mon, 23 Nov 2009 00:38:00 +0000</pubDate>
<dc:creator>numberformat</dc:creator>
<guid>http://numberformat.wordpress.com/2009/11/22/spring-mvc-application-using-archetypes/</guid>
<description><![CDATA[The following page describes the process of creating a simple spring MVC application using an archet]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The following page describes the process of creating a simple spring MVC application using an archetype. The archetype was created my me for testing purposes. All it does is print a simple message to the browser when you navigate to the application.</p>
<h3>Requirements</h3>
<p><a href="http://wp.me/pvUBW-ev" target="_blank">Maven</a></p>
<p>Access to the command prompt</p>
<p>The Maven page above talks about eclipse you don&#8217;t need eclipse to install and run the simple springMVC application described here.</p>
<h3>Creating the Project</h3>
<p>Execute the following archetype to create the spring MVC application</p>
<pre class="brush: bash;">
mvn archetype:generate -DarchetypeGroupId=com.vermatech \
-DarchetypeArtifactId=springmvc-archetype -DarchetypeVersion=1.0-SNAPSHOT \
-DarchetypeRepository=http://www.vermatech.com/m2repo
</pre>
<p>Answer some simple questions:</p>
<pre class="brush: bash;">
Define value for groupId: : com.test2
Define value for artifactId: : vtSpringTest
Define value for version:  1.0-SNAPSHOT: :
Define value for package:  com.test2: :
Confirm properties configuration:
groupId: com.test2
artifactId: vtSpringTest
version: 1.0-SNAPSHOT
package: com.test2
 Y: :
</pre>
<h3>Running the Application in Jetty</h3>
<p>Execute the following in the project&#8217;s folder.</p>
<pre class="brush: bash;">
mvn jetty:run
</pre>
<p>Navigate to the following url http://localhost:8080/ and you should see a Welcome page come up.</p>
<h3>Thats All!</h3>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to get into maven for the first time]]></title>
<link>http://elespaciodejaime.wordpress.com/2009/11/22/how-to-get-into-maven-for-the-first-time/</link>
<pubDate>Sun, 22 Nov 2009 20:18:39 +0000</pubDate>
<dc:creator>elespaciodejaime</dc:creator>
<guid>http://elespaciodejaime.wordpress.com/2009/11/22/how-to-get-into-maven-for-the-first-time/</guid>
<description><![CDATA[Well, I use maven to organize and automatically download project dependencies, basically open source]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Well, I use maven to organize and automatically download project dependencies, basically open source libraries.</p>
<p>With maven you can get a dependency graph like this one(actually generated by eclipse maven plugin):</p>
<p><a href="http://elespaciodejaime.wordpress.com/files/2009/11/maven_dependency_graph.png"><img class="aligncenter size-full wp-image-210" title="Maven dependency graph" src="http://elespaciodejaime.wordpress.com/files/2009/11/maven_dependency_graph.png" alt="" width="545" height="434" /></a></p>
<p>where your project is the top one.<br />
The best way to grasp easily what maven is, from my point of view is:</p>
<p>To read:</p>
<p><a href="http://maven.apache.org/what-is-maven.html" target="_blank">http://maven.apache.org/what-is-maven.html</a></p>
<p>Download maven:</p>
<p><a href="http://maven.apache.org/download.html" target="_blank">http://maven.apache.org/download.html</a></p>
<p>Uncompress it somewhere in the hard disk, create the enviroment variable home M2_HOME to the uncompressed folder.<br />
It is okay to place M2_HOME/bin in the path to use the maven executable (mvn.bat or mvn.sh)</p>
<p>Then integrate it with eclipse or netbeans to actually see how the IDE&#8217;s download automatically all project dependencies:</p>
<p>For eclipse galileo, for example:</p>
<p>Install the maven eclipse plugin, from here:</p>
<p><a href="http://m2eclipse.sonatype.org/" target="_blank">http://m2eclipse.sonatype.org/</a></p>
<p>(there is an update site for eclipse)</p>
<p>Then add this:</p>
<p>-vm<br />
/usr/java/your_jdk_folder/bin/java</p>
<p>to eclipse.ini for some reason I don&#8217;t understand</p>
<p>THen go to: Window &#62; Preferences &#62; Maven &#62; Installations in eclipse and add your recently donwloaded and uncompressed maven installation, select it.</p>
<p>Then you can File &#62; Import &#62; Maven Project and point it to this sample project (with some example dependencies):</p>
<p>http://www.2shared.com/file/9360954/c26ff629/admision.html (download and extract)</p>
<p>Then, you&#8217;ll see how eclipse(maven in the background) automatically download the project dependencies under the &#8220;Maven dependencies&#8221; category that you can check directly in the pom.xml (the file that actually defines a maven project).</p>
<p>For a general view about the maven repositories, this is how a maven repository looks:</p>
<p><a href="http://hl7api.sourceforge.net/m2/" target="_blank">http://hl7api.sourceforge.net/m2/</a></p>
<p>And you can check your own maven local repository at&#62; $home/.m2/repository, in windows c:/Documents and Settings/User/.m2/repository.</p>
<p>Well, I have just a few months with maven, and I&#8217;m realizing it is more than a management/build manager, it is fully extensible with your own plugins, allowing you to do almost anything with/from your project sources.</p>
<p>Furthermore, migrating an eclipse/netbeans/etc native project to maven is not too hard, it is usually no more than create a pom.xml file, place there your own project dependencies and move your sources to /maven_project/src/main/java, the resources (log4j.properties, etc) to /maven_project/src/main/resources and unit tests to /maven_project/src/test/java.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[First Look at Vaadin]]></title>
<link>http://devblog.point2.com/2009/11/22/first-look-at-vaadin/</link>
<pubDate>Sun, 22 Nov 2009 16:50:49 +0000</pubDate>
<dc:creator>Mike Nash</dc:creator>
<guid>http://devblog.point2.com/2009/11/22/first-look-at-vaadin/</guid>
<description><![CDATA[I&#8217;ve had the chance over a recent weekend to have a first crack at a web framework called Vaad]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve had the chance over a recent weekend to have a first crack at a web framework called <a href="http://vaadin.com">Vaadin</a>.</p>
<p>I was originally browsing for news about the latest release of Google&#8217;s <a href="http://code.google.com/webtoolkit/">GWT</a> framework when I stumbled on a reference to Vaadin, and decided to go take a look. What I found intrigued me, and I decided to take it for a test drive, as I was down sick for a couple of days with a laptop nearby&#8230;. My back became annoyed with me, but it was worth it, I think.</p>
<p><b>First Look</b><br />
First off, the practicalities: Vaadin is open source, and with a reasonable <a href="http://vaadin.com/license">license</a>, the Apache License. The essential bits of Vaadin are contained in a single JAR, and it&#8217;s both Ant and Maven friendly right out of the box. </p>
<p>The next thing that struck me about Vaadin was the documentation. The first unusual thing about it&#8217;s documentation was the fact of it&#8217;s existence, as open source projects are downright notorious for poor documentation. Vaadin is a pleasant exception, with tons of examples, a well-organized <a href="http://vaadin.com/api/">API doc</a>, in the usual JavaDoc format, and even the &#8220;Book of Vaadin&#8221;, <a href="http://vaadin.com/book">an entire PDF book</a> (also available in hardcopy) that takes you through Vaadin in enough detail to be immediately productive.</p>
<p>Given that surprisingly pleasant start, I dug deeper, creating a little app of my own. </p>
<p><b>Just the Java, Ma&#8217;am</b><br />
The main thing that kept me interested in Vaadin once I started digging further was that it&#8217;s pure Java. Many frameworks talk about writing your UI work in Java, such as Wicket, but there&#8217;s still a corresponding template and some wiring that happens to put the code and the template together. Not so with Vaadin.</p>
<p>When they say &#8220;just Java&#8221;, they mean it &#8211; your entire UI layer is coded in Java, plain and simple. No templates, no tag libraries, no Javascript, no &#8216;nuthin. It&#8217;s reminiscent of the <a href="http://echo.nextapp.com/site/">Echo framework</a>, except in Vaadin&#8217;s case the Javascript library that your code automatically produces is Google&#8217;s GWT, instead of Echo&#8217;s own Core.JS library.</p>
<p>Unlike GWT, though, the Vaadin approach doesn&#8217;t bind you to any specific source code though, it&#8217;s just a binary jar you put on your classpath. </p>
<p>The <b>only</b> thing in my sample app, other than 2 Java files, was a web.xml and a css stylesheet, both of which were only a few lines long. And this was no &#8220;Hello, World&#8221;, either, but a rich AJAX webapp with a tree menu, fancy non-modal &#8220;fading&#8221; notifications, images, complex layouts, and a form with build-in validation. And it took maybe 4 hours of total work to produce &#8211; and that was from a standing start, as I&#8217;d never heard of Vaadin before last Thursday. Not bad, not bad at all.</p>
<p>I found I was able to get a very capable little webapp up and running with no need to invent my own components, even though I had trees and sliders and menus and other assorted goodies on the page. It worked in every browser I was able to try it in, which is certainly not the case for my own hand-rolled JavaScript most of the time <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I haven&#8217;t yet tried creating my own custom components, but it certainly looks straightforward enough.</p>
<p>I did try linking to external resources, and included non-Vaadin pages in my app, with no difficulties, so it appears that Vaadin plays well with others, and can be introduced into an existing project that uses, for instance, a whack of JSP&#8217;s that one might want to obsolete.</p>
<p><b>Webapps</b><br />
I think Vaadin warrants more exploration, and I intend to put it further through its paces in the next few weeks. It appears extremely well-suited to web applications, as opposed to websites with a tiny bit of dynamic stuff in them. </p>
<p>It offers an interesting alternative to some of the patterns I&#8217;ve seen for advanced dynamic webapp development so far. </p>
<p>One approach I&#8217;ve seen a lot is to divide the duties of creating an app into the &#8220;back end&#8221; services and the &#8220;UI&#8221;. Generally the UI is written in either JavaScript, or uses Flex or some other semi-proprietary approach. The &#8220;back end&#8221; stuff is frequently written to expose it&#8217;s services as REST, then the two are bolted together. The pain point here happens when the two meet, as it&#8217;s common and easy to have minor (or major!) misunderstandings between the two teams. This usually results in a lot of to-and-fro to work out the differences before the app comes all the way to life.</p>
<p>The other approach, more common on smaller or resource-strapped teams, is to have the same group responsible for both UI and back-end services. This reduces the thrash in the joints a bit, but doesn&#8217;t eliminate it, because the two technologies on the two sides of the app aren&#8217;t the same. You can&#8217;t test JavaScript the same way you write Java, for instance, and they&#8217;re two different languages &#8211; one of which (Java) has far better tooling support than the other. IDE support, for instance, is superb for Java, and spotty at best for JavaScript.</p>
<p>With Vaadin, both of these approaches become unnecessary, as its the same technology all the way through (at least, what you write is &#8211; technically it&#8217;s still using JavaScript, but because that&#8217;s generated, I don&#8217;t count it).</p>
<p>You get to use all of the tools you know and love for the back-end services to write the code for the UI, which you can then unit and functional test to your heart&#8217;s content.</p>
<p>The temptation to mix concerns between UI code and back-end service code must still be resisted, of course, but at least that code isn&#8217;t buried somewhere in the middle of a JSP page, ready to leap out and bite you later.</p>
<p>Because you&#8217;re using dynamic layouts, the app always fits properly on the screen without any extra work, addressing a pet peeve of mine, the &#8220;skinny&#8221; webapp, restraining itself to the least common denominator of screen size, thus rendering impotent my nice wide monitors.</p>
<p><b>Scala</b><br />
Just because Vaadin is a Java library doesn&#8217;t restrict you to using Java to drive it, however. I made another little webapp where the whole UI was defined in Scala, calling the Vaadin APIs, and it worked like a charm. In some ways, Scala is an even better fit for Vaadin than straight Java, I suspect. I haven&#8217;t tried any other JVM compatible language, but I see no reason they wouldn&#8217;t work equally well.</p>
<p><b>Deployment and Development Cycle</b><br />
As I was building the app with Maven, I added a couple of lines to my POM and was able to say &#8220;mvn jetty:run&#8221; to get my Vaadin app up and running on my local box in a few seconds. My development cycle was only a few seconds between compile and interactive tests, as I was experimenting with the trial-and-error method. </p>
<p>TDD would be not only possible, but easy in this situation.</p>
<p>I successfully deployed my little Vaadin app to ServiceMix, my OSGi container of choice, without a hitch. </p>
<p>Performance appeared excellent overall, although I haven&#8217;t formally tested it with a load-testing tool (yet).</p>
<p><b>Summary</b><br />
So far, I&#8217;m impressed with Vaadin. I&#8217;m more impressed with any web framework I&#8217;ve worked with in a number of years, in fact. I&#8217;m sure there are some warts in there somewhere, but for the benefits it brings to the table, I suspect they&#8217;re easily worth it. I think the advantages to teams that already speak fluent Java is hard to overstate, and the productivity to produce good-looking and functioning webapps is quite remarkable.</p>
<p>Over the next few weeks I&#8217;ll push it a bit harder with a complex example application, and see how it stacks up against other web app technologies I&#8217;ve worked with in a more realistic scenario.</p>
<p>By: <a href="http://devblog.point2.com/author/michaelnash01/" target="_blank">Mike Nash</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Spring Roo: First Impressions]]></title>
<link>http://jcranky.wordpress.com/2009/11/21/spring-roo-first-impressions/</link>
<pubDate>Sat, 21 Nov 2009 18:31:29 +0000</pubDate>
<dc:creator>Paulo Renato</dc:creator>
<guid>http://jcranky.wordpress.com/2009/11/21/spring-roo-first-impressions/</guid>
<description><![CDATA[Two weeks ago I attended to the event The Developer&#8217;s Conference, down here in São Paulo, Braz]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Two weeks ago I attended to the event <a title="The Developer's Conference" href="http://www.thedevelopersconference.com.br/" target="_blank">The Developer&#8217;s Conference</a>, down here in São Paulo, Brazil. I covered it <a title="TDC Day 1" href="http://jcranky.com/2009/11/10/tdc-the-developers-conference-2009-day-1/" target="_blank">here</a> and <a title="TDC Day 2" href="http://jcranky.com/2009/11/12/tdc-the-developers-conference-2009-day-2/" target="_blank">here</a>. One topic I decided to cover separated is <a title="Spring Roo" href="http://www.springsource.org/roo" target="_blank">Spring Roo</a>. Rod Johnson, from <a title="SpringSource" href="http://www.springsource.org/" target="_blank">SpringSource</a> presented it in the conference, and really got my attention.</p>
<p>During the last few days I&#8217;ve being spending a few minutes per day with the tool. Following are an explanation about what it does, and my impressions in general. Hope you enjoy =)</p>
<p>The statement that describes better what Roo tries to do is &#8220;Roo is Rails for Java, but better&#8221;. Rod Johnson said something similar to this during his presentation in the TDC event, and I can agree with that. Rails productivity is nice, sure, but it doesn&#8217;t have the power of the Java platform. So bringing this productivity &#8220;home&#8221;, to Java, is an excelent idea.</p>
<p>To achieve this goal, Roo generates code for you. This isn&#8217;t, of course, a new idea. But the way Roo does it is what makes it really interesting. The concept is that you should be able to read and edit any code generated by the tool. Also, you should be able to use whatever IDE you prefer during development, without Roo getting in your way &#8211; I actually use Netbeans to edit the source code files, and although the IDE they officially support is Eclipse (the base for their <a title="Spring Tool Suite" href="http://www.springsource.com/products/sts" target="_blank">Spring Tool Suite</a>), it worked just fine.</p>
<p>The code generated by Roo has also desirable qualities: it follows good programming practices, like separation of concerns, and has good performance &#8211; there is no reflection in any of its &#8220;magic&#8221; to slow things down, for example.</p>
<p>This is how Roo looks like when running:</p>
<div id="attachment_476" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-476" title="Roo Shell" src="http://jcranky.wordpress.com/files/2009/11/roo-shell.png" alt="Roo Shell" width="450" height="335" /><p class="wp-caption-text">Roo Shell</p></div>
<p>This is the Roo shell. It is where you type commands and execute tasks when using the tool. It features TAB completion, which works very nicely, and a lot of development support &#8211; you can type <em>hint</em> anytime to get a help message. Also, you can type <em>help</em> to see full list of commands currently available.</p>
<p>We haven&#8217;t created a project yet, so <em>hint</em> shows this:</p>
<div id="attachment_477" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-477" title="Hint on an Empty Folder" src="http://jcranky.wordpress.com/files/2009/11/no-project-hint.png" alt="Hint on an Empty Folder" width="450" height="335" /><p class="wp-caption-text">Hint on an Empty Folder</p></div>
<p>Lets take a look at Roo in action. In the next screenshot, I&#8217;m using the command <em>project</em> to create a new project called <em>JCranky</em>:</p>
<div id="attachment_478" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-478" title="Project Creation" src="http://jcranky.wordpress.com/files/2009/11/project-creation.png" alt="Project Creation" width="450" height="335" /><p class="wp-caption-text">Project Creation</p></div>
<p>Notice the TAB completion working; also, notice how Roo tells you what it did to your files, so that you can keep an eye on his behavior <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I&#8217;m don&#8217;t intend to write a tutorial, so I&#8217;ll just show one more code generation example and go back to commenting. Lets install persistence support, and then create an entity. The command to do the former is <em>persistence setup</em> and for the later is <em>entity EntityName</em>. The next two screenshots ilustrates the result of these commands:</p>
<div id="attachment_479" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-479" title="Persistence Setup" src="http://jcranky.wordpress.com/files/2009/11/persistence-setup.png" alt="Persistence Setup" width="450" height="335" /><p class="wp-caption-text">Persistence Setup</p></div>
<div id="attachment_480" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-480" title="Entity Creation" src="http://jcranky.wordpress.com/files/2009/11/entity-creation.png" alt="Entity Creation" width="450" height="335" /><p class="wp-caption-text">Entity Creation</p></div>
<p>Again, notice how TAB completion helps us. We don&#8217;t have to remember all those commands. Just hit TAB and Roo tells you what commands are available. Notice on the entity creation that Roo created a few <em>.aj</em> files. This is one of its secrets: it uses Aspects to insert code into your class, making it more simpler during source editing time. So boilerplate code like <em>getters</em>, <em>setters</em> and <em>toString</em> are inserted automatically in your entities to you. To understand a little bit more about this, take a look at the <a title="Aspect J" href="http://www.eclipse.org/aspectj/" target="_blank">Aspect J site</a>.</p>
<p>I&#8217;m not a fan of Spring, which obviously is used a lot in Roo and in the generated sources. But this tool seems to work so nicely that it might make me change my mind. And the same thing goes for maven, which Roo uses in the generated sources. But in this case, Roo also allows you to replace maven if you want to &#8211; but in this case you will have to write your own plugin to do that, at least for now.</p>
<p>I&#8217;ll stop here, but if anyone asks for more I might feel like writing another post =D. But before closing, lets mention the only one thing I really hated about Roo: it seems to generate code with TABs instead of whitespaces. So, Roo developers, I beg you: please generate whitespaces! I know it is a small thing, but it really freaks me out&#8230;</p>
<p>For more information, besides the official site, these three blog posts are very interesting: <a title="Roo for Productivity" href="http://blog.springsource.com/2009/05/01/roo-part-1/" target="_blank">Jump into Roo for extreme Java Productivity</a>; <a title="Getting started with Spring Roo" href="http://blog.springsource.com/2009/05/27/roo-part-2/" target="_blank">Getting Started with Spring Roo</a> and <a title="Roo's Architecture" href="http://blog.springsource.com/2009/06/18/roo-part-3/" target="_blank">Exploring Roo&#8217;s Architecture</a>.</p>
<p>bye!</p>
<p>EDIT: After Ben Alex&#8217;s comment I looked again into the sources generated for my tests and couldn&#8217;t find any TABs. So please ignore this part of the post, until I find them again =D</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[OSGi &amp; Maven &amp; Eclipse]]></title>
<link>http://sinnema313.wordpress.com/2009/11/21/osgi-maven-eclipse/</link>
<pubDate>Sat, 21 Nov 2009 10:30:02 +0000</pubDate>
<dc:creator>sinnema313</dc:creator>
<guid>http://sinnema313.wordpress.com/2009/11/21/osgi-maven-eclipse/</guid>
<description><![CDATA[If you&#8217;re involved in a large software development effort in Java, then OSGi seems like a natu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you&#8217;re involved in a large software development effort in Java, then <a href="http://www.osgi.org/Main/HomePage">OSGi </a>seems like a natural fit to keep things <a href="http://techdistrict.kirkk.com/2009/08/05/modularity-patterns/">modular </a>and thus maintainable. But <a href="http://nl.wikipedia.org/wiki/Cruijffiaans">every advantage can also be seen as a disadvantage</a>: using OSGi you will end up with lots of small projects. Handling these and their interrelationships can be challenging.</p>
<p>Enter <a href="http://maven.apache.org/">Maven</a>. This build tool makes it a lot easier to build all these little (or not so little) projects. Which is a necessity, since a command line driven build tool is essential for doing <a href="http://en.wikipedia.org/wiki/Continuous_integration">Continuous Integration</a>. And we all practice that, right?</p>
<p>However, as a developer it&#8217;s a pain to keep switching between your favorite IDE and the command line. Not to worry, <a href="http://eclipse.org/">Eclipse </a>has plug-ins that handle just about any situation. Using <a href="http://m2eclipse.sonatype.org/">M2Eclipse</a>, you can maintain your <a href="http://maven.apache.org/pom.html#What_is_the_POM">POM</a> from within the IDE.</p>
<p>But an Eclipse Maven project is not an Eclipse OSGi project. For handling OSGi bundles, one would want to use the Eclipse <a href="http://www.eclipse.org/pde/">Plug-in Development Environment</a> (PDE) with all the goodies that brings to OSGi development. There is, however, a way to get the best of both worlds, although it still isn&#8217;t perfect, as we will see shortly.</p>
<p>The trick is to start with a PDE project:<br />
<a href="http://sinnema313.wordpress.com/files/2009/11/pde-1.jpg"><img src="http://sinnema313.wordpress.com/files/2009/11/pde-1.jpg" alt="" title="Create an Eclipse PDE project" width="470" height="470" class="alignnone size-full wp-image-891" /></a></p>
<p>Make sure to follow the Maven convention for sources and classes and to use plain OSGi (so you&#8217;re not tied to Eclipse/<a href="http://www.eclipse.org/equinox/">Equinox</a>):<br />
<a href="http://sinnema313.wordpress.com/files/2009/11/pde-2.jpg"><img src="http://sinnema313.wordpress.com/files/2009/11/pde-2.jpg" alt="" title="Make sure to follow the Maven conventions" width="470" height="560" class="alignnone size-full wp-image-892" /></a></p>
<p><a href="http://sinnema313.wordpress.com/files/2009/11/pde-3.jpg"><img src="http://sinnema313.wordpress.com/files/2009/11/pde-3.jpg" alt="" title="Identify your OSGi bundle" width="470" height="560" class="alignnone size-full wp-image-893" /></a></p>
<p>Once you&#8217;ve created the project, you can add Maven support:<br />
<a href="http://sinnema313.wordpress.com/files/2009/11/mvn-1.png"><img src="http://sinnema313.wordpress.com/files/2009/11/mvn-1.png" alt="" title="Add support for Maven to your Eclipse project" width="470" height="596" class="alignnone size-full wp-image-889" /></a></p>
<p>Make sure to use the same identification for Maven as for PDE:<br />
<a href="http://sinnema313.wordpress.com/files/2009/11/mvn-2.jpg"><img src="http://sinnema313.wordpress.com/files/2009/11/mvn-2.jpg" alt="" title="Make sure to use the same identification for Maven as for PDE" width="438" height="408" class="alignnone size-full wp-image-890" /></a></p>
<p>Now you have an Eclipse project that plays nice with both PDE (and thus OSGi) and Maven. The only downside to this solution is that some information, like the bundle ID, is duplicated.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Plugins adicionais p/ Eclipse 3.5]]></title>
<link>http://matcouto.wordpress.com/2009/11/20/plugins-eclipse35/</link>
<pubDate>Fri, 20 Nov 2009 23:31:15 +0000</pubDate>
<dc:creator>matcouto</dc:creator>
<guid>http://matcouto.wordpress.com/2009/11/20/plugins-eclipse35/</guid>
<description><![CDATA[Segue abaixo as urls de alguns plugins que costumo instalar no eclipse: http://download.jboss.org/jb]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Segue abaixo as urls de alguns plugins que costumo instalar no eclipse:</p>
<p><span style="font-family:verdana;color:blue;font-size:10pt;"><br />
http://download.jboss.org/jbosstools/updates/development/<br />
http://m2eclipse.sonatype.org/update/<br />
http://subclipse.tigris.org/update_1.6.x<br />
</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Better Builds With Maven]]></title>
<link>http://toebook.wordpress.com/2009/11/20/better-builds-with-maven/</link>
<pubDate>Fri, 20 Nov 2009 11:15:00 +0000</pubDate>
<dc:creator>cnapagoda</dc:creator>
<guid>http://toebook.wordpress.com/2009/11/20/better-builds-with-maven/</guid>
<description><![CDATA[Welcome to Better Builds with Maven, an indispensable guide to understand and use Maven 2.0.Maven 2 ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div style="text-align:justify;"><a href="http://i50.tinypic.com/2dtr89g.jpg"><img src="http://i50.tinypic.com/2dtr89g.jpg" alt="" border="0" /></a>Welcome to Better Builds with Maven, an indispensable guide to understand and use Maven 2.0.<br />Maven 2 is a product that offers immediate value to many users and organizations. As you will soon find, it does not take long to realize these benefits. Perhaps, reading this book will take you longer. Maven works equally well for small and large projects, but Maven shines in helping teams operate more effectively by allowing team members to focus on what the stakeholders of a project require &#8212; leaving the build infrastructure to Maven!</p>
<div style="text-align:center;"><span style="font-weight:bold;">2Mb</span></div>
<p>
<div style="text-align:center;"><a href="http://rapidshare.com/files/308728551/BetterBuildsWithMaven.pdf"><span style="font-weight:bold;">Download</span></a></div>
</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Maven: The Definitive Guide]]></title>
<link>http://toebook.wordpress.com/2009/11/20/maven-the-definitive-guide/</link>
<pubDate>Fri, 20 Nov 2009 11:10:00 +0000</pubDate>
<dc:creator>cnapagoda</dc:creator>
<guid>http://toebook.wordpress.com/2009/11/20/maven-the-definitive-guide/</guid>
<description><![CDATA[For too long, developers have worked on disorganized application projects, where every part seemed t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://i47.tinypic.com/68a0ix.jpg"><img src="http://i47.tinypic.com/68a0ix.jpg" alt="" border="0" /></a></p>
<p>For too long, developers have worked on disorganized application projects, where every part seemed to have its own build system, and no common repository existed for information about the state of the project. Now there&#8217;s help. The long-awaited official documentation to Maven is here.</p>
<div style="text-align:center;"><span style="font-weight:bold;">O&#8217;Reilly Media &#124; </span><b>ISBN-10:</b><span style="font-weight:bold;"> 0596517335 &#124; </span><span style="font-weight:bold;" class="">452 pages</span><span style="font-weight:bold;"> &#124; Size: 8.5Mb</span></p>
<p><a style="color:rgb(0,0,153);" href="http://rapidshare.com/files/307652312/Maven_Definitive_Guide.pdf"><span style="font-weight:bold;">Download</span></a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Invalid target release: 1.6 ]]></title>
<link>http://one1day.wordpress.com/2009/11/19/invalid-target-release-1-6/</link>
<pubDate>Thu, 19 Nov 2009 07:11:01 +0000</pubDate>
<dc:creator>kimgumshek</dc:creator>
<guid>http://one1day.wordpress.com/2009/11/19/invalid-target-release-1-6/</guid>
<description><![CDATA[หลังจากพยายามที่จะสร้าง Project ด้วย Maven ดูก็พบว่า มัน fail ขึ้น error Invalid target release : 1.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>หลังจากพยายามที่จะสร้าง Project ด้วย Maven ดูก็พบว่า มัน fail ขึ้น error Invalid target release : 1.6</p>
<p>เราก็เลยไปเปลี่ยน Path ให้ชี้ไปที่ JAVA6_HOME/bin แล้วก็ลอง run ดูใหม้่แต่ก็ยังติดปัญหาเดิมอยู่\</p>
<p>[INFO] ————————————————————————<br />
[ERROR] BUILD FAILURE<br />
[INFO] ————————————————————————<br />
[INFO] Compilation failure<br />
Failure executing javac, but could not parse the error:<br />
javac: invalid target release: 1.6<br />
Usage: javac</p>
<p>ทำไงดีหละ &#8230;&#8230;..</p>
<p>ลองหาดูใน Google จึงได้รู้ว่า Maven จะดูที JAVA_HOME ไม่ใช่ PATH หลังจากนั้นจึงเปลี่ยน JAVA_HOME ให้เป็น Version 6 ก็จะได้แล้วจ้า</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Check out a Maven Project from SVN in Eclipse]]></title>
<link>http://ykyuen.wordpress.com/2009/11/19/check-out-a-maven-project-from-svn-in-eclipse/</link>
<pubDate>Thu, 19 Nov 2009 01:23:31 +0000</pubDate>
<dc:creator>ykyuen</dc:creator>
<guid>http://ykyuen.wordpress.com/2009/11/19/check-out-a-maven-project-from-svn-in-eclipse/</guid>
<description><![CDATA[We did talk about how to use Maven in Eclipse. So let&#8217;s move on to see how to integrate SVN an]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>We did talk about how to use <font color="#003399">Maven</font> in <font color="#003399">Eclipse</font>. So let&#8217;s move on to see how to integrate <font color="#003399">SVN</font> and <font color="#003399">Maven</font> in <font color="#003399">Eclipse</font>.</p>
<p>For a simple <font color="#003399">Java</font> project, only the <font color="#FF00FF">/src</font> folder and the <font color="#FF00FF">pom.xml</font> are needed to be stored in <font color="#FF00FF">SVN repository</font>. if you like to do development without the IDE. u can just check out the project to the file system of a computer with <font color="#003399">Maven</font> installed and run the <font color="#003399">Maven</font> commands in <strong>command prompt/terminal</strong>.</p>
<p>For <font color="#003399">Eclipse user</font>, assume we have already import them in the <font color="#003399">SVN repository</font>. How could we check out them in <font color="#003399">Eclipse</font> such that developers can run the project immediately after check out? </p>
<p><font color="#996633">Pre-requisites<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
1. Eclipse with subclipse and m2clipse installed<br />
2. Maven installed</font></p>
<hr />
<p><strong>Check out the Maven Project in Eclipse<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</strong><br />
1. An optional plugin <font color="#0000FF">Maven SCM handler for Subclipse</font> is needed for <font color="#003399">Eclipse</font>.<br />
<a href="http://ykyuen.wordpress.com/files/2009/11/m2eclipse-and-subckipse.png"><img src="http://ykyuen.wordpress.com/files/2009/11/m2eclipse-and-subckipse.png" alt="" title="m2eclipse and subckipse" width="550" height="373" class="alignleft size-full wp-image-753" /></a></p>
<p>2. Open the <font color="#003399">SVN Repository View</font> in <font color="#003399">Eclipse</font></p>
<p>3. Connected to your <font color="#003399">SVN repositoy</font></p>
<p>4. Selected the <font color="#003399">Maven Project</font> and choose <font color="#FF0000">Check out as Maven Project&#8230;</font><br />
<a href="http://ykyuen.wordpress.com/files/2009/11/check-out-as-maven-project.png"><img src="http://ykyuen.wordpress.com/files/2009/11/check-out-as-maven-project.png" alt="" title="Check out as Maven Project" width="383" height="520" class="alignleft size-full wp-image-754" /></a><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
</br><br />
5. After check out, you may need to configure the project build path to your desired <font color="#33FF33">JDK</font> instead of the <font color="#003399">Eclipse</font> default <font color="#33FF33">JRE</font>.</p>
<p>6. <font color="#FF0000">mvn build/install</font> the project once. Then open the <font color="#003399">Team Synchronizing</font> perspective and add all those <font color="#003399">Eclipse</font> related files such as <font color="#FF00FF">.settings</font> and the <font color="#003399">Maven</font> created folders like <font color="#FF00FF">/target</font> to <font color="#003399">SVN ignore</font>.</p>
<p>Done =)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Moving configuration into its own module]]></title>
<link>http://lumpynose.wordpress.com/2009/11/18/moving-configuration-into-its-own-module/</link>
<pubDate>Wed, 18 Nov 2009 20:19:28 +0000</pubDate>
<dc:creator>Rusty Wright</dc:creator>
<guid>http://lumpynose.wordpress.com/2009/11/18/moving-configuration-into-its-own-module/</guid>
<description><![CDATA[For a long time the java classpath was something I only sort of understood. I think I’m finally gett]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For a long time the java classpath was something I only sort of understood. I think I’m finally getting a handle on it.</p>
<p>What is (or was) also confusing for me is how the classpath is managed with tomcat (or any other servlet container, but I’ve only used tomcat). When you look at the directories and files for a web application with tomcat you can probably figure it out; under WEB-INF are two directories, lib and classes. lib contains a bunch of jars, and classes containes your compiled java code.</p>
<p>You often hear that something needs to “be on the classpath.” The tomcat WEB-INF/classes directory is on the classpath. So if you have any configuration files that need to be on the classpath, you can put them in the classes directory. For example, your log4j configuration file log4j.xml, or, in my case, since I use logback, logback.xml goes in the classes directory. If you’re using spring, this is where you can put your applicationContext.xml file, and then in your web.xml you’d use</p>
<pre class="brush: xml;">
&#60;listener&#62;
    &#60;listener-class&#62;
        org.springframework.web.context.ContextLoaderListener
    &#60;/listener-class&#62;
&#60;/listener&#62;

&#60;context-param&#62;
    &#60;param-name&#62;
        contextConfigLocation
    &#60;/param-name&#62;

    &#60;param-value&#62;
        classpath:spring/applicationContext.xml,
    &#60;/param-value&#62;
&#60;/context-param&#62;
</pre>
<p>I&#8217;ve created a subdirectory, spring, and put my spring configuration files in that.</p>
<p>When you use maven, it has this really convenient directory structure; first there is the src directory, and then in it is the directory main, then in main are two directories java and resources. In the java directory you put your java source code. The resources directory is where you put your configuration files. If you’re making a web application, when maven makes the war file it puts everything that was in the resources directory in the war’s WEB-INF/classes directory. Viola, your configuration files are “on the classpath.”</p>
<p>(I have a spring directory in the resources directory, src/main/resources/spring, and in it are all of my spring configuration files.  That&#8217;s why there&#8217;s spring/ in front of the applicationContext.xml above.)</p>
<p>Here’s a diagram of a web application I’m working on, which is divided into several maven modules, and with arrows showing their dependencies.</p>
<p><img src="http://lumpynose.wordpress.com/files/2009/11/dependency_diagram.png?w=498" alt="" /></p>
<p>The webapp module will be the controllers or action beans. It depends on the service module, which contains the business logic, which depends on the persistence module. Everyone depends on the api module; that&#8217;s where the interfaces are declared, and the service and persistence modules implement the interfaces. The model module is what I think of as the data transfer objects, or the domain objects; more or less dumb data POJOs with getters and setters. The classes in it are annotated with JDO persistence stuff.</p>
<p>So what&#8217;s the config module? Up above, when I was talking about tomcat and its classpath you may have noticed that I skipped over explaining its lib directory. Intuitively, all of the jars in the lib directory are on the classpath. But a better way of thinking about it is that <em>the contents of the jars</em> are on the classpath. Perhaps just then a lightbulb lit up over your head and you realized that you could put configuration files in a jar file and then put that jar file in the lib directory. Now we&#8217;re really talking <em>viola</em>! This next diagram is a tree listing of the config maven project. </p>
<pre>
&#124;   pom.xml
&#124;
+---src
&#124;   +---main
&#124;   &#124;   \---resources
&#124;   &#124;       &#124;   logback.xml
&#124;   &#124;       &#124;
&#124;   &#124;       +---META-INF
&#124;   &#124;       &#124;       jdoconfig.xml
&#124;   &#124;       &#124;
&#124;   &#124;       \---spring
&#124;   &#124;               applicationContext.xml
&#124;   &#124;               jdo-gae-context.xml
&#124;   &#124;               jdo-hsql-context.xml
&#124;   &#124;               jdo-tx-context.xml
&#124;   &#124;
\---target
    &#124;   waitlist-config-0.0.1-SNAPSHOT.jar
    &#124;
    +---classes
    &#124;   &#124;   logback.xml
    &#124;   &#124;
    &#124;   +---META-INF
    &#124;   &#124;       jdoconfig.xml
    &#124;   &#124;
    &#124;   \---spring
    &#124;           applicationContext.xml
    &#124;           jdo-gae-context.xml
    &#124;           jdo-hsql-context.xml
    &#124;           jdo-tx-context.xml
</pre>
<p>Besides the pom.xml, the only thing it contains is the src/main/resources directory, where we put our configuration files. The target directory is created by maven when we do a build, compile, package, etc. And in it you can see that maven created a classes directory and copied everything from the resources directory into it. And here&#8217;s what the jar file looks like: </p>
<p><img src="http://lumpynose.wordpress.com/files/2009/11/snap1.gif?w=565" alt="" /></p>
<p>So now we have our configuration files neatly packaged, and our various maven modules can each depend on that, and no need to duplicate configuration files across your maven modules. In case you&#8217;re wondering why the light blue arrow is showing a dependency from the model module to the config module, that&#8217;s because sometimes I&#8217;ll add logging calls to the model and then it will need the logback.xml configuration file.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
