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

<channel>
	<title>fiveclouds &#187; jboss</title>
	<atom:link href="http://www.fiveclouds.com/tag/jboss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fiveclouds.com</link>
	<description>collaboration, creativity and the next big thing</description>
	<lastBuildDate>Tue, 25 May 2010 11:06:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>JBoss EJB3 and Maven</title>
		<link>http://www.fiveclouds.com/2008/08/12/jboss-ejb3-and-maven/</link>
		<comments>http://www.fiveclouds.com/2008/08/12/jboss-ejb3-and-maven/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 02:12:52 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[ejb3]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=55</guid>
		<description><![CDATA[<p>I have just recently been working on some more technical stuff &#8211; and I have to admit it is really nice to be back in the code.  Working with a couple of start-ups on the East coast lately I have been pottering around with some JBoss 4/5 and EJB3 configurations.   Since I&#8217;m going to be running around again soon &#8211; I thought I would blog a few bits and pieces on technology while I&#8217;m about it.</p>
<p>The first thing I noticed about pulling Maven and JBoss together was that the EJB packaging didn&#8217;t seem quite as intuitive as I thought.  In&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I have just recently been working on some more technical stuff &#8211; and I have to admit it is really nice to be back in the code.  Working with a couple of start-ups on the East coast lately I have been pottering around with some JBoss 4/5 and EJB3 configurations.   Since I&#8217;m going to be running around again soon &#8211; I thought I would blog a few bits and pieces on technology while I&#8217;m about it.</p>
<p>The first thing I noticed about pulling Maven and JBoss together was that the EJB packaging didn&#8217;t seem quite as intuitive as I thought.  In the end I did end up using the EJB plugin and the dependency plugin to get the dependencies in place.  This meant including both the plugins in an EJB parent POM.</p>
<pre class="brush: xml;">&lt;plugin&gt;
&lt;artifactId&gt;maven-ejb-plugin&lt;/artifactId&gt;
&lt;configuration&gt;
&lt;archive&gt;
&lt;manifest&gt;
&lt;addClasspath&gt;true&lt;/addClasspath&gt;
&lt;/manifest&gt;
&lt;/archive&gt;
&lt;ejbVersion&gt;3.0&lt;/ejbVersion&gt;
&lt;/configuration&gt;
&lt;/plugin&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-dependency-plugin
&lt;/artifactId&gt;
&lt;executions&gt;
&lt;execution&gt;
&lt;id&gt;copy&lt;/id&gt;
&lt;phase&gt;compile&lt;/phase&gt;
&lt;goals&gt;
&lt;goal&gt;copy-dependencies&lt;/goal&gt;
&lt;/goals&gt;
&lt;configuration&gt;
&lt;outputDirectory&gt;target/classes&lt;/outputDirectory&gt;
&lt;excludeScope&gt;provided&lt;/excludeScope&gt;
&lt;/configuration&gt;
&lt;/execution&gt;
&lt;/executions&gt;
&lt;/plugin&gt;
</pre>
<p>With that code in place you just need to ensure you set the packaging to EJB on your EJB&#8217;s.  I thought that copying the dependencies into the target was probably the nicest way,  also you need to watch your dependencies and ensure that those you don&#8217;t want to use have a scope of provided so they they don&#8217;t get bundled.  At first I thought that the dependency embedding should have been part of the EJB plugin,  but actually given the power of the dependency plugin it actually made more sense to use that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/08/12/jboss-ejb3-and-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
