<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7661682192407470505</id><updated>2011-04-21T18:06:56.819-07:00</updated><category term='Eclipse Maven Ant Spring Rebel Hot Swap Deployment'/><title type='text'>Mittal Designs</title><subtitle type='html'>Coding Smart: Some tips'n tricks to speed up your coding...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mittaldesigns.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7661682192407470505/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mittaldesigns.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Saurabh Mittal</name><uri>http://www.blogger.com/profile/16109939176584939713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7661682192407470505.post-8402711076693098488</id><published>2009-05-22T20:10:00.001-07:00</published><updated>2009-05-22T20:35:07.919-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse Maven Ant Spring Rebel Hot Swap Deployment'/><title type='text'>Exploded Hot deployment with Maven and Java Rebel outside IDE</title><content type='html'>Here is another way, more simpler than the one shown in my &lt;a href="http://mittaldesigns.blogspot.com/2009/04/eclipse-maven-java-rebel-and-hot.html"&gt;earlier&lt;/a&gt; post.&lt;br /&gt;&lt;br /&gt;The following configuration works with JBoss. Adjust accordingly with your app server. Assuming you have all the required plugins as laid out in the &lt;a href="http://mittaldesigns.blogspot.com/2009/04/eclipse-maven-java-rebel-and-hot.html"&gt;earlier&lt;/a&gt; post.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Configuration Steps&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;In the JBoss deploy folder, create any folder with folder name ending with .war (e.g. &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;myProject.war&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Setup your IDE environment with Maven plugin and run the project as usual.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make sure your project compiles and generates a .ear or .war file in the default Maven target folder structure. Extract the &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;lib&lt;/span&gt; folder as it contains all the dependencies of your project.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Inside the myProject.war, create a &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;WEB-INF &lt;/span&gt;folder and paste that &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;lib&lt;/span&gt; folder. This is the only manual step that requires due attention. Rest is just configuration and synchronization!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Configure &lt;a href="http://www.javarebel.com"&gt;Java Rebel&lt;/a&gt; as laid out in the earlier post. However, put the Java Rebel settings in &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;JBossDir/bin/run.bat&lt;/span&gt; file.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Ensure the classpath of your Maven project in your IDE has all the Java paths and resources folders. Also ensure that the output directory for your project classpath is &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;myProject-&gt;target-&gt;classes&lt;/span&gt; folder&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Using FileSync plugin, synchronize two folders (from within Eclipse)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;MavenProject-&gt;web-&gt;src-&gt;main-&gt;webapp&lt;/span&gt; to &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;deployDir-&gt;myproject.war folder&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;MavenProject-&gt;target-&gt;classe&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;s&lt;/span&gt; to &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;deployDir-&gt;myproject.war-&gt;WEB-INF-&gt;classes&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;That's it.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Continue coding, run JBoss in background from the console using run.bat file in JBoss/bin directory. Save your file (.java, .js, .ftl, .vm, .xml) and check it immediately in your browser.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Smart Coding....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7661682192407470505-8402711076693098488?l=mittaldesigns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mittaldesigns.blogspot.com/feeds/8402711076693098488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mittaldesigns.blogspot.com/2009/05/exploded-hot-deployment-with-maven-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7661682192407470505/posts/default/8402711076693098488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7661682192407470505/posts/default/8402711076693098488'/><link rel='alternate' type='text/html' href='http://mittaldesigns.blogspot.com/2009/05/exploded-hot-deployment-with-maven-and.html' title='Exploded Hot deployment with Maven and Java Rebel outside IDE'/><author><name>Saurabh Mittal</name><uri>http://www.blogger.com/profile/16109939176584939713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7661682192407470505.post-9122844912157362718</id><published>2009-04-11T23:27:00.000-07:00</published><updated>2009-04-22T22:04:12.335-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse Maven Ant Spring Rebel Hot Swap Deployment'/><title type='text'>Eclipse, Maven, Java Rebel, and Hot Swap/Deployment</title><content type='html'>&lt;b&gt;Hot Swap:&lt;/b&gt;&lt;br /&gt;The ability to load the .class files dynamically at run-time&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hot Deployment:&lt;/b&gt;&lt;br /&gt;The ability to deploy the .class files in Application/Web server at run-time&lt;br /&gt;&lt;br /&gt;How do you do it?&lt;br /&gt;Many solutions and no silver bullet yet!&lt;br /&gt;&lt;br /&gt;One such solution follows....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color:#000099;"&gt;&lt;strong&gt;Tools you need:&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Eclipse&lt;/strong&gt; (tested with Ver. 3.4). Ensure WTP is installed&lt;/li&gt;&lt;li&gt;&lt;strong&gt;FileSync&lt;/strong&gt; eclipse plugin&lt;br /&gt;Download and install from &lt;a href="http://andrei.gmxhome.de/filesync/index.html"&gt;http://andrei.gmxhome.de/filesync/index.html&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;JBoss-Tools eclipse plugin&lt;/strong&gt;&lt;br /&gt;Download and install from &lt;a href="http://www.jboss.org/tools/download"&gt;http://www.jboss.org/tools/download&lt;/a&gt;&lt;br /&gt;We need to configure JBoss server within Eclipse. The one provided by WTP is not advanced enough. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Maven/Ant&lt;/strong&gt; (if your project uses it)&lt;br /&gt;Any conventional directory structure is fine&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Java-Rebel .jar&lt;/strong&gt; (license required)&lt;br /&gt;Download Trial version from &lt;a href="http://www.zeroturnaround.com/javarebel/download/"&gt;http://www.zeroturnaround.com/javarebel/download/&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;The Key Enabler (...with some limitations):&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Java Rebel provides a seamless solution to a good extent&lt;/li&gt;&lt;li&gt;Has an Annual license of $59/user&lt;/li&gt;&lt;li&gt;EXPLORE: &lt;a href="http://www.zeroturnaround.com/javarebel/"&gt;http://www.zeroturnaround.com/javarebel/&lt;/a&gt; &lt;/li&gt;&lt;li&gt;BUY: &lt;a href="http://sales.zeroturnaround.com/"&gt;http://sales.zeroturnaround.com/&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The website also lists the comparison &lt;a href="http://www.zeroturnaround.com/javarebel/comparison/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#000099;"&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Configuration Steps:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Ensure all the plugins are installed&lt;/li&gt;&lt;li&gt;Ensure eclipse is using JDK as Java runtime&lt;/li&gt;&lt;li&gt;Enable JBoss Server View &lt;/li&gt;&lt;li&gt;Configure JBoss Server ...including Java-Rebel settings&lt;/li&gt;&lt;li&gt;Checkout code using SVN and create your default Java project. Assuming Maven structure, build once using console and charge-up your local .m2 repository&lt;/li&gt;&lt;li&gt;Create empty eclipse WTP Dynamic Web Project&lt;/li&gt;&lt;li&gt;Link src and resources folder in WTP_Project to the above Maven-Java project&lt;/li&gt;&lt;li&gt;Copy ‘lib’ folder from ear/target folder into WEB-INF/lib in WTP project&lt;/li&gt;&lt;li&gt;FileSync web/src/main/webapp to WTP_Project/WebContent folder&lt;/li&gt;&lt;li&gt;Set output path for your WTP_Project as WEB-INF/classes&lt;/li&gt;&lt;li&gt;Fire up your server from within Eclipse&lt;/li&gt;&lt;li&gt;Any code changes you’ll make are in your Maven project&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;JBoss Server View settings:&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Automatically publish set to 0 sec&lt;/li&gt;&lt;li&gt;Server start timeout increased &gt;300s&lt;/li&gt;&lt;li&gt;Custom Deploy directories&lt;/li&gt;&lt;li&gt;JMX admin password &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;JBoss Launch Configuration VM arguments in JBoss Server View:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Dprogram.name="JBossTools JBoss 4.0 Runtime" -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs="C:/NOSCAN/jboss-4.0.5/lib/endorsed"  &lt;strong&gt;-noverify -javaagent:C:/javarebel-2.0/javarebel.jar  -Drebel.spring_plugin=true -Drebel.aspectj_plugin=true&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;/strong&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:130%;color:#000099;"&gt;The BOTTOM LINE&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;No ‘build’ segment&lt;br /&gt;   ◦Code in Eclipse is always “Build Automatically”&lt;/li&gt;&lt;li&gt;No ‘deploy’ segment&lt;br /&gt;   ◦If you abide by the Java-rebel capabilities&lt;/li&gt;&lt;li&gt;Rapid feedback (including Spring IoC)&lt;br /&gt;   ◦All spring layers (controller, command, dao, Beans)&lt;/li&gt;&lt;li&gt;Original code base not affected by Eclipse WTP project&lt;/li&gt;&lt;li&gt;Occasional restart of Jboss within Eclipse, when&lt;br /&gt;   ◦Redefining Interface&lt;br /&gt;   ◦Updating ‘static’ block&lt;/li&gt;&lt;li&gt;No JBoss Crashing in Eclipse with JBoss Tools plugin…so far.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;ENJOY.....and smart coding...&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7661682192407470505-9122844912157362718?l=mittaldesigns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mittaldesigns.blogspot.com/feeds/9122844912157362718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mittaldesigns.blogspot.com/2009/04/eclipse-maven-java-rebel-and-hot.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7661682192407470505/posts/default/9122844912157362718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7661682192407470505/posts/default/9122844912157362718'/><link rel='alternate' type='text/html' href='http://mittaldesigns.blogspot.com/2009/04/eclipse-maven-java-rebel-and-hot.html' title='Eclipse, Maven, Java Rebel, and Hot Swap/Deployment'/><author><name>Saurabh Mittal</name><uri>http://www.blogger.com/profile/16109939176584939713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
