jetty-debug.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. echo off
  2. echo [INFO] Use maven jetty-plugin run the project, with debug options.
  3. CWD=`pwd`
  4. cd $CWD
  5. cd ..
  6. mvn compile -e -o
  7. echo --------------------- Set Jrebel ---------------------
  8. export REBEL_HOME=./bin
  9. export REBEL_CLASS_PATH=./target/classes
  10. export REBEL_RESOURCES_PATH=./src/main/webapp
  11. export MAVEN_OPTS="$MAVEN_OPTS -javaagent:$REBEL_HOME/jrebel.jar -noverify -Drebel.spring_plugin=true -Drebel.hibernate_plugin=true"
  12. export MAVEN_OPTS="$MAVEN_OPTS -Drebel.dirs=$REBEL_CLASS_PATH"
  13. echo ${MAVEN_OPTS}
  14. echo --------------------- Set Jmxremote ---------------------
  15. export JMX_OPTS=
  16. export JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote=true"
  17. export JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.port=9090"
  18. export JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.ssl=false"
  19. export JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
  20. echo ${JMX_OPTS}
  21. echo --------------------- Set Maven Debug ---------------------
  22. export MAVEN_OPTS="$JMX_OPTS $MAVEN_OPTS -XX:MaxPermSize=128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
  23. #export MAVEN_OPTS="$MAVEN_OPTS -XX:MaxPermSize=128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
  24. echo ${MAVEN_OPTS}
  25. echo --------------------- RUN ---------------------
  26. mvn -Djetty.port=9091 jetty:run -Dmaven.test.skip=true -e -o