<?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>Software development &#124; VR Software &#187; Dynamic Web Module</title>
	<atom:link href="http://vrsoftware.biz/tag/dynamic-web-module/feed/" rel="self" type="application/rss+xml" />
	<link>http://vrsoftware.biz</link>
	<description>Web based application development</description>
	<lastBuildDate>Fri, 10 Oct 2014 18:32:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Creating a Maven webapp with Eclipse</title>
		<link>http://vrsoftware.biz/creating-a-maven-webapp-with-eclipse/</link>
		<comments>http://vrsoftware.biz/creating-a-maven-webapp-with-eclipse/#comments</comments>
		<pubDate>Wed, 26 Sep 2012 09:07:55 +0000</pubDate>
		<dc:creator><![CDATA[VR Software]]></dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Dynamic Web Module]]></category>
		<category><![CDATA[Faceted Form]]></category>
		<category><![CDATA[Juno]]></category>
		<category><![CDATA[mvn]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[Webapp]]></category>

		<guid isPermaLink="false">http://vrsoftware.biz/?p=81</guid>
		<description><![CDATA[We will be creating a Maven webapp using the command line and then import it in Eclipse Juno. To create the webapp using Maven you need to specify the DarchetypeArtifactId as being a webapp. In your command line you will<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://vrsoftware.biz/creating-a-maven-webapp-with-eclipse/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>We will be creating a Maven webapp using the command line and then import it in Eclipse Juno.</p>
<p>To create the webapp using Maven you need to specify the DarchetypeArtifactId as being a webapp. In your command line you will type the following:</p>
<p><code>mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp</code></p>
<p><a href="http://vrsoftware.biz/wp-content/uploads/2012/09/GenerateMavenWebapp.png"><img class="alignnone size-full wp-image-89" title="Generate Maven Webapp" src="http://vrsoftware.biz/wp-content/uploads/2012/09/GenerateMavenWebapp.png" alt="" width="817" height="607" /></a></p>
<p>The webapp structure will be created in the directory called <code>my-webapp.</code></p>
<p>The next steps assume that you have installed the Maven plugin for Eclipse (m2e).</p>
<p>Open Eclipse and from the &#8220;File&#8221; menu select &#8220;Import&#8230;&#8221; and in the window that opens up find the Maven folder and select &#8220;Existing Maven Projects&#8221;.<br />
Browse to the directory where you created my-webapp and the pom.xml file is located, in this example that is /workspaces/my-webapp. and click the &#8220;Finish&#8221; button to complete the import.</p>
<p><a href="http://vrsoftware.biz/wp-content/uploads/2012/09/ImportExistingMavenProjectStep1.png"><img class="size-full wp-image-91 alignnone" title="Import Existing Maven Project Step 1" src="http://vrsoftware.biz/wp-content/uploads/2012/09/ImportExistingMavenProjectStep1.png" alt="" width="428" height="386" /></a></p>
<p><a href="http://vrsoftware.biz/wp-content/uploads/2012/09/ImportExistingMavenProjectStep2.png"><img class="alignnone size-full wp-image-92" title="Import Existing Maven Project Step 2" src="http://vrsoftware.biz/wp-content/uploads/2012/09/ImportExistingMavenProjectStep2.png" alt="" width="446" height="472" /></a></p>
<p>&nbsp;</p>
<p>Your project will now appear in Eclipse and you can edit and add source files as you need.</p>
<p><a href="http://vrsoftware.biz/wp-content/uploads/2012/09/MavenStructure.png"><img class="alignnone size-full wp-image-95" title="Maven Structure" src="http://vrsoftware.biz/wp-content/uploads/2012/09/MavenStructure.png" alt="" width="182" height="195" /></a></p>
<p>&nbsp;</p>
<p>You can run Maven install to let Maven compile your code and put it in the target directory:</p>
<p><a href="http://vrsoftware.biz/wp-content/uploads/2012/09/RunAsMavenInstall.png"><img class="alignnone size-full wp-image-96" title="Run As Maven Install" src="http://vrsoftware.biz/wp-content/uploads/2012/09/RunAsMavenInstall.png" alt="" width="501" height="175" /></a></p>
<p>&nbsp;</p>
<p>If you want to run the application through Eclipse and you&#8217;ve already setup your server, then you need to perform some additional steps to make sure that Eclipse will allow you to run the application from the server.</p>
<p>Firstly you will need to convert the project to a faceted form:</p>
<p><a href="http://vrsoftware.biz/wp-content/uploads/2012/09/FacetedForm.png"><img class="alignnone size-full wp-image-97" title="Convert to Faceted Form" src="http://vrsoftware.biz/wp-content/uploads/2012/09/FacetedForm.png" alt="" width="517" height="100" /></a></p>
<p>Secondly you will need to add &#8220;Dynamic Web Module&#8221; in Project Facets and make sure to check the &#8220;Further configuration options&#8221; and set the Content Directory to the target directory where Maven has placed your compiled code:</p>
<p><a href="http://vrsoftware.biz/wp-content/uploads/2012/09/DynamicWebModule.png"><img class="alignnone size-full wp-image-98" title="Dynamic Web Module" src="http://vrsoftware.biz/wp-content/uploads/2012/09/DynamicWebModule.png" alt="" width="805" height="562" /></a></p>
<p>And that&#8217;s it, you should now be able to add the output of you project to your server and run it from Eclipse!</p>
]]></content:encoded>
			<wfw:commentRss>http://vrsoftware.biz/creating-a-maven-webapp-with-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
