├── .gitignore ├── .idea ├── .gitignore ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── gradle.xml ├── kotlinc.xml └── misc.xml ├── .run └── Run IDE with Plugin.run.xml ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── build.gradle.kts ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── libs ├── provided │ ├── README.txt │ └── jetty-runner-9.3.28.v20191105.jar └── test │ ├── cglib-nodep-2.2.2.jar │ ├── javassist-3.21.0-GA.jar │ ├── junit-4.11.jar │ ├── mockito-all-1.9.5.jar │ ├── objenesis-2.6.jar │ └── powermock-mockito-release-full-1.5.6-full.jar ├── settings.gradle.kts └── src ├── main ├── kotlin │ └── com │ │ └── github │ │ └── guikeller │ │ └── jettyrunner │ │ ├── conf │ │ ├── JettyRunnerConfigurationFactory.kt │ │ └── JettyRunnerConfigurationType.kt │ │ ├── model │ │ ├── JettyRunnerCommandLine.kt │ │ └── JettyRunnerConfiguration.kt │ │ ├── runner │ │ ├── JettyProgramDebugger.kt │ │ └── JettyProgramRunner.kt │ │ ├── ui │ │ ├── JettyRunnerConfPanel.form │ │ ├── JettyRunnerConfPanel.kt │ │ └── JettyRunnerEditor.kt │ │ └── util │ │ └── IconUtil.kt └── resources │ └── META-INF │ ├── jetty-icon.png │ └── plugin.xml └── test ├── kotlin └── com │ └── github │ └── guikeller │ └── jettyrunner │ └── README.md └── resources ├── checkstyle.xml ├── checkstyle.xslt ├── cpd.xslt └── jetty-icon.png /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | build/ 3 | !gradle/wrapper/gradle-wrapper.jar 4 | !**/src/main/**/build/ 5 | !**/src/test/**/build/ 6 | 7 | ### IntelliJ IDEA ### 8 | .idea/modules.xml 9 | .idea/jarRepositories.xml 10 | .idea/compiler.xml 11 | .idea/libraries/ 12 | *.iws 13 | *.iml 14 | *.ipr 15 | out/ 16 | !**/src/main/**/out/ 17 | !**/src/test/**/out/ 18 | 19 | ### Eclipse ### 20 | .apt_generated 21 | .classpath 22 | .factorypath 23 | .project 24 | .settings 25 | .springBeans 26 | .sts4-cache 27 | bin/ 28 | !**/src/main/**/bin/ 29 | !**/src/test/**/bin/ 30 | 31 | ### NetBeans ### 32 | /nbproject/private/ 33 | /nbbuild/ 34 | /dist/ 35 | /nbdist/ 36 | /.nb-gradle/ 37 | 38 | ### VS Code ### 39 | .vscode/ 40 | 41 | ### Mac OS ### 42 | .DS_Store -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.run/Run IDE with Plugin.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 17 | 19 | true 20 | true 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | Found a bug in the code, or have an idea for a feature?
4 | Here are some notes on how to best report them so we can get it fixed as quickly as possible. 5 | 6 | ## New Features 7 | 8 | Here is a quick guideline on how to request a new feature: 9 | - Open up a new issue and try to be as detailed as possible. 10 | - Try describing it as a story - [Here is a How To](https://help.rallydev.com/writing-great-user-story) 11 | - Optionally, if you can provide a mock up that would be great too. 12 | - Pull Requests are also very much welcome. 13 | 14 | ## Issues 15 | 16 | Found a bug? 17 | Here are some notes on how to report the bug so we can fix it as fast as possible: 18 |

19 | Did you follow the Getting Started? I need to be able to replicate the issue / bug!
20 | https://github.com/guikeller/jetty-runner/wiki/Getting-Started 21 |

22 | First have a look on the https://github.com/guikeller/jetty-runner/issues (open and closed issues) and if the issue is not there please do raise a new issue. 23 | 24 | While raising an issue please provide the following info below. 25 | - Explain, as detailed as possible, how to reproduce the issue / bug. 26 | - Include what you expected to happen, as well as what actually happened and logs. 27 | - Provide your environment details; JVM Version, Plugin Version, IntelliJ Version 28 | - If it helps, feel free to [attach a 29 | screenshot](https://github.com/blog/1347-issue-attachments) or video 30 | illustrating the issue. 31 | 32 | ## Pull Requests 33 | 34 | Know how to fix something? Create a pull request! Here's a quick guide: 35 | 36 | - [Check for open issues](https://github.com/guikeller/jetty-runner/issues), or 37 | open a fresh issue to start a discussion around a feature idea or a bug. 38 | Opening a separate issue to discuss the change is less important for smaller 39 | changes, as the discussion can be done in the pull request. 40 | - Fork the relevant repository on GitHub, and start making your changes. 41 | - Push the change (please use a separate branch for your feature). 42 | - Open a pull request. 43 | - I will try to merge and deploy changes as soon as possible, or at least leave 44 | some feedback, but if you haven't heard anything after a couple of days, 45 | feel free to leave a comment on the pull request. 46 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) - 2014 - Gui Keller 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | http://opensource.org/licenses/MIT -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Jetty-Runner 2 | ============ 3 |
4 |


5 | A plugin that allows you to quickly run Jetty from IntelliJ IDEA.
6 |
7 | If you require full support please consider buying the IntelliJ IDEA Enterprise Edition.
8 | This plugin should be Win / Mac / Linux compatible.
9 | Please leave us a star if you are using the plugin, thanks! :smile:
10 |
11 | Compatible with servlet-api versions: 3.1, 3.0, 2.5, 2.4, 2.3, 2.2.
12 | Protocols: HTTP / 1.1 (RFC 7230), HTTP / 2 (RFC 7540), WebSocket (RFC 6455, JSR 356), FastCGI.
13 |
14 | Project page: https://plugins.jetbrains.com/plugin/7505
15 |
16 | Minimum requirement: JVM / JDK / JRE v8
17 | tags: jetty, container, webapp, runner, tomcat, runner
18 |
19 | Features:
20 | 1) Required values are automatically discovered and set.
21 | 2) Run and Debug - out of the box.
22 | 3) User friendly UI - created using IntelliJ.
23 | 4) Internal code is documented and it is relatively easy to follow / read.
24 | 5) A good coverage of unit tests.
25 | 6) Use the jetty-runner version you wish
26 | 27 | PLEASE READ THE: Getting Started
28 | https://github.com/guikeller/jetty-runner/wiki/Getting-Started 29 | 30 |

31 | Many thanks to the following collaborations:
32 | @tchudyk - Pull Request #1
33 | @dcritchl - Pull Request #3
34 | @emongstad - Pull Request #46
35 | @aaitmouloud - Pull Request #61
36 | @achievec - Pull Request #77
37 |

38 | 39 |

40 | How can I help?
41 | You can help by: raising bugs, feature requests, and simply using the plugin.
42 | How can I donate?
43 | Rate the plugin 5(five) stars on the Jetbrains Marketplace, that would be great.
44 |

45 | 46 |

47 |

Project no longer supported by JetBrains

48 | Yeah that's right, on the bright side, we have reached 200000+ downloads!
49 | Many thanks to all of you that have used the plugin for so long. 50 |

51 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("java") 3 | id("org.jetbrains.kotlin.jvm") version "1.9.21" 4 | id("org.jetbrains.intellij") version "1.16.1" 5 | } 6 | 7 | group = "com.github.guikeller.jettyrunner" 8 | version = "2.0.1" 9 | 10 | repositories { 11 | mavenCentral() 12 | } 13 | 14 | dependencies { 15 | api(fileTree("libs/provided") { include("*.jar") }) 16 | testImplementation(fileTree("libs/test") { include("*.jar") }) 17 | } 18 | 19 | // Configure Gradle IntelliJ Plugin 20 | // Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html 21 | intellij { 22 | version.set("2023.1.5") 23 | type.set("IC") // Target IDE Platform 24 | 25 | plugins.set(listOf("com.intellij.java")) 26 | 27 | } 28 | 29 | tasks { 30 | // Set the JVM compatibility versions 31 | withType { 32 | sourceCompatibility = "17" 33 | targetCompatibility = "17" 34 | } 35 | withType { 36 | kotlinOptions.jvmTarget = "17" 37 | } 38 | 39 | patchPluginXml { 40 | sinceBuild.set("231") 41 | untilBuild.set("241.*") 42 | } 43 | 44 | signPlugin { 45 | certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) 46 | privateKey.set(System.getenv("PRIVATE_KEY")) 47 | password.set(System.getenv("PRIVATE_KEY_PASSWORD")) 48 | } 49 | 50 | publishPlugin { 51 | token.set(System.getenv("PUBLISH_TOKEN")) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib 2 | kotlin.stdlib.default.dependency = false 3 | 4 | # Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html 5 | org.gradle.configuration-cache = true 6 | 7 | # Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html 8 | org.gradle.caching = true 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /libs/provided/README.txt: -------------------------------------------------------------------------------- 1 | You can find the jetty-runner jar from this folder here: 2 | https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-runner/ 3 | -------------------------------------------------------------------------------- /libs/provided/jetty-runner-9.3.28.v20191105.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/libs/provided/jetty-runner-9.3.28.v20191105.jar -------------------------------------------------------------------------------- /libs/test/cglib-nodep-2.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/libs/test/cglib-nodep-2.2.2.jar -------------------------------------------------------------------------------- /libs/test/javassist-3.21.0-GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/libs/test/javassist-3.21.0-GA.jar -------------------------------------------------------------------------------- /libs/test/junit-4.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/libs/test/junit-4.11.jar -------------------------------------------------------------------------------- /libs/test/mockito-all-1.9.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/libs/test/mockito-all-1.9.5.jar -------------------------------------------------------------------------------- /libs/test/objenesis-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/libs/test/objenesis-2.6.jar -------------------------------------------------------------------------------- /libs/test/powermock-mockito-release-full-1.5.6-full.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/libs/test/powermock-mockito-release-full-1.5.6-full.jar -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenCentral() 4 | gradlePluginPortal() 5 | } 6 | } 7 | 8 | rootProject.name = "jetty-runner" -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/conf/JettyRunnerConfigurationFactory.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.conf 2 | 3 | import com.github.guikeller.jettyrunner.model.JettyRunnerConfiguration 4 | import com.intellij.execution.configurations.ConfigurationFactory 5 | import com.intellij.execution.configurations.ConfigurationType 6 | import com.intellij.execution.configurations.RunConfiguration 7 | import com.intellij.execution.configurations.RunConfigurationSingletonPolicy 8 | import com.intellij.openapi.project.Project 9 | 10 | /** 11 | * Jetty Runner Configuration Factory 12 | * @see com.intellij.execution.configurations.ConfigurationFactory 13 | * 14 | * @author Guy Keller 15 | */ 16 | class JettyRunnerConfigurationFactory(type: ConfigurationType) : ConfigurationFactory(type) { 17 | override fun getId(): String { 18 | return super.getName() 19 | } 20 | 21 | override fun createTemplateConfiguration(project: Project): RunConfiguration { 22 | return JettyRunnerConfiguration(project, this, "Jetty-Runner") 23 | } 24 | 25 | override fun getSingletonPolicy(): RunConfigurationSingletonPolicy { 26 | return RunConfigurationSingletonPolicy.SINGLE_INSTANCE_ONLY 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/conf/JettyRunnerConfigurationType.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.conf 2 | 3 | import com.github.guikeller.jettyrunner.util.IconUtil 4 | import com.intellij.execution.configurations.ConfigurationFactory 5 | import com.intellij.execution.configurations.ConfigurationType 6 | import javax.swing.Icon 7 | 8 | /** 9 | * Jetty Runner Configuration Type 10 | * @see com.intellij.execution.configurations.ConfigurationType 11 | * 12 | * @author Guy Keller 13 | */ 14 | class JettyRunnerConfigurationType : ConfigurationType { 15 | override fun getDisplayName(): String { 16 | return "Jetty-Runner" 17 | } 18 | 19 | override fun getConfigurationTypeDescription(): String { 20 | return "Jetty-Runner" 21 | } 22 | 23 | override fun getIcon(): Icon { 24 | return IconUtil.getInstance().getIcon() 25 | } 26 | 27 | override fun getId(): String { 28 | return "Jetty-Runner" 29 | } 30 | 31 | override fun getConfigurationFactories(): Array { 32 | val factory = JettyRunnerConfigurationFactory(this) 33 | return arrayOf(factory) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/model/JettyRunnerCommandLine.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.model 2 | 3 | import com.intellij.execution.ExecutionException 4 | import com.intellij.execution.configurations.JavaCommandLineState 5 | import com.intellij.execution.configurations.JavaParameters 6 | import com.intellij.execution.runners.ExecutionEnvironment 7 | import com.intellij.openapi.roots.ProjectRootManager 8 | import com.intellij.openapi.project.Project 9 | import com.intellij.util.PathUtil 10 | 11 | /** 12 | * Jetty Runner Command Line - Runner Model - Holds the vars to Start / Execute Jetty 13 | * Visit - http://www.eclipse.org/jetty/documentation/current/runner.html 14 | * @see com.intellij.execution.configurations.JavaCommandLineState 15 | * 16 | * @author Guy Keller 17 | */ 18 | class JettyRunnerCommandLine(environment: ExecutionEnvironment, model: JettyRunnerConfiguration) : JavaCommandLineState(environment) { 19 | 20 | private var environment: ExecutionEnvironment = environment 21 | private var model: JettyRunnerConfiguration 22 | 23 | companion object { 24 | // The jetty-runner main class 25 | private const val JETTY_MAIN_CLASS = "org.eclipse.jetty.runner.Runner" 26 | } 27 | 28 | init { 29 | this.model = model 30 | } 31 | 32 | @Throws(ExecutionException::class) 33 | override fun createJavaParameters(): JavaParameters { 34 | val javaParams: JavaParameters = JavaParameters() 35 | javaParams.mainClass = JETTY_MAIN_CLASS 36 | // Use the same JDK as the project 37 | val project: Project = environment.project 38 | val manager: ProjectRootManager = ProjectRootManager.getInstance(project) 39 | javaParams.jdk = manager.projectSdk 40 | 41 | // All modules to use the same things 42 | val modules = model.modules 43 | if (modules.isNotEmpty()) { 44 | for (module in modules) { 45 | javaParams.configureByModule(module, JavaParameters.JDK_AND_CLASSES) 46 | } 47 | } 48 | 49 | // Dynamically adds the 'jetty-runner.jar' to the classpath 50 | val jettyRunnerjarPath = jettyRunnerJarPath 51 | javaParams.classPath.add(jettyRunnerjarPath) 52 | 53 | // Jetty XML - configured by the user 54 | val jettyXmls = this.jettyXmlPaths 55 | if (jettyXmls != null) { 56 | javaParams.programParametersList.addParametersString(jettyXmls) 57 | } 58 | // Port - configured by the user (default 8080) 59 | val port = this.port 60 | javaParams.programParametersList.addParametersString(port) 61 | // Dynamic variables - working directory 62 | val basePath = project.basePath 63 | javaParams.workingDirectory = basePath 64 | // Path - configured by the user 65 | val path = this.webAppPath 66 | javaParams.programParametersList.addParametersString(path) 67 | // Classes - configured by the user 68 | val classes = this.classesDirectory 69 | javaParams.programParametersList.addParametersString(classes) 70 | // VM Args 71 | val vmArgs = this.vmArgs 72 | if (vmArgs != null) { 73 | javaParams.vmParametersList.addParametersString(vmArgs) 74 | } 75 | // Env Vars 76 | val environmentVariables = this.envVars 77 | if (!environmentVariables.isNullOrEmpty()) { 78 | // Pass it through to the VM that will be created when running jetty-runner 79 | val keys = environmentVariables.keys 80 | for (key in keys) { 81 | val value = environmentVariables[key] 82 | javaParams.vmParametersList.addProperty(key, value) 83 | } 84 | } 85 | // All done, run it 86 | return javaParams 87 | } 88 | 89 | // - - - Helpers - - - 90 | 91 | /** 92 | * Retrieves the "path" parameter 93 | * Jetty expects: /Path1 /path/to/WebApps 94 | * @return String value 95 | */ 96 | private val webAppPath: String 97 | get() { 98 | val value = StringBuffer(" --path ") 99 | val paths = model.webappPaths 100 | val folders = model.webappFolders 101 | // Multiple values allowed - CSV 102 | var pathsArray = arrayOf() 103 | if (!paths.isNullOrEmpty()) { 104 | pathsArray = paths.split(",".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() 105 | } 106 | // Multiple values allowed - CSV 107 | var foldersArray = arrayOf() 108 | if (!folders.isNullOrEmpty()) { 109 | foldersArray = folders.split(",".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() 110 | } 111 | // Checking that we have paths and folders 112 | if (pathsArray.isNotEmpty() && foldersArray.isNotEmpty()) { 113 | // Creates the 'path' parameter 114 | for (i in pathsArray.indices) { 115 | val path = pathsArray[i] 116 | val folderPath = PathUtil.toPresentableUrl(foldersArray[i]!!) 117 | value.append(path).append(" ").append(folderPath).append(" ") 118 | } 119 | } else { 120 | throw IllegalArgumentException("Number of Path(s) and Folder(s) must match: $paths / $folders") 121 | } 122 | return value.toString() 123 | } 124 | 125 | /** 126 | * Retrieves the "classes" parameter 127 | * @return String 128 | */ 129 | private val classesDirectory: String 130 | get() { 131 | val classesDirectories = model.classesDirectories 132 | // Multiple values allowed - CSV 133 | var classesFolders: Array? = null 134 | if (!classesDirectories.isNullOrEmpty()) { 135 | classesFolders = classesDirectories.split(",".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() 136 | } 137 | // Creates the 'classes' parameter 138 | if (!classesFolders.isNullOrEmpty()) { 139 | val value = StringBuffer(" --classes ") 140 | for (classesFolder in classesFolders) { 141 | value.append(PathUtil.toPresentableUrl(classesFolder!!)).append(" ") 142 | } 143 | return value.toString() 144 | } 145 | throw IllegalArgumentException("Invalid classes folder: $classesDirectories") 146 | } 147 | 148 | /** 149 | * Retrieves the "config" parameter. 150 | * Using the specified jetty XML files 151 | * @return String 152 | */ 153 | private val jettyXmlPaths: String? 154 | get() { 155 | val xmls = model.jettyXml 156 | // Multiple values allowed - CSV 157 | var xmlArray: Array? = null 158 | if (!xmls.isNullOrEmpty()) { 159 | xmlArray = xmls.split(",".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() 160 | } 161 | // Creates the 'config' parameter 162 | if (!xmlArray.isNullOrEmpty()) { 163 | val value = StringBuffer(" --config ") 164 | for (jettyXml in xmlArray) { 165 | value.append(PathUtil.toPresentableUrl(jettyXml!!)).append(" ") 166 | } 167 | return value.toString() 168 | } 169 | return null 170 | } 171 | 172 | /** 173 | * Retrieves the "port" parameter 174 | * @return String 175 | */ 176 | private val port: String 177 | get() { 178 | val runningOnPort = model.runningOnPort 179 | //Single value - not optional 180 | if (!runningOnPort.isNullOrEmpty()) { 181 | return " --port $runningOnPort " 182 | } 183 | throw IllegalArgumentException("Invalid port: $runningOnPort") 184 | } 185 | 186 | /** 187 | * Retrieves the "VM Args" parameter 188 | * @return String 189 | */ 190 | private val vmArgs: String? 191 | get() { 192 | val vmArgs = model.vmArgs 193 | return if (!vmArgs.isNullOrEmpty()) vmArgs else null 194 | } 195 | 196 | /** 197 | * Retrieves the Env Vars 198 | * @return Map, String> 199 | */ 200 | private val envVars: Map? 201 | get() { 202 | val environmentVariables = model.environmentVariables 203 | if (!environmentVariables.isNullOrEmpty()) { 204 | return model.environmentVariables 205 | } 206 | return HashMap(0) 207 | } 208 | 209 | private val jettyRunnerJarPath: String? 210 | get() { 211 | val jettyRunnerJarPath = model.jettyRunnerJarPath 212 | if (jettyRunnerJarPath != null && jettyRunnerJarPath.trim { it <= ' ' }.isNotEmpty()) { 213 | return model.jettyRunnerJarPath 214 | } 215 | throw IllegalArgumentException("Invalid Jetty Runner Path: $jettyRunnerJarPath") 216 | } 217 | 218 | /** 219 | * Returns whether to pass through system / ide environment variables 220 | * @return boolean 221 | */ 222 | val isPassParentEnvironmentVariables: Boolean 223 | get() = model.isPassParentEnvironmentVariables 224 | 225 | fun setModel(model: JettyRunnerConfiguration) { 226 | this.model = model 227 | } 228 | 229 | } 230 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/model/JettyRunnerConfiguration.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.model 2 | 3 | import com.github.guikeller.jettyrunner.ui.JettyRunnerEditor 4 | import com.intellij.execution.ExecutionException 5 | import com.intellij.execution.Executor 6 | import com.intellij.execution.configuration.EnvironmentVariablesComponent 7 | import com.intellij.execution.configurations.ConfigurationFactory 8 | import com.intellij.execution.configurations.LocatableConfigurationBase 9 | import com.intellij.execution.configurations.RunProfileState 10 | import com.intellij.execution.configurations.RunProfileWithCompileBeforeLaunchOption 11 | import com.intellij.execution.runners.ExecutionEnvironment 12 | import com.intellij.openapi.module.Module 13 | import com.intellij.openapi.module.ModuleManager 14 | import com.intellij.openapi.options.SettingsEditor 15 | import com.intellij.openapi.project.Project 16 | import com.intellij.openapi.util.InvalidDataException 17 | import com.intellij.openapi.util.JDOMExternalizerUtil 18 | import com.intellij.openapi.util.WriteExternalException 19 | import org.jdom.Element 20 | import java.util.* 21 | 22 | /** 23 | * Jetty Runner Configuration - UI Model 24 | * @see com.intellij.execution.configurations.LocatableConfigurationBase 25 | * 26 | * @author Guy Keller 27 | */ 28 | class JettyRunnerConfiguration(private val project: Project, factory: ConfigurationFactory?, name: String?) : LocatableConfigurationBase(project, factory!!, name), RunProfileWithCompileBeforeLaunchOption { 29 | 30 | companion object { 31 | const val PREFIX: String = "JettyRunnerV130-" 32 | const val SELECTED_MODULE_NAME_FIELD: String = PREFIX + "SelectedModuleName" 33 | const val WEBAPP_PATH_FIELD: String = PREFIX + "WebAppPath" 34 | const val WEBAPP_FOLDER_FIELD: String = PREFIX + "WebAppFolder" 35 | const val CLASSES_DIRECTORY_FIELD: String = PREFIX + "ClassesDirectory" 36 | const val RUN_PORT_FIELD: String = PREFIX + "RunOnPort" 37 | const val JETTY_XML_FIELD: String = PREFIX + "JettyXML" 38 | const val JETTY_RUNNER_JAR_PATH: String = PREFIX + "JettyRunnerPath" 39 | const val VM_ARGS_FIELD: String = PREFIX + "VmArgs" 40 | const val PASS_PARENT_ENV_VARS_FIELD: String = PREFIX + "PassParentEnvVars" 41 | } 42 | 43 | // Getters and Setters 44 | @JvmField 45 | var webappPaths: String? = "" 46 | @JvmField 47 | var webappFolders: String? = "" 48 | @JvmField 49 | var classesDirectories: String? = "" 50 | 51 | @JvmField 52 | var runningOnPort: String? = "" 53 | @JvmField 54 | var jettyRunnerJarPath: String? = "" 55 | @JvmField 56 | var jettyXml: String? = "" 57 | @JvmField 58 | var vmArgs: String? = "" 59 | 60 | @JvmField 61 | var environmentVariables: Map? = HashMap(0) 62 | var isPassParentEnvironmentVariables: Boolean = false 63 | 64 | @JvmField 65 | var selectedModuleName: String? = "" 66 | 67 | 68 | override fun getConfigurationEditor(): SettingsEditor { 69 | // Instantiates a new UI (Conf Window) 70 | return JettyRunnerEditor(this) 71 | } 72 | 73 | @Throws(ExecutionException::class) 74 | override fun getState(executor: Executor, executionEnvironment: ExecutionEnvironment): RunProfileState { 75 | // Runner Model 76 | return JettyRunnerCommandLine(executionEnvironment, this) 77 | } 78 | 79 | // Persistence of values in disk 80 | @Throws(InvalidDataException::class) 81 | override fun readExternal(element: Element) { 82 | super.readExternal(element) 83 | // Reads the conf file into this class 84 | this.webappPaths = JDOMExternalizerUtil.readField(element, WEBAPP_PATH_FIELD) 85 | this.selectedModuleName = JDOMExternalizerUtil.readField(element, SELECTED_MODULE_NAME_FIELD) 86 | this.webappFolders = JDOMExternalizerUtil.readField(element, WEBAPP_FOLDER_FIELD) 87 | this.classesDirectories = JDOMExternalizerUtil.readField(element, CLASSES_DIRECTORY_FIELD) 88 | this.runningOnPort = JDOMExternalizerUtil.readField(element, RUN_PORT_FIELD) 89 | this.jettyXml = JDOMExternalizerUtil.readField(element, JETTY_XML_FIELD) 90 | this.jettyRunnerJarPath = JDOMExternalizerUtil.readField(element, JETTY_RUNNER_JAR_PATH) 91 | this.vmArgs = JDOMExternalizerUtil.readField(element, VM_ARGS_FIELD) 92 | val passParentEnvironmentVariablesValue = JDOMExternalizerUtil.readField(element, PASS_PARENT_ENV_VARS_FIELD) 93 | this.isPassParentEnvironmentVariables = passParentEnvironmentVariablesValue.toBoolean() 94 | EnvironmentVariablesComponent.readExternal(element, this.environmentVariables) 95 | } 96 | 97 | @Throws(WriteExternalException::class) 98 | override fun writeExternal(element: Element) { 99 | super.writeExternal(element) 100 | // Stores the values of this class into the parent 101 | JDOMExternalizerUtil.writeField(element, SELECTED_MODULE_NAME_FIELD, this.selectedModuleName) 102 | JDOMExternalizerUtil.writeField(element, WEBAPP_PATH_FIELD, this.webappPaths) 103 | JDOMExternalizerUtil.writeField(element, WEBAPP_FOLDER_FIELD, this.webappFolders) 104 | JDOMExternalizerUtil.writeField(element, CLASSES_DIRECTORY_FIELD, this.classesDirectories) 105 | JDOMExternalizerUtil.writeField(element, RUN_PORT_FIELD, this.runningOnPort) 106 | JDOMExternalizerUtil.writeField(element, JETTY_RUNNER_JAR_PATH, this.jettyRunnerJarPath) 107 | JDOMExternalizerUtil.writeField(element, JETTY_XML_FIELD, this.jettyXml) 108 | JDOMExternalizerUtil.writeField(element, VM_ARGS_FIELD, this.vmArgs) 109 | JDOMExternalizerUtil.writeField(element, PASS_PARENT_ENV_VARS_FIELD, isPassParentEnvironmentVariables.toString()) 110 | if (this.environmentVariables != null && !environmentVariables!!.isEmpty()) { 111 | EnvironmentVariablesComponent.writeExternal(element, environmentVariables!!) 112 | } 113 | } 114 | 115 | override fun getModules(): Array { 116 | val modules = ModuleManager.getInstance(this.project).modules 117 | if (this.selectedModuleName == null) { 118 | return modules 119 | } else { 120 | val selectedModule = Arrays.stream(modules).filter { module: Module -> selectedModuleName == module.name }.findFirst() 121 | if (modules.isNotEmpty()) { 122 | // if we found a selected module, we use it, otherwise, we add all modules 123 | if (selectedModule.isPresent) { 124 | return arrayOf(selectedModule.get()) 125 | } 126 | } 127 | return modules 128 | } 129 | } 130 | 131 | } 132 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/runner/JettyProgramDebugger.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.runner 2 | 3 | import com.intellij.debugger.engine.DebuggerUtils 4 | import com.intellij.execution.ExecutionException 5 | import com.intellij.execution.Executor 6 | import com.github.guikeller.jettyrunner.model.JettyRunnerConfiguration 7 | import com.intellij.debugger.impl.GenericDebuggerRunner 8 | import com.intellij.execution.configurations.* 9 | import com.intellij.execution.executors.DefaultDebugExecutor 10 | import com.intellij.execution.runners.ExecutionEnvironment 11 | import com.intellij.execution.ui.RunContentDescriptor 12 | 13 | 14 | /** 15 | * Jetty Program Debugger - Jetty Runner on Debug mode 16 | * @see com.intellij.debugger.impl.GenericDebuggerRunner 17 | * 18 | * @author Guy Keller 19 | */ 20 | class JettyProgramDebugger : GenericDebuggerRunner() { 21 | 22 | override fun canRun(executorId: String, runProfile: RunProfile): Boolean { 23 | // It can only run JettyRunnerConfigurations 24 | return executorId == DefaultDebugExecutor.EXECUTOR_ID && runProfile is JettyRunnerConfiguration 25 | } 26 | 27 | @Throws(ExecutionException::class) 28 | override fun createContentDescriptor(state: RunProfileState, 29 | environment: ExecutionEnvironment): RunContentDescriptor? { 30 | // Now we figure out if is the Debug button has been hit 31 | val executor: Executor = environment.executor 32 | // If was the debug, then we do some extra magic 33 | if (executor is DefaultDebugExecutor) { 34 | val debuggerPort: String = DebuggerUtils.getInstance().findAvailableDebugAddress(true) 35 | // Get hold of the JavaParameters 36 | val stateWithDebug: RunProfileState = addParamsToJavaCmdLine(state, debuggerPort) 37 | // Creating a 'Remote' configuration on the fly 38 | val connection: RemoteConnection = RemoteConnection(true, LOCALHOST, debuggerPort, false) 39 | // Attaches the remote configuration to the VM and then starts it up 40 | return super.attachVirtualMachine(stateWithDebug, environment, connection, true) 41 | } else { 42 | // If it was something else then we don't do anything special 43 | return super.createContentDescriptor(state, environment) 44 | } 45 | } 46 | 47 | @Throws(ExecutionException::class) 48 | private fun addParamsToJavaCmdLine(state: RunProfileState, debuggerPort: String): RunProfileState { 49 | val javaCommandLine: JavaCommandLine = state as JavaCommandLine 50 | val javaParameters: JavaParameters = javaCommandLine.javaParameters 51 | // Making the assumption that it's JVM 7 onwards 52 | javaParameters.vmParametersList.addParametersString(XDEBUG) 53 | // Debugger port 54 | val remotePort = JDWP + debuggerPort 55 | javaParameters.vmParametersList.addParametersString(remotePort) 56 | return javaCommandLine 57 | } 58 | 59 | companion object { 60 | // These are JVM 8 onwards hence why the JVM 8 as min requirement 61 | private const val XDEBUG = "-Xdebug" 62 | private const val JDWP = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=" 63 | 64 | private const val LOCALHOST = "127.0.0.1" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/runner/JettyProgramRunner.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.runner 2 | 3 | import com.github.guikeller.jettyrunner.model.JettyRunnerConfiguration 4 | import com.intellij.execution.configurations.RunProfile 5 | import com.intellij.execution.executors.DefaultRunExecutor 6 | import com.intellij.execution.impl.DefaultJavaProgramRunner 7 | 8 | /** 9 | * Jetty Program Runner - Default / Run 10 | * @see com.intellij.execution.impl.DefaultJavaProgramRunner 11 | * 12 | * @author Guy Keller 13 | */ 14 | class JettyProgramRunner : DefaultJavaProgramRunner() { 15 | 16 | override fun canRun(executorId: String, runProfile: RunProfile): Boolean { 17 | // It can only run JettyRunnerConfigurations 18 | return executorId == DefaultRunExecutor.EXECUTOR_ID && runProfile is JettyRunnerConfiguration 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/ui/JettyRunnerConfPanel.form: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 |
295 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/ui/JettyRunnerConfPanel.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.ui 2 | 3 | import com.intellij.execution.configuration.EnvironmentVariablesComponent 4 | import com.intellij.ui.components.fields.ExpandableTextField 5 | import java.awt.Cursor 6 | import java.awt.Desktop 7 | import java.awt.event.ActionEvent 8 | import java.awt.event.MouseAdapter 9 | import java.awt.event.MouseEvent 10 | import java.net.URI 11 | import javax.swing.* 12 | import kotlin.Exception 13 | import kotlin.RuntimeException 14 | import kotlin.String 15 | 16 | /** 17 | * View / Presentation - Created using the WYSIWYG editor. 18 | * Used the JGoodies Form Layout - which is BSD. 19 | * @author Guy Keller 20 | */ 21 | class JettyRunnerConfPanel { 22 | 23 | var mainPanel: JPanel? = null 24 | @JvmField 25 | var pathField: JTextField? = null 26 | @JvmField 27 | var webappField: JTextField? = null 28 | @JvmField 29 | var classesField: JTextField? = null 30 | @JvmField 31 | var runOnPortField: JTextField? = null 32 | @JvmField 33 | var xmlField: JTextField? = null 34 | private var browseButton: JButton? = null 35 | @JvmField 36 | var vmArgsField: ExpandableTextField? = null 37 | @JvmField 38 | var environmentVariables: EnvironmentVariablesComponent? = null 39 | 40 | private var spacerLabel: JLabel? = null 41 | private var vmArgsLabel: JLabel? = null 42 | private var xmlLabel: JLabel? = null 43 | private var runOnPortLabel: JLabel? = null 44 | private var classesLabel: JLabel? = null 45 | private var webappLabel: JLabel? = null 46 | private var pathLabel: JLabel? = null 47 | private var secondMsgLabel: JLabel? = null 48 | private var envVarLabel: JLabel? = null 49 | private var moduleLabel: JLabel? = null 50 | 51 | @JvmField 52 | var moduleComboBox: JComboBox? = null 53 | var jettyRunnerField: JTextField? = null 54 | private var jettyRunnerLabel: JLabel? = null 55 | private var jettyRunnerButton: JButton? = null 56 | private var mavenRepoButton: JButton? = null 57 | private var repoLabel: JLabel? = null 58 | private var jettyRunnerSpacer: JLabel? = null 59 | private var formPanel: JPanel? = null 60 | 61 | init { 62 | browseButton!!.addActionListener { _: ActionEvent? -> 63 | browseJettyXml() 64 | } 65 | repoLabel!!.addMouseListener(object : MouseAdapter() { 66 | override fun mouseClicked(e: MouseEvent) { 67 | goToMvnRepoOnBrowser() 68 | } 69 | 70 | override fun mouseEntered(e: MouseEvent) { 71 | repoLabel!!.cursor = Cursor(Cursor.HAND_CURSOR) 72 | } 73 | 74 | override fun mouseExited(e: MouseEvent) { 75 | repoLabel!!.cursor = Cursor(Cursor.DEFAULT_CURSOR) 76 | } 77 | }) 78 | jettyRunnerButton!!.addActionListener { _: ActionEvent? -> 79 | browseJettyRunnerJar() 80 | } 81 | } 82 | 83 | protected fun browseJettyXml() { 84 | // Shows a file chooser 85 | val fileChooser = JFileChooser() 86 | fileChooser.isMultiSelectionEnabled = true 87 | // Checking whether the user clicked okay 88 | val result = fileChooser.showOpenDialog(JFrame()) 89 | if (result == JFileChooser.APPROVE_OPTION) { 90 | val paths = StringBuffer() 91 | val selectedFiles = fileChooser.selectedFiles 92 | if (selectedFiles != null && selectedFiles.size > 0) { 93 | for (selectedFile in selectedFiles) { 94 | // Selected files in CSV format 95 | paths.append(selectedFile.absolutePath + ",") 96 | } 97 | // Removing the comma at the end 98 | val value = paths.substring(0, (paths.length - 1)) 99 | xmlField!!.text = value 100 | } 101 | } 102 | } 103 | 104 | private fun browseJettyRunnerJar() { 105 | // Shows a file chooser 106 | val fileChooser = JFileChooser() 107 | fileChooser.isMultiSelectionEnabled = false 108 | // Checking whether the user clicked okay 109 | val result = fileChooser.showOpenDialog(JFrame()) 110 | if (result == JFileChooser.APPROVE_OPTION) { 111 | val selectedFile = fileChooser.selectedFile 112 | if (selectedFile != null) { 113 | // Removing the comma at the end 114 | val value = selectedFile.absolutePath 115 | jettyRunnerField!!.text = value 116 | } 117 | } 118 | } 119 | 120 | private fun goToMvnRepoOnBrowser() { 121 | try { 122 | // Opens a browser (or new tab) and goes to the url below 123 | val mvnRepo = "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-runner/" 124 | val uri = URI(mvnRepo) 125 | Desktop.getDesktop().browse(uri) 126 | } catch (ex: Exception) { 127 | throw RuntimeException(ex.message, ex) 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/ui/JettyRunnerEditor.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.ui 2 | 3 | import com.github.guikeller.jettyrunner.model.JettyRunnerConfiguration 4 | import com.intellij.compiler.impl.ModuleCompileScope 5 | import com.intellij.notification.Notification 6 | import com.intellij.notification.NotificationGroup 7 | import com.intellij.notification.NotificationGroupManager 8 | import com.intellij.notification.NotificationType 9 | import com.intellij.openapi.compiler.CompileTask 10 | import com.intellij.openapi.compiler.CompilerManager 11 | import com.intellij.openapi.module.Module 12 | import com.intellij.openapi.module.ModuleManager 13 | import com.intellij.openapi.options.ConfigurationException 14 | import com.intellij.openapi.options.SettingsEditor 15 | import com.intellij.openapi.project.Project 16 | import com.intellij.openapi.util.WriteExternalException 17 | import com.intellij.openapi.vfs.VirtualFile 18 | import com.intellij.psi.PsiFile 19 | import com.intellij.psi.search.PsiShortNamesCache 20 | import org.jdom.Element 21 | import java.util.* 22 | import javax.swing.DefaultComboBoxModel 23 | import javax.swing.JComboBox 24 | import javax.swing.JComponent 25 | 26 | /** 27 | * Controller - Jetty Runner Editor 28 | * @see com.intellij.openapi.options.SettingsEditor 29 | * 30 | * @author Guy Keller 31 | */ 32 | class JettyRunnerEditor(jettyRunnerConfiguration: JettyRunnerConfiguration?) : SettingsEditor() { 33 | 34 | private var configurationPanel: JettyRunnerConfPanel 35 | private var mainOutputDirectory = "" 36 | 37 | init { 38 | this.configurationPanel = JettyRunnerConfPanel() 39 | super.resetFrom(jettyRunnerConfiguration) 40 | } 41 | 42 | /** 43 | * This is invoked when the form is first loaded. 44 | * The values may be stored in disk, if not, set some defaults 45 | * @param jettyRunnerConfiguration jettyRunnerConfiguration 46 | */ 47 | override fun resetEditorFrom(jettyRunnerConfiguration: JettyRunnerConfiguration) { 48 | val project: Project = jettyRunnerConfiguration.project 49 | // WebApp Path 50 | val webappPaths: String = jettyRunnerConfiguration.webappPaths.toString() 51 | if ("" != webappPaths.trim { it <= ' ' }) { 52 | configurationPanel.pathField?.text = webappPaths 53 | } else { 54 | val projectName = project.name 55 | configurationPanel.pathField?.text = "/$projectName" 56 | } 57 | // WebApp Folder (one level down to web.xml" 58 | val webappFolders: String = jettyRunnerConfiguration.webappFolders.toString() 59 | if ("" != webappFolders.trim { it <= ' ' }) { 60 | configurationPanel.webappField?.text = webappFolders 61 | } else { 62 | val webAppsFolder = getWebAppsFolder(project) 63 | configurationPanel.webappField?.text = webAppsFolder 64 | } 65 | // Classes directory 66 | val classesDirectories: String = jettyRunnerConfiguration.classesDirectories.toString() 67 | if ("" != classesDirectories.trim { it <= ' ' }) { 68 | configurationPanel.classesField?.text = classesDirectories 69 | } else { 70 | val outputDirectory = getMainOutputDirectory(project, jettyRunnerConfiguration.getModules()) 71 | configurationPanel.classesField?.text = outputDirectory 72 | } 73 | // Runs on port 74 | val runningOnPort: String = jettyRunnerConfiguration.runningOnPort.toString() 75 | if ("" != runningOnPort) { 76 | configurationPanel.runOnPortField?.text = runningOnPort 77 | } else { 78 | configurationPanel.runOnPortField?.text = "8080" 79 | } 80 | 81 | // Choose modules (all modules default) 82 | val selectedModuleName: String = jettyRunnerConfiguration.selectedModuleName.toString() 83 | val modules: Array = ModuleManager.getInstance(project).modules 84 | val modulesNames = arrayOfNulls(modules.size + 1) 85 | modulesNames[0] = "" 86 | var indexToSelect = 0 87 | for (i in modules.indices) { 88 | val currentModuleName = modules[i].name 89 | modulesNames[i + 1] = currentModuleName 90 | 91 | if (currentModuleName == selectedModuleName) { 92 | indexToSelect = i + 1 93 | } 94 | } 95 | configurationPanel.moduleComboBox?.setModel(DefaultComboBoxModel(modulesNames)) 96 | configurationPanel.moduleComboBox?.selectedIndex = indexToSelect 97 | 98 | // Jetty XML (Optional) 99 | configurationPanel.xmlField?.text = jettyRunnerConfiguration.jettyXml 100 | // Jetty Runner Path 101 | configurationPanel.jettyRunnerField?.text = jettyRunnerConfiguration.jettyRunnerJarPath 102 | 103 | // Env Vars (Optional) 104 | val environmentVariables: Map? = jettyRunnerConfiguration.environmentVariables 105 | if (!environmentVariables.isNullOrEmpty()) { 106 | configurationPanel.environmentVariables?.envs = environmentVariables 107 | } 108 | // Vm Args (Optional) 109 | configurationPanel.vmArgsField?.text = jettyRunnerConfiguration.vmArgs 110 | } 111 | 112 | /** 113 | * This is invoked when the user fills the form and pushes apply/ok 114 | * @param jettyRunnerConfiguration jettyRunnerConfiguration 115 | * @throws ConfigurationException ex 116 | */ 117 | @Throws(ConfigurationException::class) 118 | public override fun applyEditorTo(jettyRunnerConfiguration: JettyRunnerConfiguration) { 119 | val moduleComboBox: JComboBox? = configurationPanel.moduleComboBox 120 | jettyRunnerConfiguration.selectedModuleName = moduleComboBox?.getItemAt(moduleComboBox.getSelectedIndex()) 121 | jettyRunnerConfiguration.webappPaths = configurationPanel.pathField?.text 122 | jettyRunnerConfiguration.webappFolders = configurationPanel.webappField?.text 123 | jettyRunnerConfiguration.classesDirectories = configurationPanel.classesField?.text 124 | jettyRunnerConfiguration.runningOnPort = configurationPanel.runOnPortField?.text 125 | jettyRunnerConfiguration.jettyXml = configurationPanel.xmlField?.text 126 | jettyRunnerConfiguration.jettyRunnerJarPath = configurationPanel.jettyRunnerField?.text 127 | jettyRunnerConfiguration.vmArgs = configurationPanel.vmArgsField?.text 128 | jettyRunnerConfiguration.isPassParentEnvironmentVariables = configurationPanel.environmentVariables?.isPassParentEnvs!! 129 | // Deals with adding / removing env vars before saving to the conf file 130 | val envVars = configurationPanel.environmentVariables?.envs 131 | addOrRemoveEnvVar(jettyRunnerConfiguration.environmentVariables, envVars) 132 | jettyRunnerConfiguration.environmentVariables = envVars 133 | try { 134 | // Not entirely sure if 'I have to' do this - the IntelliJ framework may do 135 | jettyRunnerConfiguration.writeExternal(Element(JettyRunnerConfiguration.PREFIX + UUID.randomUUID().toString())) 136 | } catch (e: WriteExternalException) { 137 | throw RuntimeException(e) 138 | } 139 | } 140 | 141 | override fun createEditor(): JComponent { 142 | return configurationPanel.mainPanel!! 143 | } 144 | 145 | // Helpers 146 | /** 147 | * Retrieves the output directory for the main module 148 | * @param project Project 149 | * @param modules Concerned modules array 150 | * @return String value 151 | */ 152 | private fun getMainOutputDirectory(project: Project, modules: Array): String { 153 | // Preparing things up for a sneaky "CompileTask" 154 | val compilerManager: CompilerManager = CompilerManager.getInstance(project) 155 | val compileScope: ModuleCompileScope = ModuleCompileScope(project, modules, false) 156 | val mainModule = modules[0] 157 | // Though a "CompileTask" I can get hold of the "CompileContext" 158 | val compileTask: CompileTask = CompileTask { compileContext -> 159 | // Through the "CompileContext" I can get the output directory of the main module 160 | val mainOutputDirectory: VirtualFile? = compileContext.getModuleOutputDirectory(mainModule) 161 | if (mainOutputDirectory != null) { 162 | this@JettyRunnerEditor.mainOutputDirectory = mainOutputDirectory.presentableUrl 163 | } else { 164 | // Project hasn't been compiled yet, so there is no output directory 165 | val notificationGroupManager: NotificationGroupManager = NotificationGroupManager.getInstance() 166 | val notificationGroup: NotificationGroup = notificationGroupManager.getNotificationGroup("JETTY-RUNNER") 167 | val notification: Notification = notificationGroup.createNotification("Jetty Runner - Couldn't determine the classes folder:
Please compile / make your project before creating the conf.", NotificationType.ERROR) 168 | notification.notify(project) 169 | } 170 | true 171 | } 172 | // Executes the task (synchronously), which invokes that internal 'execute' method 173 | compilerManager.executeTask(compileTask, compileScope, "JettyRunner-By-GuiKeller", null) 174 | return this.mainOutputDirectory 175 | } 176 | 177 | /** 178 | * Returns the most probable WebApps folder 179 | * @param project Project 180 | * @return String value 181 | */ 182 | private fun getWebAppsFolder(project: Project): String { 183 | // Using the api to look for the web.xml 184 | var webappsFolder = "" 185 | val namesCache: PsiShortNamesCache = PsiShortNamesCache.getInstance(project) 186 | val webXML: Array = namesCache.getFilesByName("web.xml") 187 | if (webXML.isNotEmpty()) { 188 | // Grab the first one that the api found 189 | val file = webXML[0] 190 | // The parent folder is the "WEB-INF" folder 191 | val webInfFolder = file.parent 192 | if (webInfFolder != null) { 193 | // The parent folder to "WEB-INF" is the WebApps folder 194 | val webappFolder = webInfFolder.parent 195 | if (webappFolder != null) { 196 | val virtualFile = webappFolder.virtualFile 197 | webappsFolder = virtualFile.presentableUrl 198 | } 199 | } 200 | } 201 | return webappsFolder 202 | } 203 | 204 | /** 205 | * Adds / removes variables to the System Environment Variables 206 | * @param currentVars Map,String> 207 | * @param newVars Map,String> 208 | */ 209 | private fun addOrRemoveEnvVar(currentVars: Map?, newVars: Map?) { 210 | // Removes the current env vars 211 | if (!currentVars.isNullOrEmpty()) { 212 | val keys = currentVars.keys 213 | for (key in keys) { 214 | System.clearProperty(key) 215 | } 216 | } 217 | // Adds the new env vars 218 | if (!newVars.isNullOrEmpty()) { 219 | val keys = newVars.keys 220 | for (key in keys) { 221 | val value = newVars[key] 222 | if (value != null) { 223 | System.setProperty(key, value) 224 | } 225 | } 226 | } 227 | } 228 | 229 | fun setConfigurationPanel(configurationPanel: JettyRunnerConfPanel) { 230 | this.configurationPanel = configurationPanel 231 | } 232 | } 233 | -------------------------------------------------------------------------------- /src/main/kotlin/com/github/guikeller/jettyrunner/util/IconUtil.kt: -------------------------------------------------------------------------------- 1 | package com.github.guikeller.jettyrunner.util 2 | 3 | import javax.swing.Icon 4 | import javax.swing.ImageIcon 5 | 6 | /** 7 | * IconUtil - Loads the jetty icon 8 | * @author Guy Keller 9 | */ 10 | class IconUtil private constructor() { 11 | 12 | companion object { 13 | private var instance: IconUtil? = null 14 | fun getInstance(): IconUtil { 15 | if (instance == null) { 16 | instance = IconUtil() 17 | } 18 | return instance as IconUtil 19 | } 20 | } 21 | 22 | private var icon: Icon? = null 23 | 24 | private fun loadIcon(): Icon { 25 | if (icon == null) { 26 | val resource = javaClass.getResource("/META-INF/jetty-icon.png") 27 | icon = ImageIcon(resource) 28 | } 29 | return icon as Icon 30 | } 31 | 32 | fun getIcon() = icon ?: loadIcon() 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/jetty-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/src/main/resources/META-INF/jetty-icon.png -------------------------------------------------------------------------------- /src/main/resources/META-INF/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | JettyRunner-GK 3 | IDEA Jetty Runner 4 | 2.0.1 5 | IntelliJ Jetty Runner 6 | 7 | 9 |
10 | If you require full support please consider buying the IntelliJ IDEA Enterprise Edition.
11 | This plugin should be Win / Mac / Linux compatible.
12 |
13 | Compatible with servlet-api versions: 3.1, 3.0, 2.5, 2.4, 2.3, 2.2.
14 | Protocols: HTTP / 1.1 (RFC 7230), HTTP / 2 (RFC 7540), WebSocket (RFC 6455, JSR 356), FastCGI.
15 | Many thanks for the kind contributions on GitHub, cheers guys!
16 |
17 | Minimum requirement: JVM / JDK / JRE v8
18 | tags: jetty, container, webapp, runner, tomcat, runner 19 | ]]>
20 | 21 | GitHub to see the latest change notes and learn more about this plugin.
23 | Thanks for dropping by. 24 | ]]> 25 |
26 | 27 | 28 | 29 | 30 | 31 | com.intellij.modules.lang 32 | com.intellij.modules.xdebugger 33 | 34 | 35 | com.intellij.java 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 | -------------------------------------------------------------------------------- /src/test/kotlin/com/github/guikeller/jettyrunner/README.md: -------------------------------------------------------------------------------- 1 | While migrating from Java to Kotlin the tests landed in the too hard basket. 2 | If someone is keen to rewrite the tests, feel free to do it so. 3 | 4 | You may look on the git history for some inspiration. 5 | -------------------------------------------------------------------------------- /src/test/resources/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/test/resources/checkstyle.xslt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 83 | 84 | 85 | 86 | 87 | 88 |
79 | 82 |

CheckStyle Audit

Designed for use with CheckStyle and Ant.
89 |
90 | 91 | 92 | 93 |
94 | 95 | 96 | 97 |
98 | 99 | 100 | 101 | 102 |
103 | 104 | 105 | 106 | 107 |
108 | 109 | 110 | 111 | 112 |

Files

113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 |
NameErrors
129 |
130 | 131 | 132 | 133 | 134 |

File

135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 |
Error DescriptionLine
150 | Back to top 151 |
152 | 153 | 154 | 155 |

Summary

156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 |
FilesErrors
169 |
170 | 171 | 172 | 173 | a 174 | b 175 | 176 | 177 |
178 | -------------------------------------------------------------------------------- /src/test/resources/cpd.xslt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 27 | 34 | 35 | 36 |

Summary of duplicated code

37 | This page summarizes the code fragments that have been found to be replicated in the code. 38 |

39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
# duplicationsTotal tokensApprox # bytes
51 |

52 | You expand and collapse the code fragments using the + buttons. You can also navigate to the source code by clicking 53 | on the file names. 54 |

55 | 56 | 57 | 58 | 59 | 60 | 67 | 68 | 69 | 70 | 83 | 84 | 85 | 86 |
IDFiles
61 | 62 | 63 | 64 | 65 |
../src/.html# line
66 |
71 | 72 | 75 | 81 |
73 | 74 | 76 | 80 |
82 |

87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /src/test/resources/jetty-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guy-keller/jetty-runner/d7edea418d673de17f5e859d47531d5d66ad7839/src/test/resources/jetty-icon.png --------------------------------------------------------------------------------