-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore managed version (close #142)
- Loading branch information
Showing
19 changed files
with
1,052 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app version="3.1" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"> | ||
|
||
<env-entry> | ||
<env-entry-name>resourceInjectionTestName</env-entry-name> | ||
<env-entry-type>java.lang.String</env-entry-type> | ||
<env-entry-value>Hello World from an evn-entry</env-entry-value> | ||
</env-entry> | ||
|
||
<listener> | ||
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class> | ||
</listener> | ||
|
||
<servlet> | ||
<servlet-name>TestServlet</servlet-name> | ||
<servlet-class>org.jboss.arquillian.container.tomcat.test.TestServlet</servlet-class> | ||
</servlet> | ||
|
||
<servlet-mapping> | ||
<servlet-name>TestServlet</servlet-name> | ||
<url-pattern>/Test</url-pattern> | ||
</servlet-mapping> | ||
|
||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app version="3.1" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"> | ||
|
||
<servlet> | ||
<servlet-name>TestServlet</servlet-name> | ||
<servlet-class>org.jboss.arquillian.container.tomcat.test.TestServlet</servlet-class> | ||
</servlet> | ||
|
||
<servlet-mapping> | ||
<servlet-name>TestServlet</servlet-name> | ||
<url-pattern>/Test</url-pattern> | ||
</servlet-mapping> | ||
|
||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +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="tomcatHome">target/tomcat-embedded-10</property> | ||
<property name="workDir">work</property> | ||
<property name="bindHttpPort">8888</property> | ||
<property name="unpackArchive">true</property> | ||
</configuration> | ||
</container> | ||
</arquillian> | ||
<?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="tomcatHome">target/tomcat-embedded-10</property> | ||
<property name="workDir">work</property> | ||
<property name="bindHttpPort">8888</property> | ||
<property name="unpackArchive">true</property> | ||
</configuration> | ||
</container> | ||
</arquillian> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<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-managed-parent</artifactId> | ||
<version>1.2.1-SNAPSHOT</version> | ||
<relativePath>../tomcat-managed-parent/pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>arquillian-tomcat-managed-10</artifactId> | ||
<name>Arquillian Container Tomcat Managed 10.x</name> | ||
|
||
<properties> | ||
<tomcat.major.version>10</tomcat.major.version> | ||
<tomcat.version>${tomcat.major.version}.1.19</tomcat.version> | ||
<test.catalina.home>${project.build.directory}/cargo/installs/apache-tomcat-${tomcat.version}/apache-tomcat-${tomcat.version}</test.catalina.home> | ||
<test.catalina.base>${project.build.directory}/cargo/configurations/tomcat${tomcat.major.version}x</test.catalina.base> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>3.1.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.cargo</groupId> | ||
<artifactId>cargo-maven2-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>install-container</id> | ||
<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> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
40 changes: 40 additions & 0 deletions
40
...src/main/java/org/jboss/arquillian/container/tomcat/managed/Tomcat10ManagedContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* 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.managed; | ||
|
||
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; | ||
|
||
/** | ||
* <p> | ||
* Arquillian {@link DeployableContainer} implementation for an Managed Tomcat server; responsible for both lifecycle and | ||
* deployment operations. | ||
* </p> | ||
* | ||
* @author <a href="mailto:[email protected]">Karel Piwko</a> | ||
* @author <a href="mailto:[email protected]">Juraj Huska</a> | ||
* @author <a href="mailto:[email protected]">Ondrej Zizka</a> | ||
* @author <a href="mailto:[email protected]">Dimitrij Drus</a> | ||
* @version $Revision: #1 $ | ||
*/ | ||
public class Tomcat10ManagedContainer extends TomcatManagedContainer { | ||
|
||
public Tomcat10ManagedContainer() { | ||
super(new ProtocolDescription("Servlet 5.0"), new Tomcat7ManagerCommandSpec()); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...src/main/java/org/jboss/arquillian/container/tomcat/managed/Tomcat10ManagedExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.jboss.arquillian.container.tomcat.managed; | ||
|
||
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; | ||
import org.jboss.arquillian.core.spi.LoadableExtension; | ||
|
||
public class Tomcat10ManagedExtension implements LoadableExtension { | ||
|
||
@Override | ||
public void register(final ExtensionBuilder builder) { | ||
builder.service(DeployableContainer.class, Tomcat10ManagedContainer.class); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...d-10/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.jboss.arquillian.container.tomcat.managed.Tomcat10ManagedExtension |
51 changes: 51 additions & 0 deletions
51
.../src/test/java/org/jboss/arquillian/container/tomcat/managed/Tomcat10ManagedClientIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* 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.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.TEST_CONTEXT; | ||
|
||
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 8 server work through the Arquillian lifecycle | ||
* | ||
* @author <a href="mailto:[email protected]">Jean Deruelle</a> | ||
* @author Dan Allen | ||
* @author <a href="mailto:[email protected]">Dimitrij Drus</a> | ||
* @version $Revision: $ | ||
*/ | ||
@RunWith(Arquillian.class) | ||
public class Tomcat10ManagedClientIT extends TomcatClientITBase { | ||
|
||
@Deployment(name = ROOT_CONTEXT, testable = false) | ||
public static WebArchive createRootDeployment() { | ||
|
||
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(ROOT_CONTEXT, SERVLET_5); | ||
} | ||
|
||
@Deployment(name = TEST_CONTEXT, testable = false) | ||
public static WebArchive createTestDeployment() { | ||
|
||
return TEST_DEPLOYMENT_FACTORY.createWebAppClientDeployment(TEST_CONTEXT, SERVLET_5); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...test/java/org/jboss/arquillian/container/tomcat/managed/Tomcat10ManagedInContainerIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* 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.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.TEST_CONTEXT; | ||
|
||
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 8 server work through the Arquillian lifecycle | ||
* | ||
* @author <a href="mailto:[email protected]">Dimitrij Drus</a> | ||
* @version $Revision: $ | ||
*/ | ||
@RunWith(Arquillian.class) | ||
public class Tomcat10ManagedInContainerIT extends TomcatInContainerITBase { | ||
|
||
@Deployment(name = ROOT_CONTEXT) | ||
public static WebArchive createRootDeployment() { | ||
|
||
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(ROOT_CONTEXT, SERVLET_5); | ||
} | ||
|
||
@Deployment(name = TEST_CONTEXT) | ||
public static WebArchive createTestDeployment() { | ||
|
||
return TEST_DEPLOYMENT_FACTORY.createWebAppInContainerDeployment(TEST_CONTEXT, SERVLET_5); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?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="catalinaHome">${test.catalina.home}</property> | ||
<property name="catalinaBase">${test.catalina.base}</property> | ||
<property name="javaVmArguments">-Xmx1024m -XX:MaxPermSize=512m</property> | ||
<property name="jmxPort">${test.jmx.port}</property> | ||
<property name="bindHttpPort">${test.http.port}</property> | ||
<property name="serverConfig">server.xml</property> | ||
<property name="user">${test.manager.username}</property> | ||
<property name="pass">${test.manager.password}</property> | ||
</configuration> | ||
</container> | ||
|
||
</arquillian> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?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-managed-common</artifactId> | ||
<name>Arquillian Tomcat Managed 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> |
Oops, something went wrong.