Merge r1746109 to the 1.7 branch.
diff --git a/modules/webapp/pom.xml b/modules/webapp/pom.xml
index defecd3..ffdf35b 100644
--- a/modules/webapp/pom.xml
+++ b/modules/webapp/pom.xml
@@ -309,7 +309,6 @@
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <version>8.1.16.v20140903</version>
<configuration>
<webXml>conf/web.xml</webXml>
<contextXml>conf/jetty.xml</contextXml>
diff --git a/pom.xml b/pom.xml
index 77d47a7..b6f7fc3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,6 +96,7 @@
<module>modules/transport/xmpp</module>
<module>modules/distribution</module>
<module>modules/samples</module>
+ <module>systests</module>
</modules>
<profiles>
<profile>
@@ -1198,6 +1199,11 @@
<artifactId>alta-maven-plugin</artifactId>
<version>0.4</version>
</plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>8.1.16.v20140903</version>
+ </plugin>
<!-- Use 1.5.2 versions of the aar and mar plugins in order to avoid
the chicken and egg problem. -->
diff --git a/systests/pom.xml b/systests/pom.xml
new file mode 100644
index 0000000..af68125
--- /dev/null
+++ b/systests/pom.xml
@@ -0,0 +1,46 @@
+<?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>
+ <parent>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2</artifactId>
+ <version>1.7.3-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>systests</artifactId>
+ <packaging>pom</packaging>
+ <url>http://axis.apache.org/axis2/java/core/</url>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>webapp-tests</module>
+ </modules>
+</project>
diff --git a/systests/webapp-tests/pom.xml b/systests/webapp-tests/pom.xml
new file mode 100644
index 0000000..5141c3b
--- /dev/null
+++ b/systests/webapp-tests/pom.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+<!--
+ ~ 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>
+ <parent>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>systests</artifactId>
+ <version>1.7.3-SNAPSHOT</version>
+ </parent>
+ <artifactId>webapp-tests</artifactId>
+ <url>http://axis.apache.org/axis2/java/core/</url>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-webapp</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.jwebunit</groupId>
+ <artifactId>jwebunit-htmlunit-plugin</artifactId>
+ <version>3.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <version>1.6.6</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <!-- htmlunit requires newer versions of certain libraries -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ <version>4.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.veithen.alta</groupId>
+ <artifactId>alta-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-properties</goal>
+ </goals>
+ <configuration>
+ <name>webapp</name>
+ <value>%file%</value>
+ <artifacts>
+ <artifact>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axis2-webapp</artifactId>
+ <type>war</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>reserve-network-port</id>
+ <goals>
+ <goal>reserve-network-port</goal>
+ </goals>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <portNames>
+ <portName>jetty.stopPort</portName>
+ <portName>jetty.httpPort</portName>
+ </portNames>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <configuration>
+ <stopKey>foo</stopKey>
+ <stopPort>${jetty.stopPort}</stopPort>
+ <connectors>
+ <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <port>${jetty.httpPort}</port>
+ </connector>
+ </connectors>
+ <war>${webapp}</war>
+ <webApp>
+ <contextPath>/axis2</contextPath>
+ </webApp>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start-jetty</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>deploy-war</goal>
+ </goals>
+ <configuration>
+ <!-- TODO: necessary? -->
+ <daemon>true</daemon>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-jetty</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <systemPropertyVariables>
+ <jetty.httpPort>${jetty.httpPort}</jetty.httpPort>
+ </systemPropertyVariables>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java b/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java
new file mode 100644
index 0000000..7a1aa59
--- /dev/null
+++ b/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+package org.apache.axis2.webapp;
+
+import static net.sourceforge.jwebunit.junit.JWebUnit.*;
+
+import org.junit.Test;
+
+public class WebappITCase {
+ @Test
+ public void test() {
+ setBaseUrl("http://localhost:" + System.getProperty("jetty.httpPort", "8080") + "/axis2/axis2-admin");
+ beginAt("/");
+ setTextField("userName", "admin");
+ setTextField("password", "axis2");
+ submit();
+ clickLinkWithText("Available Services");
+ assertMatch("Service EPR : http://localhost:[0-9]+/axis2/services/Version");
+ }
+}