tag:blogger.com,1999:blog-22738524117612196102007-08-27T18:03:40.989-07:00Seam tricks and tutorialsdevshedhttp://www.blogger.com/profile/14192534284955133424noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-2273852411761219610.post-65968760981886167772007-08-07T14:33:00.000-07:002007-08-20T10:39:17.574-07:00Seamless Source Code Managment<span style=";font-family:arial;font-size:85%;" >Lets address source code organization and synchronization of teams. Everyone wants to have a standard environment when developing applications in groups. Really in my experience, it's critical. Honestly this is one thing that is really easy to do AND costs larger teams millions of dollars and jeopardizes deadlines .<br /><br />Apache <a href="http://maven.apache.org/">maven</a> + <a href="http://subversion.tigris.org/project_packages.html">SVN</a> is great for keeping environments synchronized and for painless deployment of applications. SVN is great for source control and maven for build management and deployment builds. Mavens real strengths over ANT is dynamic dependency compilation and managing compatible versions.<br /><br />but before we get into that lets start with a few standards. Here's what I use for my primary development environment:<br /><br />8/7/07<br />-------------------------<br /><a href="http://www.ubuntu.com">Ubuntu</a> 7.04<br /><a href="http://eclipse.org/">Eclipse</a> 3.3<br /><a href="http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=193295">Jboss 4.0</a> (Via GEMS installer)<br /><a href="http://labs.jboss.com/jbossseam/download/index.html">Seam</a> 1.2.1GA<br /><br /><br /></span><div class="wikipage" style="font-family:arial;"> <div id="searchable"><h2 id="ServerSoftwareConfiguration"><span style="font-size:85%;">Server Software Configuration<span style="text-decoration: underline;"></span></span></h2><h2 id="ServerSoftwareConfiguration"><span style="font-size:85%;"><span style="text-decoration: underline;"></span>The following is where each of these server components would be installed on a server. Not that they would all be running at the same time. In each of these instances the final element of the path. Bare in mind </span><span style=";font-family:arial;font-size:85%;" >this is for setting paths on linux. For win32 users it's all done in the control panel's "system" applet . Just look under the Advanced tab you can create these variables in the user environment box at the top of the tab panel.<br /></span></h2> <p><span style="font-size:85%;">is a symbolic link to the actual installation. ex: /development/servers/tomcat is a symbolic link (ln -s) to: /development/servers/apache-tomcat-6.0.13. <span style="font-weight: bold;">This is so that we can up grade versions and roll back just by changing the symbolic link on the fly</span>.<br /></span></p><p><span style="font-size:85%;">The directory roots are:<br /></span> </p> <p><span style="font-size:85%;"> /development/SDKs/<br />The SDKs directory is for different Java distros , Jruby or Python </span></p> <p><span style="font-size:85%;"> /development/servers/<br />This is where we locate our server software like Resin, Apache, Jboss etc etc .. Always in this directory so we know the<br />deployment standards. Nothing is worse than wasting hours working on the wrong files or checking out old versions<br /></span> </p> <p><span style="font-size:85%;"> /development/tools/<br />The tools directory is for build, testing and management tools. SVN (while technically a server), CSV, Maven, ANT and Junit etc<br /></span> </p> <p><span style="font-size:85%;"> /development/libs/<br />All other libs, hibernate, Seam , Spring, apache commons , flavor of the day.<br /></span> </p> <p><span style="font-size:85%;"> We declare the environment variables in the <span style="font-weight: bold; font-style: italic;">/etc/profile</span> that loads at system initialization. we will use the following convention:</span></p><p><span style="font-size:85%;"> <object><%app_name%>_HOME</object></span></p><p><span style="font-size:85%;">JAVA_HOME=/development/SDKs/java </span></p> <p><span style="font-size:85%;"> GLASSFISH_HOME=/development/servers/glassfish<br />JBOSS_HOME=/development/servers/jboss<br />CATILINA_HOME=/development/servers/tomcat<br /><br />ANT_HOME=/development/tools/ant<br />MAVEN_HOME=/development/tools/maven<br /><br />HIBERNATE_HOME=/development/libs/hibernate<br />SEAM_HOME=/development/libs/seam<br />SPRING_HOME=/development/libs/spring<br /><br />CLASSPATH=$CLASSPATH:$SPRING_HOME:$SEAM_HOME:$HIBERNATE_HOME:$MAVEN_HOME:$ANT_HOME:$CATILINA_HOME:$JBOSS_HOME </span> </p> <p><span style="font-size:85%;"> PATH=$PATH:$ANT_HOME/bin:$MAVEN_HOME/bin:$JAVA_HOME/bin.......... etc etc </span></p> </div> </div><span style=";font-family:arial;font-size:85%;" ><br />-- Richard Corsale<br /><br /></span>devshedhttp://www.blogger.com/profile/14192534284955133424noreply@blogger.com