Permalink
Browse files

added demo web application

  • Loading branch information...
1 parent ae39cce commit 0d9bb184d0efe4823c4ad73f086d14cc045e8033 @jetztgradnet committed Apr 25, 2012
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
+ <classpathentry sourcepath="/Users/wolfgang/.gradle/caches/artifacts-8/filestore/javax.servlet/servlet-api/2.5/source/21599814ad9a605b86f3e6381571beccd861a32/servlet-api-2.5-sources.jar" kind="lib" path="/Users/wolfgang/.gradle/caches/artifacts-8/filestore/javax.servlet/servlet-api/2.5/jar/5959582d97d8b61f4d154ca9e495aafd16726e34/servlet-api-2.5.jar" exported="true"/>
+</classpath>
View
@@ -0,0 +1,2 @@
+.gradle/
+build/
View
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>buggyweb</name>
+ <comment/>
+ <projects/>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments/>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments/>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments/>
+ </buildCommand>
+ </buildSpec>
+ <linkedResources/>
+</projectDescription>
@@ -0,0 +1,13 @@
+#
+#Wed Apr 25 02:43:51 CEST 2012
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="2.0">
+ <wb-module deploy-name="buggyweb">
+ <property name="context-root" value="buggyweb"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
+ <wb-resource deploy-path="/" source-path="src/main/webapp"/>
+ </wb-module>
+</project-modules>
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.web" version="2.4"/>
+ <installed facet="jst.java" version="5.0"/>
+</faceted-project>
View
@@ -0,0 +1,68 @@
+h1. YouDebug demo
+
+h2. Build demo app
+
+./gradlew war
+
+h2. run demo app in Eclipse debugger
+start web application "buggyweb" on a servlet runtime
+browse to "http://localhost:8080/buggyweb/MyServlet":http://localhost:8080/buggyweb/MyServlet
+
+h2. run demo app in Tomcat
+
+bc.
+cd $CATALINA_HOME
+bin/catalina.sh jpda start
+
+browse to "http://localhost:8080/buggyweb/MyServlet":http://localhost:8080/buggyweb/MyServlet
+
+h3. show Tomcat log file
+
+bc.
+tail -30f logs/localhost.`date +%Y-%m-%d`.log
+
+
+h2. Run demo app in Jetty
+
+export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001"
+./gradlew jettyRun
+
+browse to "http://localhost:8081/buggyweb/MyServlet":http://localhost:8081/buggyweb/MyServlet
+
+
+h3. line break
+
+bc.
+./youdebug -socket 8000 linebreak.ydb
+./youdebug -socket 8001 linebreak.ydb
+
+h3. diagnostics: exception
+
+bc.
+./youdebug -socket 8000 exception.ydb
+./youdebug -socket 8001 exception.ydb
+
+
+h3. diagnostics: parameter check
+
+bc.
+./youdebug -socket 8000 diagnose.ydb
+./youdebug -socket 8001 diagnose.ydb
+
+h3. First fix
+
+bc.
+./youdebug -socket 8000 firstbugfix.ydb
+./youdebug -socket 8001 firstbugfix.ydb
+
+h3. Final fix
+
+bc.
+./youdebug -socket 8000 finalbugfix.ydb
+./youdebug -socket 8001 finalbugfix.ydb
+
+h3. threaddump
+
+bc.
+./youdebug -socket 8000 threaddump.ydb
+./youdebug -socket 8001 threaddump.ydb
Binary file not shown.
View
@@ -0,0 +1,24 @@
+apply plugin: 'war'
+apply plugin: 'eclipse'
+apply plugin: 'eclipse-wtp'
+apply plugin: 'jetty'
+
+archivesBaseName = "buggyweb"
+
+repositories {
+ //flatDir { dirs "lib" }
+ mavenCentral()
+}
+
+dependencies {
+ providedCompile "javax.servlet:servlet-api:2.5"
+}
+
+// Jetty HTTP port, when run as gradle jettyRun
+httpPort = 8081
+
+task wrapper(type: Wrapper) {
+ //gradleVersion = '1.0'
+ gradleVersion = '1.0-milestone-8'
+}
+
View
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001"
Binary file not shown.
@@ -0,0 +1,6 @@
+#Wed Apr 25 02:35:27 CEST 2012
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-8-bin.zip
View
@@ -0,0 +1,168 @@
+#!/bin/bash
+
+##############################################################################
+## ##
+## Gradle wrapper script for UN*X ##
+## ##
+##############################################################################
+
+# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
+# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
+# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
+
+GRADLE_APP_NAME=Gradle
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set JAVA_HOME if it's not already set.
+if [ -z "$JAVA_HOME" ] ; then
+ if $darwin ; then
+ [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
+ [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
+ else
+ javaExecutable="`which javac`"
+ [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ export JAVA_HOME="$javaHome"
+ fi
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
+CLASSPATH=`dirname "$0"`/gradle/wrapper/gradle-wrapper.jar
+WRAPPER_PROPERTIES=`dirname "$0"`/gradle/wrapper/gradle-wrapper.properties
+# Determine the Java command to use to start the JVM.
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="java"
+ fi
+fi
+if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+if [ -z "$JAVA_HOME" ] ; then
+ warn "JAVA_HOME environment variable is not set"
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
+if $darwin; then
+ JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
+# we may also want to set -Xdock:image
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+GRADLE_APP_BASE_NAME=`basename "$0"`
+
+exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
+ -classpath "$CLASSPATH" \
+ -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
+ -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
+ $STARTER_MAIN_CLASS \
+ "$@"
Oops, something went wrong.

0 comments on commit 0d9bb18

Please sign in to comment.