Saturday, June 4, 2011

using Jetty 7

  1. more read is at jetty and jetty-maven
  2.  jrebel options is at jrebel
  3. my way of working with eclipse and refresh with jetty is as follows:
  4. org.mortbay.jetty; jetty-maven-plugin;7.2.2.v20101205
  5. put this in my-rsynch.sh
    exclude_files=pom.xml
    from_dir=./target/classes/
    copy_dir=./src/main/webapp/WEB-INF/classes/
    
    rsync -avz --stats --exclude=$exclude_files $from_dir $copy_dir 
    | grep "Number of files transferred" 
  6. Create a trigger from eclipse auto build
  7. Goto Projcet=Properties=Builders, Choose  ="Program"
  8. Select workspace/my-rsynch.sh and workspace at "Main" tab
  9. at "Build Options" Tab make sure "During Auto Builds" is enabled
  10. If you want more, you can use the "resources to be monitored for build to be triggered too (use full in multi-module project".
  11. Also make sure "Project" = "Build Automatically" is also checked.
  12. to use jrebel along with maven
  13. in console do as (once) export MAVEN_OPTS="-noverify -javaagent:$REBEL_HOME/jrebel.jar $MAVEN_OPTS"
  14. then run mvn jetty:run
  15. include this in .project file
    
       org.eclipse.ui.externaltools.ExternalToolBuilder
       auto,full,incremental,
       
        
         LaunchConfigHandle
         <project>/.externalToolBuilders/myRsyncClasses.launch
        
       
      
    
    


  16. inside file named ".externalToolBuilders/myRsyncClasses.launch"

    make sure "jpetstore" is changed to your workspace name!