Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GlassFish runner to use downloaded Servlet 6.1.0 TCK. #1314

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 9 additions & 246 deletions glassfish-runner/servlet-tck/pom.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2021 Contributors to the Eclipse Foundation
All rights reserved.
Copyright (c) 2024 Contributors to the Eclipse Foundation.
Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -15,9 +14,9 @@
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<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>
Expand All @@ -27,247 +26,11 @@
</parent>

<artifactId>servlet-tck</artifactId>
<packaging>jar</packaging>

<name>servlet-tck</name>

<properties>
<arquillian.core.version>1.7.0.Alpha10</arquillian.core.version>
<classesNamesTests></classesNamesTests>
<failIfNoTests>true</failIfNoTests>
<fork.argLine>-Xmx4g -Xms4g</fork.argLine>
<gf.keystore.path>${glassfish.home}/glassfish/domains/domain1/config/cacerts.jks</gf.keystore.path>
<glassfish.bin.directory>${glassfish.home}/bin</glassfish.bin.directory>
<glassfish.debug>false</glassfish.debug>
<!-- home depends on version number -->
<glassfish.home>${glassfish.root}/glassfish6</glassfish.home>
<glassfish.root>${project.build.directory}/glassfish-root</glassfish.root>
<glassfish.suspend>false</glassfish.suspend>
<glassfish.version>6.2.5</glassfish.version>
<http2.timeout></http2.timeout>
<test></test>
</properties>

<dependencies>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>servlet</artifactId>
<version>11.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>libutil</artifactId>
<version>11.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-test-spi</artifactId>
<version>${arquillian.core.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit5</groupId>
<artifactId>arquillian-junit5-container</artifactId>
<version>${arquillian.core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.omnifaces.arquillian</groupId>
<artifactId>arquillian-glassfish-server-managed</artifactId>
<version>1.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>jakarta.staging</id>
<name>Jakarta Staging</name>
<url>https://jakarta.oss.sonatype.org/content/repositories/staging/</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-certificates</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>generate-test-resources</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>jakarta.tck</groupId>
<artifactId>libutil</artifactId>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.testOutputDirectory}/</outputDirectory>
<includes>**/**cts_cert,**/**clientcert.jks,**/**clientcert.p12</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>unpack-glassfish</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>generate-test-resources</phase>
<configuration>
<outputDirectory>${glassfish.root}</outputDirectory>
<markersDirectory>${glassfish.root}/dependency-maven-plugin-markers</markersDirectory>
<artifactItems>
<artifactItem>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>glassfish</artifactId>
<version>${glassfish.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${glassfish.root}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-antrun-plugin</artifactId>-->
<!-- <version>3.1.0</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>clean-certificate</id>-->
<!-- <phase>process-test-resources</phase>-->
<!-- <goals>-->
<!-- <goal>run</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <target>-->
<!-- <delete file="${glassfish.home}/glassfish/domains/domain1/config/cacerts.jks"-->
<!-- verbose="true"/>-->
<!-- </target>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>keytool-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<!-- "$JAVA_HOME/bin/keytool -import -noprompt -alias cts -dname \"CN=CTS, OU=Java Software, O=Sun Microsystems Inc., L=Burlington, ST=MA, C=US\"
-file servlet-tck/bin/certificates/cts_cert -storetype JKS -keystore cacerts.jks -storepass changeit -keypass changeit" -->
<noprompt>true</noprompt>
<alias>cts</alias>
<dname>CN=CTS, OU=Java Software, O=Sun Microsystems Inc., L=Burlington, ST=MA, C=US</dname>
<file>${project.build.testOutputDirectory}/certificates/cts_cert</file>
<storetype>JKS</storetype>
<keystore>${gf.keystore.path}</keystore>
<storepass>changeit</storepass>
<keypass>changeit</keypass>
<skipIfExist>false</skipIfExist>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<id>import-certificate</id>
<goals>
<goal>importCertificate</goal>
</goals>
<phase>process-test-resources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${fork.argLine} -Duser.language=en -Duser.country=US -Djava.locale.providers=COMPAT,CLDR
-Djava.protocol.handler.pkgs=javax.net.ssl
-Djavax.net.ssl.keyStore=${project.build.testOutputDirectory}/certificates/clientcert.jks
-Djavax.net.ssl.keyStorePassword=changeit
-Djavax.net.ssl.trustStore=${glassfish.home}/glassfish/domains/domain1/config/cacerts.jks</argLine>
<failIfNoTests>false</failIfNoTests>
<failIfNoSpecifiedTests>true</failIfNoSpecifiedTests>
<dependenciesToScan>
<dependenciesToScan>jakarta.tck:servlet</dependenciesToScan>
</dependenciesToScan>
<includes>
<include>**/URLClient*</include>
<include>**/Client*</include>
</includes>
<systemPropertyVariables>
<glassfish.home>${glassfish.home}</glassfish.home>
<test>${test}</test>
<failIfNoTests>${failIfNoTests}</failIfNoTests>
<http2.timeout>${http2.timeout}</http2.timeout>
<glassfish.postBootCommands>set server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true
create-file-user --passwordfile src/test/resources/j2ee.pass --groups Administrator:Employee j2ee
list-file-users</glassfish.postBootCommands>
<!--
delete-file-user j2ee
create-file-user -passwordfile src/test/resources/j2ee.pass -groups Administrator:Employee j2ee
delete-file-user javajoe
create-file-user -passwordfile src/test/resources/javajoe.pass -groups VP:Manager javajoe
delete-file-user "CN=CTS, OU=Java Software, O=Sun Microsystems Inc., L=Burlington, ST=MA, C=US="
<version>6.1.0-SNAPSHOT</version>
<packaging>pom</packaging>

-->
<!--
delete-file-user "CN=CTS, OU=Java Software, O=Sun Microsystems Inc., L=Burlington, ST=MA, C=US="
create-file-user -passwordfile src/test/resources/admin.pass -groups Administrator "CN=CTS, OU=Java Software, O=Sun Microsystems Inc., L=Burlington, ST=MA, C=US="
-->
<!--
set configs.config.server-config.network-config.protocols.protocol.http-listener-2.security-enabled=true
set configs.config.server-config.network-config.protocols.protocol.http-listener-2.ssl.tls-enabled=true
set configs.config.server-config.network-config.protocols.protocol.http-listener-2.ssl.tls11-enabled=true
set configs.config.server-config.network-config.protocols.protocol.http-listener-2.ssl.tls12-enabled=true
set configs.config.server-config.network-config.protocols.protocol.http-listener-2.ssl.tls13-enabled=true
-->
<!-- set configs.config.server-config.network-config.protocols.protocol.http-listener-2.ssl.cert-nickname=cts -->
<tck.servlet.username>j2ee</tck.servlet.username>
<tck.servlet.password>j2ee</tck.servlet.password>
<tck.servlet.unauth.username>javajoe</tck.servlet.unauth.username>
<tck.servlet.unauth.password>javajoe</tck.servlet.unauth.password>
<tck.servlet.realm></tck.servlet.realm>
<securedWebServicePort>8181</securedWebServicePort>
<glassfish.debug>${glassfish.debug}</glassfish.debug>
<glassfish.suspend>${glassfish.suspend}</glassfish.suspend>
<!-- <client.cert.test.jdk.tls.client.protocols>TLSv1.3</client.cert.test.jdk.tls.client.protocols>-->
<keystore.path>${gf.keystore.path}</keystore.path>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>servlet-tck-install</module>
<module>servlet-tck-run</module>
</modules>
</project>
115 changes: 115 additions & 0 deletions glassfish-runner/servlet-tck/servlet-tck-install/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation. All rights reserved.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.glassfish</groupId>
<artifactId>servlet-tck</artifactId>
<version>6.1.0-SNAPSHOT</version>
</parent>

<artifactId>servlet-tck-install</artifactId>
<packaging>pom</packaging>
<name>TCK: Install Jakarta Servlet TCK</name>

<properties>
<tck.test.servlet.file>jakarta-servlet-tck-${tck.test.servlet.version}.zip</tck.test.servlet.file>
<tck.test.servlet.url>https://download.eclipse.org/ee4j/servlet/jakartaee11/staged/eftl/${tck.test.servlet.file}</tck.test.servlet.url>
<tck.test.servlet.version>6.1.0</tck.test.servlet.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.9.0</version>
<configuration>
<url>${tck.test.servlet.url}</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
<executions>
<execution>
<id>download-servlet-tck</id>
<goals>
<goal>wget</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-servlet-tck-pom</id>
<goals>
<goal>install-file</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<file>${project.build.directory}/servlet-tck/artifacts/servlet-tck-${tck.test.servlet.version}.pom</file>
<groupId>jakarta.tck</groupId>
<artifactId>servlet-tck</artifactId>
<version>${tck.test.servlet.version}</version>
<packaging>pom</packaging>
</configuration>
</execution>

<execution>
<id>install-servlet-tck-runtime</id>
<goals>
<goal>install-file</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<file>${project.build.directory}/servlet-tck/artifacts/servlet-tck-runtime-${tck.test.servlet.version}.jar</file>
<groupId>jakarta.tck</groupId>
<artifactId>servlet-tck-runtime</artifactId>
<version>${tck.test.servlet.version}</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
</execution>

<execution>
<id>install-servlet-tck-util</id>
<goals>
<goal>install-file</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<file>${project.build.directory}/servlet-tck/artifacts/servlet-tck-util-${tck.test.servlet.version}.jar</file>
<groupId>jakarta.tck</groupId>
<artifactId>servlet-tck-util</artifactId>
<version>${tck.test.servlet.version}</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

</project>
Loading