<?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://wordpress.com/tag/maven/</link>
	<description>Feed of posts on WordPress.com tagged "maven"</description>
	<pubDate>Wed, 08 Oct 2008 10:12:27 +0000</pubDate>

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

<item>
<title><![CDATA[Maven Site Deployment inside Hudson]]></title>
<link>http://debalex.wordpress.com/?p=28</link>
<pubDate>Tue, 07 Oct 2008 10:13:18 +0000</pubDate>
<dc:creator>alexyeo</dc:creator>
<guid>http://debalex.pl.wordpress.com/2008/10/07/maven-site-deployment-inside-hudson/</guid>
<description><![CDATA[The trouble I had was with Maven-2.0.9 running inside Hudson (v1.255). To be sure, Hudson is running]]></description>
<content:encoded><![CDATA[<p>The trouble I had was with <a href="http://maven.apache.org/">Maven-2.0.9</a> running inside <a href="https://hudson.dev.java.net/">Hudson</a> (v1.255). To be sure, Hudson is running within tomcat-6.0.18 inside Ubuntu 8.04 Server.</p>
<p>(What follows assumes a certain level of understanding for Maven <strong>AND </strong>Hudson...AND what I learnt to get <em>site-deploy</em> goal a going within Hudson!)</p>
<p>The project had a goal - <em>site-deploy</em> that I wanted to execute within Hudson. Within my <em>pom.xml</em>, I had the following:</p>
<pre>    &#60;distributionManagement&#62;
     &#60;site&#62;
       &#60;id&#62;remoteserver&#60;/id&#62;
       &#60;url&#62;scp://some.server/var/www/maven/site&#60;/url&#62;
     &#60;/site&#62;
   &#60;/distributionManagement&#62;</pre>
<p>In order to make the scp work, you need the following in your <em>USER_HOME/.m2/settings.xml</em>:</p>
<pre>    &#60;servers&#62;
      &#60;server&#62;
         &#60;id&#62;remoteserver&#60;/id&#62;
         &#60;username&#62;whatuser&#60;/username&#62;
         &#60;password&#62;whatuser&#60;/password&#62;
         &#60;filePermissions&#62;664&#60;/filePermissions&#62;
         &#60;directoryPermissions&#62;775&#60;/directoryPermissions&#62;
      &#60;/server&#62;
    &#60;/servers&#62;</pre>
<p>Let's assume you have completed the multi-step task of creating a new job within Hudson and it executes your <em>site-deploy</em> goal. Just when you thought it was safe to enter the water...WHAM!!!...you get hit with the error:</p>
<pre>[INFO] [site:deploy]scp://remoteserver/var/www/maven/site/your.project - Session: Disconnecting
        scp://remoteserver/var/www/maven/site/your.project - Session: Disconnected
[HUDSON] Archiving /whatever...project...path/pom.xml to /whatever...project...path/builds/2008-10-07_16-01-29/whatever.../pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error uploading site
Embedded error: The host was not known and was not accepted by the configuration: remoteserver
reject HostKey: remoteserver</pre>
<p>Try as I might to overcome this, I couldn't...at least not within Hudson! At least for my configuration, when Hudson executed my Maven2 projects, it will run as <em>root</em> (you can tell 'cuz the Maven repository is stored in /root/.m2/repository). So do this:</p>
<pre>whatuser@remoteserver:~$ sudo -i</pre>
<pre>root@remoteserver:~$ cd /path/to/mvn/project</pre>
<pre>root@remoteserver:/path/to/mvn/project$ mvn clean site-deploy</pre>
<p>Accept the authentication and wait for the build to complete and deploy. If you are to run Hudson now, it will work.</p>
<p>Huh? What happened? The reason can be found <a href="http://jira.codehaus.org/browse/CONTINUUM-1733">here</a>. In other words, Hudson could not deploy because it could not authenticate and accept the remote connection!</p>
<p>Well, I hope the above helps save some hours for those in the similar predicament!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Using Quartz with Maven2]]></title>
<link>http://sqllyw.wordpress.com/2008/10/07/using-quartz-with-maven2/</link>
<pubDate>Tue, 07 Oct 2008 08:16:30 +0000</pubDate>
<dc:creator>sqllyw</dc:creator>
<guid>http://sqllyw.pl.wordpress.com/2008/10/07/using-quartz-with-maven2/</guid>
<description><![CDATA[A small tutorial on using Quartz with Maven 2


I will assume you have finished reading Using Maven ]]></description>
<content:encoded><![CDATA[<p>A small tutorial on using Quartz with Maven 2</p>
<p><!--more--></p>
<p>
I will assume you have finished reading <a href="http://sqllyw.wordpress.com/2008/03/28/using-maven-2-to-create-a-project/">Using Maven 2 to create a project</a> and <a href="http://sqllyw.wordpress.com/2008/03/29/maven-project-directory-layout-logging/">Maven project directory layout, logging</a>.
</p>
<p>
	To be continued...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[hat of the day: 3]]></title>
<link>http://terrygraziano.wordpress.com/?p=288</link>
<pubDate>Mon, 06 Oct 2008 17:50:48 +0000</pubDate>
<dc:creator>Terry Graziano</dc:creator>
<guid>http://terrygraziano.pl.wordpress.com/2008/10/06/hat-of-the-day-3/</guid>
<description><![CDATA[Happy Monday!  I hope you had a fantastic weekend.  I actually took a day off!  I relaxed, did so]]></description>
<content:encoded><![CDATA[<p style="text-align:center;">Happy Monday!  I hope you had a fantastic weekend.  I actually took a day off!  I relaxed, did some cooking, saw some <a href="http://www.socratessculpturepark.org/">art</a>, and generally had a good time.  Today, the sun rose again and thankfully, we're all still here.  Whew!  I have to admit that all this economic instability has got me spooked.  With everything crashing, I need a brim I can hide beneath, and a bright color to cheer me up.  With my brave face on, I present today's selection:</p>
[caption id="attachment_289" align="aligncenter" width="500" caption="Maven in magenta wool &#38; mohair"]<a href="http://terrygraziano.files.wordpress.com/2008/10/maven-magenta-1.jpg"><img class="size-large wp-image-289" title="maven-magenta-1" src="http://terrygraziano.wordpress.com/files/2008/10/maven-magenta-1.jpg?w=500" alt="Maven in magenta wool &#38; mohair" width="500" height="500" /></a>[/caption]
<p> </p>
[caption id="attachment_290" align="aligncenter" width="500" caption="Maven in magenta wool &#38; mohair"]<a href="http://terrygraziano.files.wordpress.com/2008/10/maven-magenta-2.jpg"><img class="size-large wp-image-290" title="maven-magenta-2" src="http://terrygraziano.wordpress.com/files/2008/10/maven-magenta-2.jpg?w=500" alt="Maven in magenta wool &#38; mohair" width="500" height="500" /></a>[/caption]
<p> </p>
[caption id="attachment_291" align="aligncenter" width="500" caption="Maven in magenta wool &#38; mohair"]<a href="http://terrygraziano.files.wordpress.com/2008/10/maven-magenta-3.jpg"><img class="size-large wp-image-291" title="maven-magenta-3" src="http://terrygraziano.wordpress.com/files/2008/10/maven-magenta-3.jpg?w=500" alt="Maven in magenta wool &#38; mohair" width="500" height="500" /></a>[/caption]
<p> </p>
[caption id="attachment_292" align="aligncenter" width="500" caption="Maven in magenta wool &#38; mohair"]<a href="http://terrygraziano.files.wordpress.com/2008/10/maven-magenta-4.jpg"><img class="size-large wp-image-292" title="maven-magenta-4" src="http://terrygraziano.wordpress.com/files/2008/10/maven-magenta-4.jpg?w=500" alt="Maven in magenta wool &#38; mohair" width="500" height="500" /></a>[/caption]
<p> </p>
[caption id="attachment_293" align="aligncenter" width="500" caption="Maven in magenta wool &#38; mohair"]<a href="http://terrygraziano.files.wordpress.com/2008/10/maven-magenta-5.jpg"><img class="size-large wp-image-293" title="maven-magenta-5" src="http://terrygraziano.wordpress.com/files/2008/10/maven-magenta-5.jpg?w=500" alt="Maven in magenta wool &#38; mohair" width="500" height="500" /></a>[/caption]
<p style="text-align:center;">available <a href="http://www.etsy.com/view_listing.php?listing_id=15942906">here</a> and <a href="http://www.terrygraziano.bigcartel.com/product/maven-magenta">here</a></p>
<p style="text-align:center;">Thanks for looking!  Take good care and I'll see you back here tomorrow.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[how 'bout a nice game of mvn+seam+jsf mit jboss?]]></title>
<link>http://brianin3d.wordpress.com/?p=196</link>
<pubDate>Mon, 06 Oct 2008 03:32:02 +0000</pubDate>
<dc:creator>brianin3d</dc:creator>
<guid>http://brianin3d.pl.wordpress.com/2008/10/06/how-bout-a-nice-game-of-mvnseamjsf-mit-jboss/</guid>
<description><![CDATA[I spent some time looking for a good recent archetype to do this that actually worked before giving ]]></description>
<content:encoded><![CDATA[<p>I spent some time looking for a good <b>recent</b> archetype to do this that actually worked before giving up and deciding to do it in 3 easy pieces as part of a multiproject.</p>
<p>Since I'm pretty gnu to seam/jsf, I decided to start with <a href="http://repository.jboss.org/maven2/org/jboss/seam/examples/jboss-seam-numberguess/2.1.0.CR1/jboss-seam-numberguess-2.1.0.CR1.ear">seam-numberguess-2.1.0.CR1.ear</a> and put it back together again.</p>
<p>Sadly, this process didn't result in a completely clean solution... in the end I couldn't quite get the ear plugin to do what I wanted and ended up overriding the application.xml, jboss-app.xml, jamming some stuff into a lib dir in the ear etc.. Hope to clean it up at some point.</p>
<p>Perhaps you can get <a href="http://software.softeu.cz/seam/">softeu</a> to work for you... for me it just blowed up in various interesting ways...</p>
<h2>multiproject</h2>
<pre>
groupId=jsf-in3
package=us.versus.them.demos.jsf.in3
version=1.0.0-SNAPSHOT
common="-DgroupId=${groupId} -DpackageName=${package} -Dversion=${version}"
webapp=-DarchetypeArtifactId=maven-archetype-webapp

mvn archetype:create ${common} -DartifactId=in3-project
cd in3-project
cat pom.xml &#124; sed 's,&#62;jar&#60;,&#62;pom&#60;,' &#62; fu
mv fu pom.xml
mvn archetype:create ${common} -DartifactId=in3-jar
mvn archetype:create ${common} ${webapp} -DartifactId=in3-war
mvn archetype:create ${common} ${webapp} -DartifactId=in3-ear
</pre>
<p>Unfortunately, there is a lot more junk that has to be done by hand... Stuff that is really pretty dumb.</p>
<h3>java 5, please</h3>
<pre>
    &#60;build&#62;
        &#60;pluginManagement&#62;
            &#60;plugins&#62;
                &#60;plugin&#62;
                    &#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;
                    &#60;artifactId&#62;maven-compiler-plugin&#60;/artifactId&#62;
                    &#60;configuration&#62;
                        &#60;source&#62;1.5&#60;/source&#62;
                        &#60;target&#62;1.5&#60;/target&#62;
                    &#60;/configuration&#62;
                &#60;/plugin&#62;
            &#60;/plugins&#62;
        &#60;/pluginManagement&#62;
    &#60;/build&#62;
</pre>
<h3>jboss repo</h3>
<pre>
    &#60;repositories&#62;
        &#60;repository&#62;
            &#60;id&#62;central&#60;/id&#62;
            &#60;name&#62;Maven Repository Switchboard&#60;/name&#62;
            &#60;layout&#62;default&#60;/layout&#62;
            &#60;url&#62;http://repo1.maven.org/maven2&#60;/url&#62;
            &#60;snapshots&#62;
                &#60;enabled&#62;false&#60;/enabled&#62;
            &#60;/snapshots&#62;
        &#60;/repository&#62;
        &#60;repository&#62;
            &#60;id&#62;jboss&#60;/id&#62;
            &#60;name&#62;JBoss Maven Repository&#60;/name&#62;
            &#60;layout&#62;default&#60;/layout&#62;
            &#60;url&#62;http://repository.jboss.org/maven2&#60;/url&#62;
            &#60;snapshots&#62;
                &#60;enabled&#62;false&#60;/enabled&#62;
            &#60;/snapshots&#62;
        &#60;/repository&#62;
    &#60;/repositories&#62;
</pre>
<h2>war: wtf is it good for?</h2>
<p>So I pulled the goodies out of the war and put them in their maven-ish spots:</p>
<pre>
.
&#124;-- pom.xml
`-- src
    `-- main
        &#124;-- resources
        &#124;   `-- messages.properties
        `-- webapp
            &#124;-- WEB-INF
            &#124;   &#124;-- components.xml
            &#124;   &#124;-- pages.xml
            &#124;   `-- web.xml
            &#124;-- cheat.jspx
            &#124;-- confirm.jspx
            &#124;-- giveup.jspx
            &#124;-- index.html
            &#124;-- index.jsp
            &#124;-- jboss-seam-numberguess.war
            &#124;-- lose.jspx
            &#124;-- niceforms.css
            &#124;-- niceforms.js
            &#124;-- numberGuess.jspx
            `-- win.jspx
</pre>
<p>there is a also a "images" directory under webapp I left out, cuz it's kinda boring. </p>
<p>This structures is a little lame, but I don't wanna change too much right now...</p>
<h3>war deps</h3>
<p>There are a two deps that I resolved to something like this:</p>
<pre>
  &#60;dependency&#62;
      &#60;groupId&#62;commons-beanutils&#60;/groupId&#62;
      &#60;artifactId&#62;commons-beanutils&#60;/artifactId&#62;
      &#60;version&#62;1.7.0&#60;/version&#62;
  &#60;/dependency&#62;
  &#60;dependency&#62;
      &#60;groupId&#62;jboss&#60;/groupId&#62;
      &#60;artifactId&#62;jboss-seam-ui&#60;/artifactId&#62;
      &#60;version&#62;2.0.0.BETA1&#60;/version&#62;
  &#60;/dependency&#62;
</pre>
<h2>jar it</h2>
<pre>
mkdir -p src/main/resources
touch src/main/resources/seam.properties
</pre>
<p><b><i>seam.properties has to end up in the root of the jar or seam will not work!!!! it will be broken!!! even though it is just a dumb empty properties file!!!! don't forget it!!!!</i></b></p>
<p>You will end up with a nasty bit like:</p>
<pre>
javax.servlet.ServletException: Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(selectGuessRadio).  Found null.
</pre>
<p>and even if you hack the jspx you will end up with something like:</p>
<pre>
javax.servlet.ServletException: /numberGuess.jspx(42,82) '#{numberGuess.currentGuess}' Target Unreachable, identifier 'numberGuess' resolved to null
</pre>
<p>And you may tear your hair out! And you may gnash your teeth! And when you find out the problem you may want to post it on your blog so noone else will have to suffer the same fate! I would imagine... ;-)</p>
<h2>jar it up some more</h2>
<pre>
mkdir -p src/main/java/org/jboss/seam/example/numberguess/
cp NumberGuess.java ${_}
</pre>
<p>I snagged mese'f a copy of <a href="http://www.java2s.com/Open-Source/Java-Document/JBoss/jboss-seam-2.1.0.A1/org/jboss/seam/example/numberguess/NumberGuess.java.htm">NumberGuess.java</a> </p>
<p>The biggest thing the tutorial left to the imagination was the imports:</p>
<pre>
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
</pre>
<p>Presumably in the interests of brevity...</p>
<h3>jar deps</h3>
<pre>
  &#60;dependency&#62;
      &#60;groupId&#62;jboss&#60;/groupId&#62;
      &#60;artifactId&#62;jboss-seam&#60;/artifactId&#62;
      &#60;version&#62;2.0.0.BETA1&#60;/version&#62;
  &#60;/dependency&#62;
</pre>
<h2>ear is totally wrong</h2>
<p>I dunno what else to say about it...  Ended up redoing the whole pom and even then it wasn't right. The jboss-app.xml was always empty, I couldn't get it to quit being dumb about being smart about ejbModules...</p>
<p>In the end, I clobbered the generated application.xml and  jboss-app.xml with the ones from the <a href="http://repository.jboss.org/maven2/org/jboss/seam/examples/jboss-seam-numberguess/2.1.0.CR1/jboss-seam-numberguess-2.1.0.CR1.ear">seam-numberguess-2.1.0.CR1.ear</a></p>
<pre>
cp pageflow.jpdl.xml cheat.jpdl.xml target/in3
cp jboss-app.xml application.xml target/in3/META-INF
jar cf in3.ear -C target/in3 .
mv in3.ear ${JBOSS_HOME}/server/default/deploy/
</pre>
<h2>final product</h2>
<p>As I said in the beginning this was not a 100% success, but it was a lot closer than when I started:</p>
<pre>
% wget <a href="http://brianin3d.googlepages.com/in3-project.tgz">http://brianin3d.googlepages.com/in3-project.tgz</a>
% tar xfz in3-project.tgz
% cd in3-project
# this assumes you have JBOSS_HOME defined...
% mvn package &#38;&#38;  ( cd in3-ear/ ;  ./bother.sh )
</pre>
<p>Hit <a href="http://localhost:8080/seam-ng-mvn">http://localhost:8080/seam-ng-mvn</a> to see it in action.</p>
<p>A rough start, but at least it's a start... :-D</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[The tests only run if...]]></title>
<link>http://ourcraft.wordpress.com/?p=850</link>
<pubDate>Fri, 03 Oct 2008 20:53:58 +0000</pubDate>
<dc:creator>danielmeyer</dc:creator>
<guid>http://ourcraft.pl.wordpress.com/2008/10/03/the-tests-only-run-if/</guid>
<description><![CDATA[When I did a Maven Install on my project, it didn&#8217;t run the tests.  (It had been doing this l]]></description>
<content:encoded><![CDATA[<p>When I did a Maven Install on my project, it didn't run the tests.  (It had been doing this lack-of-thing for several days, and I just thought it was some weird side effect of it being a Maven multimodule project.)</p>
<p>Well it turns out that in our setup Maven's using a surefire reports thing that only runs tests whose class names end in ...<em>Test</em>.  My classnames usually do, but for this multimodule example, they weren't really unit tests so I had called them BlahBlah<em>Example</em>.  (This worked fine to run them in Eclipse.)</p>
<p>So, I just renamed the classes to end in ...Test, and now my tests run when I Maven Install 'em.</p>
<p>(Thanks for the tip, Keith!)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Maven POM Chains]]></title>
<link>http://qiangli.wordpress.com/?p=28</link>
<pubDate>Thu, 02 Oct 2008 09:52:15 +0000</pubDate>
<dc:creator>qiangli</dc:creator>
<guid>http://qiangli.pl.wordpress.com/2008/10/02/maven-pom-chains/</guid>
<description><![CDATA[POM setting in Maven can be inherited from one parent project to many children projects. But all ele]]></description>
<content:encoded><![CDATA[<p>POM setting in Maven can be inherited from one parent project to many children projects. But all elements in the POM inherit chain should in Maven Repository. Only with this condition can success run the setting for grand child project with “maven test”.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[What I'm into right now ]]></title>
<link>http://stigl.wordpress.com/?p=83</link>
<pubDate>Tue, 30 Sep 2008 18:38:52 +0000</pubDate>
<dc:creator>stigl</dc:creator>
<guid>http://stigl.pl.wordpress.com/2008/09/30/what-im-into-right-now/</guid>
<description><![CDATA[I thought I&#8217;d post updates on what I&#8217;m interested in, to give a glimpse of what I&#8217;]]></description>
<content:encoded><![CDATA[<p>I thought I'd post updates on what I'm interested in, to give a glimpse of what I'm looking into and have moved away from. Perhaps I'll have enough data to create a graph someday :)</p>
<h2>Up and coming</h2>
<ul>
<li><a href="http://neo4j.org">Neo4J</a> - A graph store - no more ORMappings</li>
<li><a href="http://qi4j.org">Qi4J</a> - A composite development framework, a new way of writing Java applications, a way of life</li>
<li><a href="http://groovy.codehaus.org">Groovy</a> <a href="http://grails.org">GRAILS</a> - Excellent for prototyping Java stuff</li>
<li><a href="www.selenic.com/mercurial">Mercurial</a> - When thinking different, why not Version Control as well?</li>
<li><a href="https://appframework.dev.java.net/">Swing Appframework, </a><a href="http://java.sun.com/developer/technicalArticles/javase/java6u10/">Java6u10</a> - Propably the next big thing in Rich Internet Applications</li>
<li><a href="http://stigl.wordpress.com/graph-visualization-of-a-java-application/">Visualization of graphs</a> - Am looking for a nice, easy API for creating several hierarchical trees that I can drag and manipulate</li>
<li><a href="aws.amazon.com/ec2/">Amazon EC2</a> - Java enabled servers on demand!</li>
<li><a href="http://twitter.com/stig_lau">Twitter</a>, <a href="http://stigl.wordpress.com/">Blog</a>, <a href="irc://efnet/java.no">IRC</a> -New (and revisited) ways of communicating intra-project/company</li>
<li><a href="http://java.no">javaBin</a>, <a href="http://javazone.no">JavaZone</a> - Working with the JavaZone conference for a year was damn fun!<br />
<!--more--></li>
</ul>
<h2>Same old</h2>
<p><a href="https://wiki.bouvet.no">Knowledge Sharing, Wiki</a>, Ideas, Architecture, RFID, Sun Spot, Music, Topic Maps, Maven, Linux, OS X, Continous Integration, <a href="http://code.google.com/p/mockito">Mockito</a>, Testng, REST</p>
<h2>Moving away from</h2>
<p>Hibernate, Spring, Web, Integration, Grid Frameworks, Web Services, Windows</p>
<h2>Current projects</h2>
<ul>
<li>Music DJ program</li>
<li><a href="http://stigl.wordpress.com/mavenized-neo4j-example/">Neo4JDemo</a></li>
<li>AnarQi4JDemo - Qi4J</li>
<li>JavaZone RFID applications <img class="alignright" src="http://www4.java.no/web/image.do?orig_id=1095&#38;w=300" alt="JavaZone RFID Heltepils Duke" width="300" height="225" /></li>
</ul>
<h2>Closed projects</h2>
<ul>
<li>Web applications on demand - Gigaspaces , web apps</li>
<li>Kvittr - Grails, posting sms and emailing based on an RSS Feed</li>
<li><a href="http://code.google.com/p/ultimate-roundtrip/">Ultimate Roundtrip</a> - A scaffold for improving development roundtrip for web applications with Maven, embedded Jetty and JWebunit webtests</li>
<li><a href="http://code.google.com/p/webugger/">Webugger</a> - Embedding a Groovy console efor debugging web and applications with high roundtrip</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Mavenized Neo4J example]]></title>
<link>http://stigl.wordpress.com/?p=74</link>
<pubDate>Mon, 29 Sep 2008 08:12:34 +0000</pubDate>
<dc:creator>stigl</dc:creator>
<guid>http://stigl.pl.wordpress.com/2008/09/29/mavenized-neo4j-example/</guid>
<description><![CDATA[The weekend after JavaZone, I was one of the participants on a &#8220;GeekCruise&#8221;, where we lo]]></description>
<content:encoded><![CDATA[<p>The weekend after <a href="http://javazone.no">JavaZone</a>, I was one of the participants on a "GeekCruise", where we looked into emerging technologies such as Qi4J, Neo4J and Enterpricy stuff.<br />
<img src="http://wiki.neo4j.org/images/8/84/Matrix.png" alt="Matrix diagram" /><br />
In short, Neo4J is a network/graph database that promises to deliver Web 3.0, Semantic Web and RDF greatness. <!--more-->Its advantages are fast specific types of search, graph traversal and shortest route. It can also store partially structured information, eg. V1.0 and v1.1 of Person in the DB at the same time. It also integrates well with Qi4J, you don't need ORMaping, and the graph can be read from and persisted to RDF.</p>
<p><code>//Setting up the database in a folder called myNeoDB<br />
NeoService neoDb = new EmbeddedNeo("myNeoDB");<br />
//Create test dataset<br />
Node neo = neoDb.createNode();<br />
neo.setProperty("name", "Thomas Andersson");<br />
Node trinity = neoDb.createNode();<br />
neo.createRelationshipTo(trinity, MyRelationShipTypes.KNOWS);<br />
</code></p>
<p>Queries can be done with SPARQL, or a traverser:<br />
<code><br />
Traverser friendFinder(Node person) {<br />
        return person.traverse(<br />
                Traverser.Order.BREADTH_FIRST,<br />
                StopEvaluator.END_OF_NETWORK,<br />
                ReturnableEvaluator.ALL_BUT_START_NODE,<br />
                MyRelationShipTypes.KNOWS,<br />
                Direction.OUTGOING);<br />
}<br />
</code></p>
<p><a href="http://wiki.community.objectware.no/download/attachments/3771093/matrixTest.zip?version=1">The Matrix demo is as simple as Unzip og "mvn test"!</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[If you forgot to set your svn:keywords...]]></title>
<link>http://ourcraft.wordpress.com/?p=822</link>
<pubDate>Sat, 27 Sep 2008 01:49:59 +0000</pubDate>
<dc:creator>danielmeyer</dc:creator>
<guid>http://ourcraft.pl.wordpress.com/2008/09/26/if-you-forgot-to-set-your-svnkeywords/</guid>
<description><![CDATA[Somehow the Subversion auto-props didn&#8217;t cause my svn:keywords to automatically be set in my c]]></description>
<content:encoded><![CDATA[<p>Somehow the Subversion auto-props didn't cause my svn:keywords to automatically be set in my classes, and now I had 32 classes that, if I set the properties through Eclipse, I'd have to fix manually.</p>
<p>Me no like 32 repetitions of same thing.</p>
<p>So I looked for a way to do it from the command line.</p>
<p>Here's a way that worked for me:</p>
<p>(I ran the following once from the project's src/main/java, and once from src/test/java)</p>
<p>[sourcecode language='php']</p>
<p>svn propset -R svn:keywords "Author Id Revision Date" .</p>
<p>[/sourcecode]</p>
<p>Part of why this works so easily is that, guided by the Maven defaults, we're set up with our Java source code split out from the other files into src/{main,test}/java.  If the XML configuration files were in the same directory with Java source code, it would take more work to set the property on just the Java files, I think.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Flex3 Library Projects with Static Localization and flex-mojos]]></title>
<link>http://sriramangopalan.wordpress.com/?p=16</link>
<pubDate>Fri, 26 Sep 2008 04:08:13 +0000</pubDate>
<dc:creator>sriramangopalan</dc:creator>
<guid>http://sriramangopalan.pl.wordpress.com/2008/09/26/flex3-library-projects-with-static-localization-and-flex-mojos/</guid>
<description><![CDATA[For those who are using flex-mojos to build flex artifacts the maven way, here is a tip to get the s]]></description>
<content:encoded><![CDATA[<p>For those who are using flex-mojos to build flex artifacts the maven way, here is a tip to get the static localization to work with swc projects.</p>
<blockquote><p>
&#60;build&#62;<br />
		&#60;plugins&#62;<br />
			&#60;plugin&#62;<br />
				&#60;groupId&#62;info.flex-mojos&#60;/groupId&#62;<br />
				&#60;artifactId&#62;flex-compiler-mojo&#60;/artifactId&#62;<br />
				&#60;configuration&#62;<br />
					&#60;mergeResourceBundle&#62;true&#60;/mergeResourceBundle&#62;<br />
					&#60;allowSourcePathOverlap&#62;true&#60;/allowSourcePathOverlap&#62;<br />
					&#60;includeResourceBundles&#62;<br />
						&#60;bundle&#62;WorkFlowModuleLib&#60;/bundle&#62;<br />
					&#60;/includeResourceBundles&#62;<br />
					&#60;locales&#62;<br />
						&#60;locale&#62;en_US&#60;/locale&#62;<br />
						&#60;locale&#62;ar_AE&#60;/locale&#62;<br />
					&#60;/locales&#62;<br />
				&#60;/configuration&#62;<br />
			&#60;/plugin&#62;<br />
		&#60;/plugins&#62;<br />
	&#60;/build&#62;
</p></blockquote>
<p>The version of flex-compiler-mojo used is 2.0M5</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[You might have to Maven Install the child module]]></title>
<link>http://ourcraft.wordpress.com/?p=802</link>
<pubDate>Thu, 25 Sep 2008 19:25:55 +0000</pubDate>
<dc:creator>danielmeyer</dc:creator>
<guid>http://ourcraft.pl.wordpress.com/2008/09/25/you-might-have-to-maven-install-the-child-module/</guid>
<description><![CDATA[I added a method to the hacked-together interface of my test harness example&#8217;s domain module s]]></description>
<content:encoded><![CDATA[<p>I added a method to the hacked-together interface of my test harness example's domain module so that it would be available to the service module.  (These two modules belong to the same Maven multimodule project.)</p>
<p>I then did a Maven Install on the multimodule parent project, and then a Maven Eclipse on the service module project, expecting that now the service module would see the interface changes in the domain module's interface... but 'tweren't so.</p>
<h2>Something that Worked</h2>
<p>I then did a Maven Install of the domain module.  Now when I Maven Eclipsed the service module, I got the interface changes from the domain module.</p>
<p>This is all probably normal -- just noting it in case I get confused again later...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Integrating flex maven and java - Introduction (Part I)]]></title>
<link>http://sriramangopalan.wordpress.com/?p=3</link>
<pubDate>Thu, 25 Sep 2008 18:23:33 +0000</pubDate>
<dc:creator>sriramangopalan</dc:creator>
<guid>http://sriramangopalan.pl.wordpress.com/2008/09/25/integrating-flex-maven-and-java-introduction-part-i/</guid>
<description><![CDATA[For those who might be looking for details on how to integrate disparate technologies like Flex, Mav]]></description>
<content:encoded><![CDATA[<p>For those who might be looking for details on how to integrate disparate technologies like Flex, Maven and Java as what i am, following details will help you to get your feet wet.</p>
<p>Flex is a great platform for developing RIA (Rich Internet Applications), Maven 2 is known for its maturity and versatality in managing dependencies and in terms of project management and Java 2 is a mature technology for developing server side components (Java JEE). JBoss is a light-weight Open Source application server which is fully compatible with the Java EE5 standards that can be used both in development and production environments for deploying enterprise j2ee applications. You can download one from here<br />
<a href="//sourceforge.net/project/showfiles.php?group_id=22866&#38;package_id=16942&#38;release_id=614346">JBoss-Download</a></p>
<p>Putting all these together can be quite a challenge. However, we are not alone. We have enthusiast from various corners to help us in achieving our goals.</p>
<p>I personally use a linux box loaded with opensuse 11.0 with a bare minimum set of softwares installed to keep the development up and running.</p>
<p>Following are the list of softwares installed in my local box.</p>
<p>1. FlexBuilder3 eclipse plugin for Linux Alpha 4. You can download here<br />
<a href="http://labs.adobe.com/downloads/flexbuilder_linux.html">FlexBuilder-Linux</a><br />
2. MySQL 5.0.67. You can download the source tar ball here<br />
<a href="http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/">MySQL-source-download</a></p>
<p>3. Eclipse 3.3 (Europa)</p>
<p>4. Maven Integration for Eclipse </p>
<p><a href="http://m2eclipse.sonatype.org/update/">Maven-Integration-for-eclipse</a></p>
<p>5. Sub Version Eclipse Plugin  <a href="http://subclipse.tigris.org/update_1.4.x">SubVersion-Eclipse-Plugin</a></p>
<p>6. JBoss 4.2.3.GA (JDK 6)</p>
<p>and I am ready to go.</p>
<p>Notes:</p>
<p>Integrating maven with flex projects was a pain not before I discovered flex-mojos (http://svn.sonatype.org/flexmojos/) which are essentially maven plugins to compile flex sources like .mxml / .as / .css into concrete artifacts like .swf / .swc etc. You can visit the following blog to get more information about flex-mojos and the various options available there (http://blog.flex-mojos.info/). There were other resources like israfil-mojo which did almost the same job. However, in my personal opinion, I would prefer flex-mojos which is more complete and stable compared to israfil mojos.</p>
<p>MySQL is a light-weight RDBMS software which can aptly fit into any development environment. Coupled with some utilities like MySQL-Administrator and MySQL-QueryBrowser, it forms a perfect match for low-cost, productive development environment setup. You may experiment more with the source available here (http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/)</p>
<p>Installing MySQL on Linux could be tricky for newbies. For those who are new to linux and mysql, the following post might prove useful.</p>
<p>http://laffers.net/howtos/howto-install-mysql</p>
<p>Granite Data Services is one another open-source framework for integrating flex and java using AMF protocol for serialization / de-serialization of action script classes to java classes and vice-versa. You can visit the following site for more details </p>
<p><a href="http://www.graniteds.org/confluence/pages/viewpage.action?pageId=229378">Granite Data Services</a></p>
<p>Details of how to setup a multi-module maven project using the above mentioned tools and softwares will form the primary content of Part - II of this post.</p>
<p>Till then, have fun.</p>
<p>Sriraman.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Why we ended up using test scope instead of an extension tag]]></title>
<link>http://ourcraft.wordpress.com/?p=788</link>
<pubDate>Thu, 25 Sep 2008 15:27:43 +0000</pubDate>
<dc:creator>danielmeyer</dc:creator>
<guid>http://ourcraft.pl.wordpress.com/2008/09/25/why-we-ended-up-using-test-scope-instead-of-an-extension-tag/</guid>
<description><![CDATA[Just in the last few days, our deployments of a certain module started failing with a NoClassDefFoun]]></description>
<content:encoded><![CDATA[<p>Just in the last few days, our deployments of a certain module started failing with a NoClassDefFound error on a class from the ojdbc5 jar.  Suspecting that the ojdbc5 jar might be duplicated somewhere, I found (using my beloved <a href="http://ourcraft.wordpress.com/tag/jarsearch/">JarSearch</a>) that indeed, sometimes the module was being built with the ojdbc5 jar in it.</p>
<h2>Background and Analysis</h2>
<p>The ojdbc5 artifact was listed in the project's pom file as a compile-scope &#60;dependency&#62; under a certain profile.  That profile was activated by our CI server when deploying schema changes, because Liquibase needed it around.  That was why the .war was sometimes built with ojdbc5 in it and sometimes not.</p>
<p>The config has been  this way for several weeks, but we didn't notice it until we just in the last  few days got to the point of contributing Hibernate mappings, which then needs ojdbc to actually work.  At that time, the  ojdbc jar in the war file fought with the ojdbc jar in JBoss's  server/default/lib directory, and just like when you were fighting with your  sister over that cookie, nobody won and we got the  NoClassDefFoundError.</p>
<p>So we needed ojdbc5 to be around at build time (at least when a certain <a href="http://maven.apache.org/pom.html#Profiles">Maven profile</a> is active), but not be included in the war file.</p>
<h2>First Fix</h2>
<p>Our first fix was to declare the ojdbc5 artifact as an <a href="http://maven.apache.org/pom.html#Extensions">extension</a> for the build instead of as a dependency of the profile.  That worked (that is, it allowed the build to succeed and didn't put the ojdbc5 jar in the resulting war file), but it made the ojdbc5 artifact available to <em>all</em> builds of our war file, meaning we could accidentally start depending on ojdbc to be there.  While not a stopper, it wasn't ideal.</p>
<h2>Final Fix</h2>
<p>It turns out that by declaring ojdbc5 as a <em>test-scope</em> dependency in the profile where it was originally was (the one that is only active when we're deploying schema changes), we get all three things we wanted</p>
<ul>
<li>ojdbc5 is around at build time <em>if and only if</em> that one Maven profile is active</li>
<li>ojdbc5 is never included in the war file</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Configuring Eclipse to use a JDK at a location with spaces in it]]></title>
<link>http://onkarjoshi.wordpress.com/?p=84</link>
<pubDate>Thu, 25 Sep 2008 12:59:58 +0000</pubDate>
<dc:creator>Onkar Joshi</dc:creator>
<guid>http://onkarjoshi.pl.wordpress.com/2008/09/25/configuring-eclipse-to-use-a-jdk-at-a-location-with-spaces-in-it/</guid>
<description><![CDATA[I was setting up my Eclipse environment with some new plugins today and ran into some trouble, which]]></description>
<content:encoded><![CDATA[<p>I was setting up my Eclipse environment with some new plugins today and ran into some trouble, which seems to have bothered many souls as I gather from the posts I found when trying to fix the problem.</p>
<p>Some tools/plugins/features in Eclipse may need to use a JDK rather than a JRE. Sometimes you may even wish to switch between different versions of the JRE or JDK being used since typically 1.4, 1.5/5 and 1.6/6 are all present on a developers' system at different locations.</p>
<p>I got a mesage from a Maven plugin which said that it needed a JDK to be used to run Eclipse instead of a JRE that it was currently using. Well, this shouldn't usually present much of a problem. You can choose the virtual machine used to run Eclipse by passing the -vm argument to eclipse.exe. What's usually needed is something like "eclipse.exe -vm c:\jdk1.6\bin\javaw.exe". Mind you, javaw.exe is used when you don't want an associated console window.</p>
<p>I did have JDK 1.6 installed. But it was installed to "C:\Program Files\Java\jdk1.6.0_07". That, it seems, is the default location. The space in the path caused big problems. I tried quotes\no quotes and other magical incantations to get it to accept the argument with a space but to no avail.</p>
<p>So instead of using the command line switch, I put an entry into eclipse.ini which is in the same directory as eclipse.exe. But this didn't work either.</p>
<p>Finally, what did work was that I started command.exe (the 16 bit DOS shell) and navigated to the JDK directory using "dir /X" for help which shows names generated in the format "C:\PROGRA~1\JAVA\JDK16~1.0_0\BIN". Perhaps you remember coming across such filenames.</p>
<p>Anyway, the older 8.3 style directory name worked! My final eclipse.ini is posted below.</p>
<p><em>-showsplash<br />
org.eclipse.platform<br />
--launcher.XXMaxPermSize<br />
256M<br />
-framework<br />
plugins\org.eclipse.osgi_3.4.0.v20080605-1900.jar<br />
-vm<br />
C:\PROGRA~1\JAVA\JDK16~1.0_0\BIN<br />
-vmargs<br />
-Dosgi.requiredJavaVersion=1.5<br />
-Xms40m<br />
-Xmx512m</em></p>
<p>I was using Windows XP with SP3 and Eclipse 3.4. There is likely to be a better solution that I missed. If you have it or if this post helped you, please leave a coment. :)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Why I was getting a DuplicateProjectException in my multimodule project]]></title>
<link>http://ourcraft.wordpress.com/?p=790</link>
<pubDate>Wed, 24 Sep 2008 21:05:31 +0000</pubDate>
<dc:creator>danielmeyer</dc:creator>
<guid>http://ourcraft.pl.wordpress.com/2008/09/24/why-i-was-getting-a-duplicateprojectexception-in-my-multimodule-project/</guid>
<description><![CDATA[I am working on a Maven multimodule project that will be a working example of our integration test h]]></description>
<content:encoded><![CDATA[<p>I am working on a Maven multimodule project that will be a working example of our integration test harness.  I'm working on it from the bottom layer up; I got the persistence module running and added the domain module (in skeletal form anyway).  When I tried to Maven Install the multimodule project with the new domain module referenced in the &#60;modules&#62; section of the parent pom though, I got an error like this:</p>
<p style="padding-left:30px;">org.apache.maven.BuildFailureException: Project 'com.example.training.framework-test-harness-example:framework-test-harness-example-db' is duplicated in the reactor</p>
<p>I looked around and around in the pom files, but it was Keith who spotted it:</p>
<p>I had given the domain module an artifactId of framework-test-harness-example-<em>db</em> instead of framework-test-harness-example-dmn -- classic copy-n-paste error!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[I thought it must be Maven or Eclipse's fault]]></title>
<link>http://ourcraft.wordpress.com/?p=782</link>
<pubDate>Mon, 22 Sep 2008 20:06:23 +0000</pubDate>
<dc:creator>danielmeyer</dc:creator>
<guid>http://ourcraft.pl.wordpress.com/2008/09/22/i-thought-it-must-be-maven-or-eclipses-fault/</guid>
<description><![CDATA[I am setting up my first Maven multimodule project as a working example using the new integration te]]></description>
<content:encoded><![CDATA[<p>I am setting up my first Maven multimodule project as a working example using the new integration test harness.</p>
<p>I had created the parent project with its pom, pointing to the production great-grandpappy pom that has all the dependencyManagement stuff (external dependencies, versions, etc.)</p>
<p>I had created a child project under the parent project, and made a pom for it pointing to the parent project's pom.</p>
<p>I had made a &#60;module&#62; entry in the parent pom pointing to the child module, and also a &#60;dependency&#62; entry pointing to the same.</p>
<p>I had done a Maven Install on the parent project, to get it into my local Artifactory repository.</p>
<p>I had done a Maven Eclipse on the child project, bringing in the just-installed parent project and all the dependencies.</p>
<p><strong>Nothing Happens<br />
</strong></p>
<p>Flushed with success, I tried to extend ModuleStarter, one of the classes provided by the pom files.  As expected, the class was not recognized, so I Ctrl+Shift+O'd it, but...nothing happened.</p>
<p>What could it be?  I pressed Ctrl+Shift+O several more times; looked at the pom files; checked the Referenced Libraries (and yes, the class was there!) ...</p>
<p>I spent many minutes on this, until I tried (again) to type out the fully-qualified name of the class I was extending.  The red "this did not work" underlining did not go away, but this time I hovered the mouse over the class name to see what the error details were, to wit:</p>
<p style="padding-left:30px;"><em>The type ModuleStarter cannot be the superclass of BlahBlah; a superclass must be a class</em></p>
<p><strong>A different magic word</strong></p>
<p>A superclass must be a class... a superclass must be a class... it took a few moments for the meaning of this to sink in, but then it hit me: ModuleStarter is not a class, it's an interface.  Ha!</p>
<p>So I just had my class say <em>implements</em> instead of <em>extends</em> ModuleStarter, and now Ctrl+Shift+O works again, and peace and happiness have returned to my multimodule project.</p>
<p>*I first played Will Crowther's Colossal Cave text-based adventure game off of a 5.25" 360K floppy disk on my family's 8088 PC, in high school.  The influence of this game on me rivals that of Scooby-Doo cartoons in the '80s!  In that game, a common exchange (for me anyway) was:</p>
<pre>&#62;xyzzy
Nothing happens.</pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Maven(1)]]></title>
<link>http://cristowang.wordpress.com/?p=3</link>
<pubDate>Mon, 22 Sep 2008 08:20:44 +0000</pubDate>
<dc:creator>cristowang</dc:creator>
<guid>http://cristowang.pl.wordpress.com/2008/09/22/maven1/</guid>
<description><![CDATA[Maven (http://maven.apache.org/index.html)

maven 是啥? 簡單來說可以稱為一個方便的]]></description>
<content:encoded><![CDATA[<p><strong>Maven </strong><a title="maven" href="http://maven.apache.org/index.html"><em>(http://maven.apache.org/index.html)</em></a><strong><br />
</strong></p>
<p>maven 是啥? 簡單來說可以稱為一個方便的" build tool" 幫我們省去很多工作。包含Ant 會做的事: compile, 打包(packing), test(測試) , distribute(發佈)。另外可以跑報表, 生成 web site, 更有彈性的 team work.<!--more--></p>
<p>透過<strong>POM</strong> (project object model)設定，就可以方便來管理專案</p>
<p>來看看官方網站對 maven 的敘述</p>
<table border="1" width="60%">
<tbody>
<tr bgcolor="#f087f0">
<td colspan="2" align="center">Objectives:</td>
</tr>
<tr>
<td bgcolor="#a5e1f0">(1) <strong>Making the build process easy</strong></td>
<td>這點就不用解釋了</td>
</tr>
<tr>
<td bgcolor="#a5e1f0">(2) <strong>Providing a uniform build system</strong></td>
<td>透過 pom 的設計，會有一個共同的build system</td>
</tr>
<tr>
<td bgcolor="#a5e1f0">(3) <strong>Providing quality project information</strong></td>
<td>可以從 source control 產生 change log, mailing lists, dependency list(這個我覺得很好用 拿來加入jar 檔很方便),resource 的互相參考</td>
</tr>
<tr>
<td bgcolor="#a5e1f0">(4) <strong>Providing guidelines for best practices development</strong></td>
<td>提供一些在專案裡面"best practice" 包括specification, execution, test report。test code 要是獨立的，另外也制定結構的 layout(他制定的結構一開始很不習慣)</td>
</tr>
<tr>
<td bgcolor="#a5e1f0">(5) <strong>Allowing transparent migration to new features</strong></td>
<td>就是說各個版本間要 migration 都很方便啦</td>
</tr>
</tbody>
</table>
<hr />接下來接是體驗時間<br />
環境: JDK 5 以上 ,  maven download(my version is 2.0.7)<br />
下載完之後把 maven 加入path 底下  然後看一下版本<br />
hint: 設定MAVEN_HOME 到你放maven 的位置  , MAVEN_HOME/bin 加入 path<br />
<a href="http://cristowang.files.wordpress.com/2008/09/noname1.gif"><img class="alignnone size-full wp-image-5" title="noname1" src="http://cristowang.wordpress.com/files/2008/09/noname1.gif" alt="" width="403" height="81" /></a></p>
<p>恩  此時 maven 已經裝好了</p>
<hr />按照官方建議  接下來來建一個基本的專案</p>
<pre><span style="color:#ff9900;">mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
<span style="color:#000000;">在目前的目錄下 就會幫你建立一個資料夾，到 my-app 看一下吧
<span style="color:#ff9900;">cd my-app
<span style="color:#000000;">會看到如下的結構</span>
</span></span></span>my-app
&#124;-- pom.xml
`-- src
    &#124;-- main
    &#124;   `-- java
    &#124;       `-- com
    &#124;           `-- mycompany
    &#124;               `-- app
    &#124;                   `-- App.java
    `-- test
        `-- java
            `-- com
                `-- mycompany
                    `-- app
                        `-- AppTest.java
<span style="color:#ff9900;"><span style="color:#000000;"><span style="color:#ff9900;">
<span style="color:#000000;">這個結構就是maven 預設的結構。src 底下分為 main, test 。java 底下才開始是package, class。
pom.xml 就是maven 核心了。
<hr /></span></span></span></span>回頭來看剛剛下的指令  <span style="color:#ff0000;"><strong>archtype:create</strong></span>
這是第一個學到的指令我們稱為 <strong>maven goal</strong> ，create 顧名思義就是幫我們建立專案，後面的參數都是用 -D 開始的。
groupId，你看到就是你的package 。artifactId，就是你專案位置
<hr />接下來 run 一下吧 先到你剛剛建立的專案下面, 有pom.xml 的地方
<span style="color:#ff9900;">mvn:install</span>
maven 開始幫你create, compile, test, package 最後會幫妳出一個 jar file
你會發現多一個資料夾 target ，裡面有一個jar file 就是最後的產出物
<span style="color:#ff9900;">java -cp target/my-app-1.0-SNAPSHOT.jar com.bt.maven.App</span>
<hr /><span><span><span><span><span style="color:#ff9900;"><span style="color:#000000;"><span style="color:#ff9900;"><span style="color:#000000;">回頭來看你的電腦檔案
~/.m2/repository,  ~/.m2/setting.xml (~/.--&#62; C:\Documents and Settings\'yourname'n or C:\Users\'yourname') 會多出這些東西。
這裡就是 maven 的储藏庫。</span></span></span></span></span></span></span></span></pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[A package in an unexpected state of nonexistence]]></title>
<link>http://ourcraft.wordpress.com/?p=745</link>
<pubDate>Thu, 18 Sep 2008 13:08:36 +0000</pubDate>
<dc:creator>danielmeyer</dc:creator>
<guid>http://ourcraft.pl.wordpress.com/2008/09/18/a-package-in-an-unexpected-state-of-nonexistence/</guid>
<description><![CDATA[Oops, I broke the build.  The unit tests all passed in Eclipse, but when I committed, one of my pro]]></description>
<content:encoded><![CDATA[<p>Oops, I broke the build.  The unit tests all passed in Eclipse, but when I committed, one of my production classes didn't even compile.</p>
<p>In the face of a mystery like this, I tend to wax philosophical, pondering: "How can this be?"</p>
<p>Well, let's dig in and see if we can figure it out.</p>
<p><strong>Digging In</strong></p>
<p>I can reproduce the issue by doing a local Maven Install.  (Guess it would be a good idea to do one of those before committing my changes, huh? :)  The output looks something like this:</p>
<p>[sourcecode language='php']<br />
...<br />
[INFO] ------------------------------------------------------------------------<br />
[ERROR] BUILD FAILURE<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] Compilation failure</p>
<p>C:\path\to\eclipse-workspaces\production\framework-test-harness\src\main\java\com\example\fw\testutil\ConfigurationSwappingAbstractTestCase.java:[7,24] package org.junit.runner does not exist</p>
<p>C:\path\to\eclipse-workspaces\production\framework-test-harness\src\main\java\com\example\fw\testutil\ConfigurationSwappingAbstractTestCase.java:[8,25] package org.junit.runners does not exist</p>
<p>C:\path\to\eclipse-workspaces\production\framework-test-harness\src\main\java\com\example\fw\testutil\ConfigurationSwappingAbstractTestCase.java:[9,39] package org.junit.runners.Parameterized does not exist<br />
...<br />
[/sourcecode]</p>
<p>Now how's come the org.junit.runner <em>package</em> doesn't even exist?</p>
<p>This smelled like a pom file issue...and indeed it was.</p>
<p><strong>Normally Test Scope is Right...<br />
</strong></p>
<p>We have a parent pom file that brings in certain libraries for every project, and JUnit 4 is one of those.  It is declared at test scope, because we normally wouldn't want to ship the JUnit library, or any tests that depend on it.</p>
<p><strong>...But This is a Little Different...</strong></p>
<p>That's where our framework test harness is a little different: this project's purpose is to provide services for use by other projects' integration tests, and as part of that it provides a base class that uses JUnit annotations.  So our framework test harness actually has a <em>compile</em>-scope dependency on JUnit rather than the normal <em>test</em> scope dependency.</p>
<p><strong>Solution<br />
</strong></p>
<p>All I needed to do was update the test harness project's pom file and adjust the junit artifact's scope to compile, like this:</p>
<p>[sourcecode language='xml']<br />
        <!-- Need compile scope for integration test base class --><br />
        <dependency><br />
            <groupId>junit</groupId><br />
            <artifactId>junit</artifactId><br />
            <scope>compile</scope><br />
        </dependency><br />
[/sourcecode]</p>
<p>...and now Maven Install finds the JUnit classes just fine.</p>
<p>So, I admit it: I earned my -10 points on the <a href="http://hudson.gotdns.com/wiki/display/HUDSON/The+Continuous+Integration+Game+plugin">leader board</a> fair and square.  : )</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Links 2008.09.17]]></title>
<link>http://janmaterne.wordpress.com/?p=66</link>
<pubDate>Wed, 17 Sep 2008 11:27:07 +0000</pubDate>
<dc:creator>janmaterne</dc:creator>
<guid>http://janmaterne.pl.wordpress.com/2008/09/17/links-20080917/</guid>
<description><![CDATA[2014: Maven on Mars. Do the Apache Maven team know that?  Ok, here Maven stands for Mars Atmosphere ]]></description>
<content:encoded><![CDATA[<p><a href="http://www.heise.de/newsticker/Maven-soll-ab-2014-die-Mars-Atmosphaere-analysieren--/meldung/116038">2014: Maven on Mars</a>. Do the Apache Maven team know that? ;-) Ok, here Maven stands for <em>Mars Atmosphere and Volatile Evolution</em>.</p>
<p><a href="http://nettuts.com/javascript-ajax/10-rare-but-clever-javascript-techniques/">10 nice tips</a> about using JavaScript (esp. jQuery) for improving website usability.</p>
<p>On September 30, 2008 starts a (free?) <a href="http://eclipse.dzone.com/announcements/webinar-from-rcp-book-reality">webinar </a>about writing Eclipse RCP applications.</p>
]]></content:encoded>
</item>

</channel>
</rss>
