Skip to content

Commit

Permalink
Merge pull request #158 from rhusar/149
Browse files Browse the repository at this point in the history
Restore remote version #149
  • Loading branch information
rhusar authored May 14, 2024
2 parents 8402101 + fdbb0a7 commit fe4c406
Show file tree
Hide file tree
Showing 18 changed files with 533 additions and 13 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,8 @@
<module>tomcat-managed-parent</module>
<module>tomcat-managed-common</module>
<module>tomcat-managed-10</module>
<module>tomcat-remote-parent</module>
<module>tomcat-remote-common</module>
<module>tomcat-remote-10</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public final class TestDeploymentFactory {

public static final String TEST_WELCOME_FILE = "index.jsp";

public static final String SERVLET_5 = "5.0";
public static final String SERVLET_5_0 = "5.0";

public static final String ROOT_CONTEXT = "ROOT";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.jboss.arquillian.container.tomcat.embedded;

import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.ROOT_CONTEXT;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5_0;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.TEST_CONTEXT;

import org.jboss.arquillian.container.test.api.Deployment;
Expand All @@ -39,12 +39,12 @@ public class Tomcat10EmbeddedClientIT extends TomcatClientITBase {
@Deployment(name = ROOT_CONTEXT, testable = false)
public static WebArchive createRootDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(ROOT_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(ROOT_CONTEXT, SERVLET_5_0);
}

@Deployment(name = TEST_CONTEXT, testable = false)
public static WebArchive createTestDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(TEST_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(TEST_CONTEXT, SERVLET_5_0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.jboss.arquillian.container.tomcat.embedded;

import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.ROOT_CONTEXT;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5_0;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.TEST_CONTEXT;

import org.jboss.arquillian.container.test.api.Deployment;
Expand All @@ -35,12 +35,12 @@ public class Tomcat10EmbeddedInContainerIT extends TomcatInContainerITBase {
@Deployment(name = ROOT_CONTEXT)
public static WebArchive createRootDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(ROOT_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(ROOT_CONTEXT, SERVLET_5_0);
}

@Deployment(name = TEST_CONTEXT)
public static WebArchive createTestDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(TEST_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(TEST_CONTEXT, SERVLET_5_0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.jboss.arquillian.container.tomcat.managed;

import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.ROOT_CONTEXT;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5_0;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.TEST_CONTEXT;

import org.jboss.arquillian.container.test.api.Deployment;
Expand All @@ -40,12 +40,12 @@ public class Tomcat10ManagedClientIT extends TomcatClientITBase {
@Deployment(name = ROOT_CONTEXT, testable = false)
public static WebArchive createRootDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(ROOT_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(ROOT_CONTEXT, SERVLET_5_0);
}

@Deployment(name = TEST_CONTEXT, testable = false)
public static WebArchive createTestDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(TEST_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(TEST_CONTEXT, SERVLET_5_0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.jboss.arquillian.container.tomcat.managed;

import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.ROOT_CONTEXT;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.SERVLET_5_0;
import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.TEST_CONTEXT;

import org.jboss.arquillian.container.test.api.Deployment;
Expand All @@ -38,12 +38,12 @@ public class Tomcat10ManagedInContainerIT extends TomcatInContainerITBase {
@Deployment(name = ROOT_CONTEXT)
public static WebArchive createRootDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(ROOT_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(ROOT_CONTEXT, SERVLET_5_0);
}

@Deployment(name = TEST_CONTEXT)
public static WebArchive createTestDeployment() {

return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(TEST_CONTEXT, SERVLET_5);
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(TEST_CONTEXT, SERVLET_5_0);
}
}
37 changes: 37 additions & 0 deletions tomcat-remote-10/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-tomcat-remote-parent</artifactId>
<version>1.2.1-SNAPSHOT</version>
<relativePath>../tomcat-remote-parent/pom.xml</relativePath>
</parent>

<artifactId>arquillian-tomcat-remote-10</artifactId>
<name>Arquillian Tomcat Remote 10.x Container</name>

<properties>
<tomcat.major.version>10</tomcat.major.version>
<tomcat.version>${tomcat.major.version}.1.19</tomcat.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>tomcat${tomcat.major.version}x</containerId>
<zipUrlInstaller>
<url>https://archive.apache.org/dist/tomcat/tomcat-${tomcat.major.version}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip</url>
</zipUrlInstaller>
</container>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2014, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed 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.jboss.arquillian.container.tomcat.remote;

import org.jboss.arquillian.container.spi.client.container.DeployableContainer;
import org.jboss.arquillian.container.spi.client.protocol.ProtocolDescription;
import org.jboss.arquillian.container.tomcat.Tomcat7ManagerCommandSpec;

/**
* Arquillian {@link DeployableContainer} implementation for a remote Tomcat server; responsible for both deployment
* operations.
*
* @author <a href="mailto:[email protected]">Karel Piwko</a>
* @author <a href="mailto:[email protected]">Ondrej Zizka</a>
*/
public class Tomcat10RemoteContainer extends TomcatRemoteContainer {

public Tomcat10RemoteContainer() {
super(new ProtocolDescription("Servlet 5.0"), new Tomcat7ManagerCommandSpec());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed 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.jboss.arquillian.container.tomcat.remote;

import org.jboss.arquillian.container.spi.client.container.DeployableContainer;
import org.jboss.arquillian.core.spi.LoadableExtension;

/**
* @author <a href="mailto:[email protected]">Aslak Knutsen</a>
*/
public class Tomcat10RemoteExtension implements LoadableExtension {

@Override
public void register(final ExtensionBuilder builder) {
builder.service(DeployableContainer.class, Tomcat10RemoteContainer.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.jboss.arquillian.container.tomcat.remote.Tomcat10RemoteExtension
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed 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.jboss.arquillian.container.tomcat.remote;

import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.*;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.tomcat.test.TomcatClientITBase;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.runner.RunWith;

/**
* Tests that Tomcat deployments into the Tomcat server work through the Arquillian lifecycle
*
* @author <a href="mailto:[email protected]">Jean Deruelle</a>
* @author Dan Allen
*/
@RunWith(Arquillian.class)
public class Tomcat10RemoteClientIT extends TomcatClientITBase {

@Deployment(name = ROOT_CONTEXT, testable = false)
public static WebArchive createRootDeployment() {
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(ROOT_CONTEXT, SERVLET_5_0);
}

@Deployment(name = TEST_CONTEXT, testable = false)
public static WebArchive createTestDeployment() {
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(TEST_CONTEXT, SERVLET_5_0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed 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.jboss.arquillian.container.tomcat.remote;

import static org.jboss.arquillian.container.tomcat.test.TestDeploymentFactory.*;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.tomcat.test.TomcatInContainerITBase;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.runner.RunWith;

/**
* Tests that Tomcat deployments into the Tomcat server work through the Arquillian lifecycle
*
* @author Dan Allen
*/
@RunWith(Arquillian.class)
public class Tomcat10RemoteInContainerIT extends TomcatInContainerITBase {

@Deployment(name = ROOT_CONTEXT)
public static WebArchive createRootDeployment() {
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(ROOT_CONTEXT, SERVLET_5_0);
}

@Deployment(name = TEST_CONTEXT)
public static WebArchive createTestDeployment() {
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(TEST_CONTEXT, SERVLET_5_0);
}
}
13 changes: 13 additions & 0 deletions tomcat-remote-10/src/test/resources/arquillian.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<container qualifier="tomcat" default="true">
<configuration>
<property name="jmxPort">${test.jmx.port}</property>
<property name="httpPort">${test.http.port}</property>
<property name="user">${test.manager.username}</property>
<property name="pass">${test.manager.password}</property>
</configuration>
</container>
</arquillian>
7 changes: 7 additions & 0 deletions tomcat-remote-10/src/test/resources/tomcat-users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>

<role rolename="manager-script"/>
<user username="${test.manager.username}" password="${test.manager.password}" roles="manager-script"/>

</tomcat-users>
52 changes: 52 additions & 0 deletions tomcat-remote-common/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-parent-tomcat</artifactId>
<version>1.2.1-SNAPSHOT</version>
</parent>

<artifactId>arquillian-tomcat-remote-common</artifactId>
<name>Arquillian Tomcat Remote Container Common</name>

<dependencies>

<!-- Compile Scope -->

<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-tomcat-common</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Test Scope -->

<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-tomcat-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit fe4c406

Please sign in to comment.