This is an automated email from the ASF dual-hosted git repository.

juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git

commit c96441adf3f92c924754b751edee9f4be5bb0699
Author: juanpablo <[email protected]>
AuthorDate: Sat Sep 29 19:33:09 2018 +0200

    switch to servlet 3.1 - jsp 2.3: switch from tomcat 7 to tomcat 8.5
---
 jspwiki-war/pom.xml | 19 -------------------
 mvn_cheat-sheet.md  |  4 ++--
 pom.xml             | 39 ++++++++++++++++++++++++++++++++++-----
 3 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/jspwiki-war/pom.xml b/jspwiki-war/pom.xml
index 96442f3..4d5279d 100644
--- a/jspwiki-war/pom.xml
+++ b/jspwiki-war/pom.xml
@@ -188,25 +188,6 @@
   <build>
     <finalName>JSPWiki</finalName>
     <plugins>
-      <!-- With below plugin can deploy to an embedded Tomcat instance via:
-         mvn clean install tomcat7:run-war [-Dmaven.test.skip]
-         ...or standalone by adding a <server /> entry "myTomcat":
-         http://www.jroller.com/gmazza/entry/web_service_tutorial#maventomcat
-         and running tomcat7:redeploy instead of run-war in
-         string above.
-
-         Either way, JSPWiki URL will be
-         http://localhost:8080/JSPWiki
-      -->
-      <plugin>
-        <groupId>org.apache.tomcat.maven</groupId>
-        <artifactId>tomcat7-maven-plugin</artifactId>
-        <configuration>
-          <server>myTomcat</server>
-          <url>http://localhost:8080/manager/text</url>
-          <path>/${project.build.finalName}</path>
-        </configuration>
-      </plugin>
       
       <plugin>
         <artifactId>maven-jar-plugin</artifactId>
diff --git a/mvn_cheat-sheet.md b/mvn_cheat-sheet.md
index 226e27a..f15cac7 100644
--- a/mvn_cheat-sheet.md
+++ b/mvn_cheat-sheet.md
@@ -35,8 +35,8 @@ under the License.
 | mvn test -Dtest=JSPWikiMarkupParserTest                           | run just 
a single test class                                                             
                                 |
 | mvn test -Dtest=JSPWikiMarkupParserTest#testHeadingHyperlinks3    | run just 
a single test within a test class                                               
                                 |
 | mvn test -Dtest=TestClassName#methodName -Dmaven.surefire.debug   | debug a 
test in Eclipse or IDEA to see why it's failing (see 
http://www.jroller.com/gmazza/entry/jpa_and_junit#debugging) |
-| mvn tomcat7:run-war                                               | (from a 
war module) starts JSPWiki on a Tomcat7 instance at 
http://localhost:8080/JSPWiki                                 |
-| mvnDebug -DskipTests tomcat7:run-war                              | (from a 
war module) starts JSPWiki with attached debugger on a Tomcat7 instance at 
http://localhost:8080/JSPWiki          |
+| mvn org.codehaus.cargo:cargo-maven2-plugin:run                    | (from 
main war module) starts JSPWiki on a Tomcat8 instance at 
http://localhost:8080/JSPWiki with an attached debugger    |
+|                                                                   | on port 
5005                                                                            
                                  |
 | mvn clean deploy -Papache-release -Dgpg.passphrase=<passphrase>   | deploys 
generated artifact to a repository. If -Dgpg.passphrase is not given, expects a 
gpg-agent running                 |
 | mvn clean install -Pintegration-tests                             | performs 
a build, enabling Selenium tests execution (best run from the jspwiki-it-tests 
folder)                           |
 | mvn wro4j:run -Dminimize=true                                     | merge & 
compress js & css files                                                         
                                  |
diff --git a/pom.xml b/pom.xml
index 2ed3d93..342ec53 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,7 @@
     <lucene.version>4.7.0</lucene.version>
     <selenium.version>2.42.0</selenium.version>
     <slf4j.version>1.7.25</slf4j.version>
+       <tomcat.version>8.5.34</tomcat.version>
     <wro4j.version>1.8.0</wro4j.version>
     <minimize>true</minimize> <!-- wro4j compression -->
   </properties>
@@ -600,12 +601,40 @@
         </plugin>
 
         <plugin>
-          <groupId>org.apache.tomcat.maven</groupId>
-          <artifactId>tomcat7-maven-plugin</artifactId>
-          <version>2.2</version>
+          <groupId>org.codehaus.cargo</groupId>
+          <artifactId>cargo-maven2-plugin</artifactId>
+          <version>1.6.10</version>
           <configuration>
-            <contextReloadable>true</contextReloadable>
-            <port>8080</port>
+            <container>
+              <!-- 
https://codehaus-cargo.github.io/cargo/Maven2+Plugin+Reference+Guide.html#Maven2PluginReferenceGuide-container
 -->
+              <containerId>tomcat8x</containerId>
+              <zipUrlInstaller>
+                
<url>https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/${tomcat.version}/tomcat-${tomcat.version}.zip</url>
+              </zipUrlInstaller>
+              
<output>${project.build.directory}/tomcat8x/logs/container.log</output>
+              <systemProperties>
+                <user.language>en</user.language>
+                <user.region>US</user.region>
+              </systemProperties>
+            </container>
+            <configuration>
+              <type>standalone</type>
+              <home>${project.build.directory}/tomcat8x</home>
+              <properties>
+                <cargo.servlet.port>8080</cargo.servlet.port>
+                <cargo.jvmargs>-XX:MaxPermSize=512m -Xms256m -Xmx3072m -Xdebug 
-Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 
-XX:+DisableExplicitGC -Xverify:none -Djava.awt.headless=true</cargo.jvmargs>
+              </properties>
+            </configuration>
+            <!-- <deployables>
+              <deployable>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>jspwiki-war</artifactId>
+                <type>war</type>
+                <properties>
+                  <context>/JSPWiki</context>
+                </properties>
+              </deployable>
+            </deployables> -->
           </configuration>
         </plugin>
 

Reply via email to