Author: olamy Date: Mon Oct 10 07:47:51 2011 New Revision: 1180809 URL: http://svn.apache.org/viewvc?rev=1180809&view=rev Log: add an other integration test for tomcat7 plugin
Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/java/org/apache/tomcat/maven/plugin/tomcat7/Tomcat7RunMultiConfigIT.java (with props) tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml (with props) tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt (with props) tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp (with props) tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml (with props) tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java (with props) Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/java/org/apache/tomcat/maven/plugin/tomcat7/Tomcat7RunMultiConfigIT.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/java/org/apache/tomcat/maven/plugin/tomcat7/Tomcat7RunMultiConfigIT.java?rev=1180809&view=auto ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/java/org/apache/tomcat/maven/plugin/tomcat7/Tomcat7RunMultiConfigIT.java (added) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/java/org/apache/tomcat/maven/plugin/tomcat7/Tomcat7RunMultiConfigIT.java Mon Oct 10 07:47:51 2011 @@ -0,0 +1,36 @@ +package org.apache.tomcat.maven.plugin.tomcat7; +/* + * 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.it.VerificationException; +import org.codehaus.mojo.tomcat.it.AbstractTomcatRunMultiConfigIT; + +/** + * @author Olivier Lamy + */ +public class Tomcat7RunMultiConfigIT + extends AbstractTomcatRunMultiConfigIT +{ + @Override + protected void verifyConnectorsStarted() + throws VerificationException + { + verifier.verifyTextInLog("INFO: Starting ProtocolHandler [\"http-bio-" + getHttpItPort() + "\"]"); + } +} Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/java/org/apache/tomcat/maven/plugin/tomcat7/Tomcat7RunMultiConfigIT.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/java/org/apache/tomcat/maven/plugin/tomcat7/Tomcat7RunMultiConfigIT.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml?rev=1180809&view=auto ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml (added) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml Mon Oct 10 07:47:51 2011 @@ -0,0 +1,137 @@ +<?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.codehaus.mojo.tomcat.it</groupId> + <artifactId>tomcat-run-multi-config</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>war</packaging> + + <properties> + <!-- Set to false if you want to debug the tomcat --> + <maven.tomcat.fork>true</maven.tomcat.fork> + <pluginVersion>${project.version}</pluginVersion> + <maven.compiler.source>${maven.compiler.source}</maven.compiler.source> + <maven.compiler.target>${maven.compiler.target}</maven.compiler.target> + <project.build.sourceEncoding>${project.build.sourceEncoding}</project.build.sourceEncoding> + <failOnMissingWebXml>false</failOnMissingWebXml> + </properties> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.tomcat.maven</groupId> + <artifactId>tomcat7-maven-plugin</artifactId> + <version>${project.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>run</goal> + </goals> + <phase>pre-integration-test</phase> + <configuration> + <additionalConfigFilesDir>\${basedir}/src/main/tcconf</additionalConfigFilesDir> + <configurationDir>\${project.build.directory}/tc</configurationDir> + <path>/multi-config</path> + <port>${its.http.port}</port> + <!-- + <httpsPort>8002</httpsPort> + <keystoreFile>\${basedir}/src/keystore</keystoreFile> + <ajpPort>8003</ajpPort> + --> + <uriEncoding>UTF-8</uriEncoding> + <systemProperties> + <com.sun.management.jmxremote.ssl>false</com.sun.management.jmxremote.ssl> + </systemProperties> + </configuration> + </execution> + <execution> + <id>tomcat-shutdown</id> + <goals> + <goal>shutdown</goal> + </goals> + <phase>post-integration-test</phase> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <version>${failsafe.version}</version> + <executions> + <execution> + <id>integration-test</id> + <goals> + <goal>integration-test</goal> + </goals> + </execution> + <execution> + <id>verify</id> + <goals> + <goal>verify</goal> + </goals> + </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>${junit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>jstl</groupId> + <artifactId>jstl</artifactId> + <version>1.1.2</version> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.1.2</version> + </dependency> + </dependencies> + +</project> Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt?rev=1180809&view=auto ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt (added) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt Mon Oct 10 07:47:51 2011 @@ -0,0 +1,19 @@ + ~~ 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. + + ~~ NOTE: For help with the syntax of this file, see: + ~~ http://maven.apache.org/doxia/references/apt-format.html \ No newline at end of file Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp?rev=1180809&view=auto ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp (added) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp Mon Oct 10 07:47:51 2011 @@ -0,0 +1,40 @@ +<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%-- + 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. +--%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<title>Example</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +</head> +<body> +<p> +<c:choose> + <c:when test="${empty param.string}"> + Not set. + </c:when> + <c:otherwise> + String: <b><c:out value="${param.string}" /></b>! + </c:otherwise> +</c:choose> +</p> +</body> +</html> + + + Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml?rev=1180809&view=auto ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml (added) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml Mon Oct 10 07:47:51 2011 @@ -0,0 +1,38 @@ +<?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"> + +<jsp-config> + <taglib> + <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> + <taglib-location>/WEB-INF/tld/c.tld</taglib-location> + </taglib> +</jsp-config> + <!-- + <taglib> + <taglib-uri>http://java.sun.com/jstl/core</taglib-uri> + <taglib-location>/WEB-INF/c.tld</taglib-location> + </taglib> +--> + +</web-app> Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java?rev=1180809&view=auto ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java (added) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java Mon Oct 10 07:47:51 2011 @@ -0,0 +1,30 @@ +import org.junit.Test; + +/* + * 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. + */ + + +@SuppressWarnings({"WrongPackageStatement"}) +public final class WaitIT { + @Test + public void testWait() throws Exception { + System.out.println("Just wait a while..."); + Thread.sleep(${it.sleep.time}); + } +} Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org