Author: olamy
Date: Tue Aug 16 01:03:14 2016
New Revision: 1756441
URL: http://svn.apache.org/viewvc?rev=1756441&view=rev
Log:
start work for tomcat8
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/pom.xml (with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/settings.xml (with
props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployOnlyMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployOnlyMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/UndeployMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractExecWarMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunWarMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractStandaloneWarMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarOnlyMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtendedTomcat.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraDependency.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraResource.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/MavenWebappClassLoader.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarOnlyMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ShutdownMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarOnlyMojo.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/WarRunDependency.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/Webapp.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/resources/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/resources/conf/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/resources/conf/logging.properties
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/resources/conf/tomcat-users.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/resources/conf/web.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/site/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/site/apt/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/site/apt/adjust-embedded-tomcat-version.apt.vm
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/site/apt/index.apt
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/site/apt/usage.apt.vm
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/site/site.xml (with
props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarOnlyProjectIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarProjectIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7RunMultiConfigIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7SimpleWarProjectIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/keystore
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/manager.war
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/empty.txt
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/logging.properties
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/server.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/tomcat-users.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/index.jsp
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/web.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/test/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/test/java/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/test/java/WaitIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/pom.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/empty.txt
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/logging.properties
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/tomcat-users.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/index.jsp
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/test/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/test/java/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/test/java/WaitIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/log4j2-test.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/pom.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/empty.txt
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/logging.properties
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/server.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/index.jsp
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/web.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/test/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/test/java/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/test/java/WaitIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java
(with props)
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/test/simple-war-project-1.0-SNAPSHOT.war
Modified:
tomcat/maven-plugin/trunk/pom.xml
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
Modified: tomcat/maven-plugin/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1756441&r1=1756440&r2=1756441&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/pom.xml (original)
+++ tomcat/maven-plugin/trunk/pom.xml Tue Aug 16 01:03:14 2016
@@ -74,6 +74,7 @@
<!-- server port for it tests -->
<its.server.port>2008</its.server.port>
<tomcat7Version>7.0.59</tomcat7Version>
+ <tomcat8Version>8.0.9</tomcat8Version>
<!-- to prevent isssues with last apache parent pom -->
<arguments />
@@ -314,8 +315,9 @@
<module>common-tomcat-maven-plugin</module>
<module>tomcat-maven-plugin-it</module>
<module>tomcat6-maven-plugin</module>
- <module>tomcat7-maven-plugin</module>
<module>tomcat7-war-runner</module>
+ <module>tomcat7-maven-plugin</module>
+ <module>tomcat8-maven-plugin</module>
<module>tomcat-maven-archetype</module>
</modules>
Modified:
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml?rev=1756441&r1=1756440&r2=1756441&view=diff
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
(original)
+++
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
Tue Aug 16 01:03:14 2016
@@ -48,7 +48,14 @@
<path>/</path>
</configuration>
</plugin>
-
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat8-maven-plugin</artifactId>
+ <configuration>
+ <port>9090</port>
+ <path>/</path>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
</build>
Modified:
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml?rev=1756441&r1=1756440&r2=1756441&view=diff
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
(original)
+++
tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
Tue Aug 16 01:03:14 2016
@@ -63,6 +63,11 @@
<artifactId>tomcat7-maven-plugin</artifactId>
<version>${tomcatPluginVersion}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat8-maven-plugin</artifactId>
+ <version>${tomcatPluginVersion}</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
Added: tomcat/maven-plugin/trunk/tomcat8-maven-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/pom.xml?rev=1756441&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat8-maven-plugin/pom.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat8-maven-plugin/pom.xml Tue Aug 16 01:03:14
2016
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <version>2.3-SNAPSHOT</version>
+ </parent>
+ <artifactId>tomcat8-maven-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <name>Apache Tomcat Maven Plugin :: Tomcat 8.x</name>
+ <description>The Tomcat Maven Plugin provides goals to manipulate WAR
projects within the Tomcat 8.x servlet container.
+ </description>
+
+ <properties>
+ <managerWebAppPath>${basedir}/target/</managerWebAppPath>
+
<warTestPath>${basedir}/src/test/simple-war-project-1.0-SNAPSHOT.war</warTestPath>
+ <keystoreTestPath>${basedir}/src/test/keystore</keystoreTestPath>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-core</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-coyote</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-api</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jdbc</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-dbcp</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-servlet-api</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jsp-api</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jasper</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jasper-el</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-el-api</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-tribes</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina-ha</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-annotations-api</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <!-- tomcat i18n too ?? -->
+
+ <!-- not sure we need that -->
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-juli</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-juli</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-log4j</artifactId>
+ <version>${tomcat8Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.jdt.core.compiler</groupId>
+ <artifactId>ecj</artifactId>
+ </dependency>
+
+ <!-- end tomcat dependencies -->
+
+
+ <dependency>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>common-tomcat-maven-plugin</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-war-runner</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-archiver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-classworlds</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>nekohtml</groupId>
+ <artifactId>xercesMinimal</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat-maven-plugin-it</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/**IT*</exclude>
+ </excludes>
+ <systemPropertyVariables>
+ <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <unzip src="src/test/manager.war" dest="${managerWebAppPath}"
/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>run-its</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- For integration tests the plugin needs to be installed before
+ the integration tests are executed -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install-plugin-pre-integration-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <postBuildHookScript>verify</postBuildHookScript>
+
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+ <goals>
+ <goal>clean</goal>
+ <goal>package</goal>
+ </goals>
+ <settingsFile>src/it/settings.xml</settingsFile>
+ <debug>true</debug>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-tests-invoker</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ <configuration>
+ <systemPropertyVariables>
+ <mojoVersion>${project.version}</mojoVersion>
+
<verifier.maven.debug>${verifier.maven.debug}</verifier.maven.debug>
+ <verifier.debugJvm>${verifier.debugJvm}</verifier.debugJvm>
+ <its.http.port>${its.http.port}</its.http.port>
+ <its.https.port>${its.https.port}</its.https.port>
+ <its.ajp.port>${its.ajp.port}</its.ajp.port>
+ <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
+ </systemPropertyVariables>
+ <redirectTestOutputToFile>false</redirectTestOutputToFile>
+ <useFile>false</useFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Propchange: tomcat/maven-plugin/trunk/tomcat8-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat8-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/settings.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/settings.xml?rev=1756441&view=auto
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/settings.xml (added)
+++ tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/settings.xml Tue Aug
16 01:03:14 2016
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>it-repo</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>local.central</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>local.snapshots</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>local.central</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>local.snapshots</id>
+ <url>@localRepositoryUrl@</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+</settings>
Propchange: tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/settings.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/settings.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.tomcat.maven.it</groupId>
+ <artifactId>simple-war-exec-project</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-alpha-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webXml>src/main/webapp/web.xml</webXml>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-run</id>
+ <goals>
+ <goal>exec-war-only</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <path>foo</path>
+ <serverXml>src/main/tomcatconf/server.xml</serverXml>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ <version>2.5.6</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.9</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<Context antiResourceLocking="false" privileged="true" useHttpOnly="true" />
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = 1catalina.org.apache.juli.FileHandler,
2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler,
4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers =
2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level
= FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers
= 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level
= FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers
= 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the org.apache.catalina.util.LifecycleBase logger to log
+# each component that extends LifecycleBase changing state:
+org.apache.catalina.util.LifecycleBase.level = FINE
+
+# To see debug messages in TldLocationsCache, uncomment the following line:
+org.apache.jasper.compiler.TldLocationsCache.level = FINE
+
+org.apache = FINE
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,43 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<Server port="8010" shutdown="SHUTDOWN">
+
+ <GlobalNamingResources>
+ <!-- Used by Manager webapp -->
+ <Resource name="UserDatabase" auth="Container"
+ type="org.apache.catalina.UserDatabase"
+ description="User database that can be updated and saved"
+ factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+ pathname="conf/tomcat-users.xml" />
+ </GlobalNamingResources>
+
+ <Service name="Catalina">
+ <Connector port="8080" keepAliveTimeout="1800000"
maxKeepAliveRequests="30000" maxThreads="300" />
+ <Connector port="8088" keepAliveTimeout="1800000"
maxKeepAliveRequests="30000" maxThreads="300" />
+ <Engine name="Catalina" defaultHost="localhost">
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ resolveHosts="false"
pattern="%t-ip:%a-protocol:%H-localPort:%p-path:%U-time:%D ms"/>
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+ resourceName="UserDatabase" />
+ <Host name="localhost" appBase="webapps" />
+ </Engine>
+
+ </Service>
+</Server>
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,17 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+It works !!
\ No newline at end of file
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+
+</web-app>
\ No newline at end of file
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,91 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File artifact = new File( target,
"simple-war-exec-project-1.0-SNAPSHOT-war-exec.jar" );
+ if ( !artifact.exists() || artifact.isDirectory() )
+ {
+ System.err.println( "artifact file is missing or a directory." );
+ return false;
+ }
+
+ Set contents = new HashSet();
+
+ JarFile jar = new JarFile( artifact );
+ Enumeration jarEntries = jar.entries();
+ while ( jarEntries.hasMoreElements() )
+ {
+ JarEntry entry = (JarEntry) jarEntries.nextElement();
+ if ( !entry.isDirectory() )
+ {
+ // Only compare files
+ contents.add( entry.getName() );
+ }
+ }
+
+ if (!contents.contains("foo.war") )
+ {
+ System.err.println( "foo.war." );
+ return false;
+ }
+ if (!contents.contains("conf/server.xml") )
+ {
+ System.err.println( "conf/server.xml is missing." );
+ return false;
+ }
+ if (!contents.contains("conf/logging.properties") )
+ {
+ System.err.println( "conf/logging.properties is missing." );
+ return false;
+ }
+ if (!contents.contains("conf/Catalina/localhost/manager.xml") )
+ {
+ System.err.println( "conf/Catalina/localhost/manager.xml is missing."
);
+ return false;
+ }
+ if (!contents.contains("tomcat.standalone.properties") )
+ {
+ System.err.println( "tomcat.standalone.properties is missing." );
+ return false;
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
\ No newline at end of file
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,273 @@
+package org.apache.tomcat.maven.plugin.tomcat8;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.manager.WagonManager;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.wagon.authentication.AuthenticationInfo;
+import org.apache.tomcat.maven.common.deployer.TomcatManager;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractTomcat7Mojo;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.StringTokenizer;
+
+/**
+ * Abstract goal that provides common configuration for Catalina-based goals.
+ *
+ * @author Mark Hobson <[email protected]>
+ */
+public abstract class AbstractCatalinaMojo
+ extends AbstractTomcat7Mojo
+{
+ // ----------------------------------------------------------------------
+ // Constants
+ // ----------------------------------------------------------------------
+
+ /**
+ * The name of this Maven plugin. Used to produce the user agent when
communicating with Tomcat manager.
+ */
+ private String name = "Apache Tomcat Maven Plugin";
+
+ /**
+ * The default username to use when authenticating with Tomcat manager.
+ */
+ private static final String DEFAULT_USERNAME = "admin";
+
+ /**
+ * The default password to use when authenticating with Tomcat manager.
+ */
+ private static final String DEFAULT_PASSWORD = "";
+
+ // ----------------------------------------------------------------------
+ // Mojo Parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * The Maven Wagon manager to use when obtaining server authentication
details.
+ */
+ @Component
+ private WagonManager wagonManager;
+
+ /**
+ * The full URL of the Tomcat manager instance to use.
+ */
+ @Parameter( property = "maven.tomcat.url", defaultValue =
"http://localhost:8080/manager/text", required = true )
+ private URL url;
+
+ /**
+ * The server id in settings.xml to use when authenticating with Tomcat
manager, or <code>null</code> to use
+ * defaults of username <code>admin</code> and no password.
+ */
+ @Parameter( property = "maven.tomcat.server" )
+ private String server;
+
+ /**
+ * The URL encoding charset to use when communicating with Tomcat manager.
+ */
+ @Parameter( property = "maven.tomcat.charset", defaultValue =
"ISO-8859-1", required = true )
+ private String charset;
+
+ /**
+ * The tomcat username to use for deployment
+ *
+ * @since 1.0-alpha-2
+ */
+ @Parameter( property = "tomcat.username" )
+ private String username;
+
+ /**
+ * The password to use for deployment
+ *
+ * @since 1.0-alpha-2
+ */
+ @Parameter( property = "tomcat.password" )
+ private String password;
+
+ @Parameter( defaultValue = "${plugin.version}", required = true, readonly
= true )
+ private String version;
+
+ // ----------------------------------------------------------------------
+ // Fields
+ // ----------------------------------------------------------------------
+
+ /**
+ * The Tomcat manager wrapper object.
+ */
+ private TomcatManager manager;
+
+ // ----------------------------------------------------------------------
+ // Mojo Implementation
+ // ----------------------------------------------------------------------
+
+ /**
+ * {@inheritDoc}
+ */
+ public void execute()
+ throws MojoExecutionException
+ {
+ try
+ {
+ invokeManager();
+ }
+ catch ( TomcatManagerException exception )
+ {
+ throw new MojoExecutionException(
+ messagesProvider.getMessage(
"AbstractCatalinaMojo.managerError", exception.getMessage() ) );
+ }
+ catch ( IOException exception )
+ {
+ throw new MojoExecutionException( messagesProvider.getMessage(
"AbstractCatalinaMojo.managerIOError" ),
+ exception );
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // Protected Methods
+ // ----------------------------------------------------------------------
+
+ /**
+ * Invokes Tomcat manager when this Mojo is executed.
+ *
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if there was a problem executing this goal
+ * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+ * if the Tomcat manager request fails
+ * @throws java.io.IOException if an i/o error occurs
+ */
+ protected abstract void invokeManager()
+ throws MojoExecutionException, TomcatManagerException, IOException;
+
+ /**
+ * Gets the Tomcat manager wrapper object configured for this goal.
+ *
+ * @return the Tomcat manager wrapper object
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if there was a problem obtaining the authentication details
+ */
+ protected TomcatManager getManager()
+ throws MojoExecutionException
+ {
+ // lazily instantiate when config values have been injected
+ if ( manager == null )
+ {
+ String userName;
+ String password;
+
+ if ( server == null )
+ {
+ // no server set, use defaults
+ getLog().debug( messagesProvider.getMessage(
"AbstractCatalinaMojo.defaultAuth" ) );
+ userName = DEFAULT_USERNAME;
+ password = DEFAULT_PASSWORD;
+ }
+ else
+ {
+ // obtain authenication details for specified server from wagon
+ AuthenticationInfo info = wagonManager.getAuthenticationInfo(
server );
+ if ( info == null )
+ {
+ throw new MojoExecutionException(
+ messagesProvider.getMessage(
"AbstractCatalinaMojo.unknownServer", server ) );
+ }
+
+ // derive username
+ userName = info.getUserName();
+ if ( userName == null )
+ {
+ getLog().debug( messagesProvider.getMessage(
"AbstractCatalinaMojo.defaultUserName" ) );
+ userName = DEFAULT_USERNAME;
+ }
+
+ // derive password
+ password = info.getPassword();
+ if ( password == null )
+ {
+ getLog().debug( messagesProvider.getMessage(
"AbstractCatalinaMojo.defaultPassword" ) );
+ password = DEFAULT_PASSWORD;
+ }
+ }
+
+ // if userName/password are defined in the mojo or the cli they
override
+ if ( !StringUtils.isEmpty( this.username ) )
+ {
+ userName = this.username;
+ password = this.password == null ? "" : this.password;
+ }
+
+ manager = new TomcatManager( url, userName, password, charset,
settings.isInteractiveMode() );
+ manager.setUserAgent( name + "/" + version );
+ }
+
+ return manager;
+ }
+
+ /**
+ * Gets the full URL of the Tomcat manager instance.
+ *
+ * @return the full URL of the Tomcat manager instance to use
+ */
+ protected URL getURL()
+ {
+ return url;
+ }
+
+ /**
+ * Gets the webapp context path to use when communicating with Tomcat
manager.
+ *
+ * @return the webapp context path to use
+ */
+ protected String getPath()
+ {
+ return path;
+ }
+
+ /**
+ * Gets the URL of the deployed webapp.
+ *
+ * @return the URL of the deployed webapp
+ * @throws java.net.MalformedURLException if the deployed webapp URL is
invalid
+ */
+ protected URL getDeployedURL()
+ throws MalformedURLException
+ {
+ return new URL( getURL(), getPath() );
+ }
+
+ /**
+ * Splits the given string into lines and writes each one separately to
the log at info level.
+ *
+ * @param string the string to write
+ */
+ protected void log( String string )
+ {
+ StringTokenizer tokenizer = new StringTokenizer( string, "\n\r" );
+
+ while ( tokenizer.hasMoreTokens() )
+ {
+ getLog().info( tokenizer.nextToken() );
+ }
+ }
+}
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,82 @@
+package org.apache.tomcat.maven.plugin.tomcat8;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.settings.Settings;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.common.messages.MessagesProvider;
+
+/**
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+public abstract class AbstractTomcat7Mojo
+ extends AbstractMojo
+{
+ @Component
+ protected Settings settings;
+
+ @Component
+ protected MessagesProvider messagesProvider;
+
+ // ----------------------------------------------------------------------
+ // Mojo Parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * The webapp context path to use for the web application being run. This
must always start with a forward-slash
+ * ('/').
+ */
+ @Parameter(defaultValue = "/${project.artifactId}", property =
"maven.tomcat.path", required = true)
+ protected String path;
+
+
+ protected String getPath()
+ {
+ return path;
+ }
+
+ /**
+ * Check response of Tomcat to know if ok or not.
+ *
+ * @param tomcatResponse response of tomcat return by TomcatManager class
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if HTTP status code greater than 400 (included)
+ */
+ protected void checkTomcatResponse( TomcatManagerResponse tomcatResponse )
+ throws MojoExecutionException
+ {
+ int statusCode = tomcatResponse.getStatusCode();
+
+ if ( statusCode >= 400 )
+ {
+ getLog().error( messagesProvider.getMessage(
"tomcatHttpStatusError", statusCode,
+
tomcatResponse.getReasonPhrase() ) );
+
+ throw new MojoExecutionException(
+ messagesProvider.getMessage( "tomcatHttpStatusError",
statusCode,
+ tomcatResponse.getReasonPhrase()
) + ": "
+ + tomcatResponse.getHttpResponseBody() );
+ }
+ }
+}
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,84 @@
+package org.apache.tomcat.maven.plugin.tomcat8;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Parameter;
+
+/**
+ * Abstract goal that provides common configuration for Catalina-based goals.
+ *
+ * @author Mark Hobson <[email protected]>
+ */
+public abstract class AbstractWarCatalinaMojo
+ extends AbstractCatalinaMojo
+{
+ // ----------------------------------------------------------------------
+ // Mojo Parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * The packaging of the Maven project that this goal operates upon.
+ */
+ @Parameter( defaultValue = "${project.packaging}", required = true,
readonly = true )
+ private String packaging;
+
+ /**
+ * If set to true ignore if packaging of project is not 'war'.
+ *
+ * @since 1.1
+ */
+ @Parameter( property = "tomcat.ignorePackaging", defaultValue = "false" )
+ private boolean ignorePackaging;
+
+ // ----------------------------------------------------------------------
+ // Mojo Implementation
+ // ----------------------------------------------------------------------
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void execute()
+ throws MojoExecutionException
+ {
+ if ( !isWar() )
+ {
+ getLog().info( messagesProvider.getMessage(
"AbstractWarCatalinaMojo.nonWar" ) );
+ return;
+ }
+
+ super.execute();
+ }
+
+ // ----------------------------------------------------------------------
+ // Protected Methods
+ // ----------------------------------------------------------------------
+
+ /**
+ * Gets whether this project uses WAR packaging.
+ *
+ * @return whether this project uses WAR packaging
+ */
+ protected boolean isWar()
+ {
+ return "war".equals( packaging ) || ignorePackaging;
+ }
+}
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,226 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractWarCatalinaMojo;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * Deploy a WAR to Tomcat.
+ *
+ * @author Mark Hobson <[email protected]>
+ */
+public abstract class AbstractDeployMojo
+ extends AbstractWarCatalinaMojo
+{
+ // ----------------------------------------------------------------------
+ // Mojo Parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * The deployment mode to use. This must be either <code>war</code> to
deploy the war, <code>context</code> to
+ * deploy the context XML file, or <code>both</code> to deploy the war
with the context XML file.
+ */
+ @Parameter( property = "maven.tomcat.mode", defaultValue = "war", required
= true )
+ private String mode;
+
+ /**
+ * The path of the Tomcat context XML file. This is not used for war
deployment mode.
+ */
+ @Parameter( defaultValue =
"${project.build.directory}/${project.build.finalName}/META-INF/context.xml" )
+ private File contextFile;
+
+ /**
+ * Whether Tomcat should automatically undeploy webapps that already exist
when deploying.
+ */
+ @Parameter( property = "maven.tomcat.update", defaultValue = "false",
required = true )
+ private boolean update;
+
+ /**
+ * The Tomcat webapp tag name to use.
+ */
+ @Parameter( property = "maven.tomcat.tag" )
+ private String tag;
+
+ // ----------------------------------------------------------------------
+ // Protected Methods
+ // ----------------------------------------------------------------------
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void invokeManager()
+ throws MojoExecutionException, TomcatManagerException, IOException
+ {
+ if ( "war".equals( mode ) )
+ {
+ deployWar();
+ }
+ else if ( "context".equals( mode ) )
+ {
+ deployContext();
+ }
+ else if ( "both".equals( mode ) )
+ {
+ deployWarAndContext();
+ }
+ else
+ {
+ throw new MojoExecutionException( messagesProvider.getMessage(
"AbstractDeployMojo.unknownMode", mode ) );
+ }
+ }
+
+ /**
+ * Gets the Tomcat WAR file. This may be a file or a directory depending
on the deployment mode.
+ *
+ * @return the Tomcat WAR file.
+ */
+ protected abstract File getWarFile();
+
+ /**
+ * Ensures that the Tomcat WAR file exists and is the correct type for the
deployment mode.
+ *
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if the WAR file does not exist or is not the correct type for
the deployment mode
+ */
+ protected abstract void validateWarFile()
+ throws MojoExecutionException;
+
+ /**
+ * Gets the Tomcat context XML file.
+ *
+ * @return the Tomcat context XML file.
+ */
+ protected File getContextFile()
+ {
+ return contextFile;
+ }
+
+ /**
+ * Ensures that the Tomcat context XML file exists and is indeed a file.
+ *
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if the context file does not exist or is not a file
+ */
+ protected void validateContextFile()
+ throws MojoExecutionException
+ {
+ if ( !contextFile.exists() || !contextFile.isFile() )
+ {
+ throw new MojoExecutionException(
+ messagesProvider.getMessage(
"AbstractDeployMojo.missingContext", contextFile.getPath() ) );
+ }
+ }
+
+ /**
+ * Gets whether Tomcat should automatically undeploy webapps that already
exist when deploying.
+ *
+ * @return whether Tomcat should automatically undeploy webapps that
already exist when deploying
+ */
+ protected boolean isUpdate()
+ {
+ return update;
+ }
+
+ /**
+ * Gets the Tomcat webapp tag name to use.
+ *
+ * @return the Tomcat webapp tag name to use
+ */
+ protected String getTag()
+ {
+ return tag;
+ }
+
+ /**
+ * Deploys the WAR to Tomcat.
+ *
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if there was a problem locating the WAR
+ * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+ * if the Tomcat manager request fails
+ * @throws java.io.IOException if an i/o error occurs
+ */
+ protected void deployWar()
+ throws MojoExecutionException, TomcatManagerException, IOException
+ {
+ validateWarFile();
+
+ getLog().info( messagesProvider.getMessage(
"AbstractDeployMojo.deployingWar", getDeployedURL() ) );
+
+ URL warURL = getWarFile().toURL();
+ log( getManager().deploy( getPath(), warURL, isUpdate(), getTag()
).getHttpResponseBody() );
+ }
+
+ /**
+ * Deploys the context XML file to Tomcat.
+ *
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if there was a problem locating the context
XML file
+ * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+ * if the Tomcat manager request fails
+ * @throws java.io.IOException if an i/o error occurs
+ */
+ protected void deployContext()
+ throws MojoExecutionException, TomcatManagerException, IOException
+ {
+ validateContextFile();
+
+ getLog().info( messagesProvider.getMessage(
"AbstractDeployMojo.deployingContext", getDeployedURL() ) );
+
+ URL contextURL = getContextFile().toURL();
+ log( getManager().deployContext( getPath(), contextURL, isUpdate(),
getTag() ).getHttpResponseBody() );
+ }
+
+ /**
+ * Deploys the WAR and context XML file to Tomcat.
+ *
+ * @throws org.apache.maven.plugin.MojoExecutionException
+ * if there was a problem locating either the
WAR or the context XML file
+ * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+ * if the Tomcat manager request fails
+ * @throws java.io.IOException if an i/o error occurs
+ */
+ protected void deployWarAndContext()
+ throws MojoExecutionException, TomcatManagerException, IOException
+ {
+ validateWarFile();
+ validateContextFile();
+
+ getLog().info( messagesProvider.getMessage(
"AbstractDeployMojo.deployingWarContext", getDeployedURL() ) );
+
+ URL warURL = getWarFile().toURL();
+ URL contextURL = getContextFile().toURL();
+
+ TomcatManagerResponse tomcatResponse = getManager().deployContext(
getPath(), contextURL, warURL, isUpdate(), getTag() );
+
+ checkTomcatResponse( tomcatResponse );
+
+ log( tomcatResponse.getHttpResponseBody() );
+ }
+}
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java?rev=1756441&view=auto
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java
(added)
+++
tomcat/maven-plugin/trunk/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java
Tue Aug 16 01:03:14 2016
@@ -0,0 +1,95 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * @author olamy
+ * @since 1.0-alpha-2
+ */
+public class AbstractDeployWarMojo
+ extends AbstractDeployMojo
+{
+ // ----------------------------------------------------------------------
+ // Mojo Parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * The path of the WAR file to deploy.
+ */
+ @Parameter( defaultValue =
"${project.build.directory}/${project.build.finalName}.war", required = true )
+ private File warFile;
+
+ // ----------------------------------------------------------------------
+ // Protected Methods
+ // ----------------------------------------------------------------------
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected File getWarFile()
+ {
+ return warFile;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void validateWarFile()
+ throws MojoExecutionException
+ {
+ if ( !warFile.exists() || !warFile.isFile() )
+ {
+ throw new MojoExecutionException(
+ messagesProvider.getMessage( "DeployMojo.missingWar",
warFile.getPath() ) );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void deployWar()
+ throws MojoExecutionException, TomcatManagerException, IOException
+ {
+ validateWarFile();
+
+ getLog().info( messagesProvider.getMessage(
"AbstractDeployMojo.deployingWar", getDeployedURL() ) );
+
+ TomcatManagerResponse tomcatManagerResponse =
+ getManager().deploy( getPath(), warFile, isUpdate(), getTag(),
warFile.length() );
+
+ checkTomcatResponse( tomcatManagerResponse );
+
+ getLog().info( "tomcatManager status code:" +
tomcatManagerResponse.getStatusCode() + ", ReasonPhrase:"
+ + tomcatManagerResponse.getReasonPhrase() );
+
+ log( tomcatManagerResponse.getHttpResponseBody() );
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]