tomcat.sh 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. echo off
  3. echo [INFO] Use maven tomcat-plugin run the project.
  4. CWD=`pwd`
  5. cd $CWD
  6. cd ..
  7. mvn compile -o -e
  8. echo --------------------- Set Jrebel ---------------------
  9. export REBEL_HOME=./bin
  10. export REBEL_CLASS_PATH=./target/classes
  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 ---------------------
  22. export MAVEN_OPTS="$JMX_OPTS $MAVEN_OPTS -XX:MaxPermSize=256m"
  23. echo ${MAVEN_OPTS}
  24. echo --------------------- RUN ---------------------
  25. mvn tomcat:run -Dmaven.test.skip=true -e -o