Skip to content
Kohei Tamura edited this page May 27, 2017 · 14 revisions

To develop on eclipse:

mvn eclipse:eclipse

To build war and runnable jar:

mvn package

To start by mvn command:

mvn clean install exec:exec

To start by runnable jar:

java -jar easybuggy.jar

w/ JVM options:

-Xmx256m -XX:MaxPermSize=64m -XX:MaxDirectMemorySize=90m -XX:+UseSerialGC -Xloggc:logs/gc.log -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=10M -XX:GCTimeLimit=15 -XX:GCHeapFreeLimit=50 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=logs/ -XX:ErrorFile=logs/hs_err_pid%p.log -XX:NativeMemoryTracking=summary -agentlib:jdwp=transport=dt_socket,server=y,address=9009,suspend=n -Dderby.stream.error.file=logs/derby.log -Dderby.infolog.append=true -Dderby.language.logStatementText=true -Dderby.locks.deadlockTrace=true -Dderby.locks.monitor=true -Dderby.storage.rowLocking=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7900 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

To start by another container, for example Tomcat:

cp ROOT.war ${CATALINA_HOME}/webapps/
${CATALINA_HOME}/bin/startup.sh

To attach a remote debugger:

  • Connection type: Standard (Socket Listen)
  • Host: localhost
  • Port: 9009

[Extra] To develop quickly on terminal:

git clone https://github.com/k-tamura/easybuggy
cd easybuggy
cp src/main/java/org/t246osslab/easybuggy/TestServlet.java src/main/java/org/t246osslab/easybuggy/exceptions/NewServlet.java
grep -l "Test" src/main/java/org/t246osslab/easybuggy/exceptions/NewServlet.java | xargs perl -i -pe "s/Test/New/g"
grep -l "test" src/main/java/org/t246osslab/easybuggy/exceptions/NewServlet.java | xargs perl -i -pe "s/test/new/g"
vi src/main/java/org/t246osslab/easybuggy/exceptions/NewServlet.java
mvn clean install exec:exec
curl http://localhost:8080/new

how2dev

Clone this wiki locally