Skip to content

Commit

Permalink
Merge pull request #74 from Viii3/FISH-8142-Update-Mojarra
Browse files Browse the repository at this point in the history
FISH-8142 Update Mojarra
  • Loading branch information
Viii3 authored Aug 29, 2024
2 parents ee62133 + b98db6e commit fd12265
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 45 deletions.
125 changes: 90 additions & 35 deletions faces-tck/pom.xml-old-tck-run
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation. All rights reserved.
Copyright (c) 2021, 2023 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
Expand All @@ -15,6 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
Portions Copyright [2024] Payara Foundation
-->

<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">
Expand All @@ -23,10 +24,10 @@
<parent>
<groupId>org.eclipse.ee4j.faces.tck</groupId>
<artifactId>old-faces-tck-parent</artifactId>
<version>4.0.1</version>
<version>4.0.3</version>
</parent>

<artifactId>glassfish-external-tck-faces</artifactId>
<artifactId>old-tck-run</artifactId>
<packaging>pom</packaging>

<name>Old Jakarta Faces TCK - run</name>
Expand All @@ -35,16 +36,17 @@
<ant.version>1.10.2</ant.version>
<ant.home>${project.build.directory}/apache-ant-${ant.version}</ant.home>
<ant.zip.url>https://archive.apache.org/dist/ant/binaries/apache-ant-${ant.version}-bin.zip</ant.zip.url>

<tck.home>${project.build.directory}/faces-tck</tck.home>
<tck.tests.home>${tck.home}/src/com/sun/ts/tests</tck.tests.home>
<tck.mode>standalone</tck.mode>

<tck.old.skip>${skipITs}</tck.old.skip>

<glassfish.home>${project.build.directory}/payara6</glassfish.home>
<glassfish.asadmin>${glassfish.home}/glassfish/bin/asadmin</glassfish.asadmin>

<jacoco.includes>org/glassfish/**\:com/sun/enterprise/**</jacoco.includes>

<port.admin>14848</port.admin>
<port.derby>11527</port.derby>
<port.http>18080</port.http>
Expand All @@ -67,7 +69,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.ee4j.faces.tck</groupId>
<artifactId>old-faces-tck</artifactId>
<artifactId>old-tck-build</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>
Expand All @@ -89,7 +91,7 @@
</execution>
</executions>
<configuration>
<skip>${skipITs}</skip>
<skip>${tck.old.skip}</skip>
<url>${ant.zip.url}</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
Expand All @@ -98,9 +100,8 @@

<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<skip>${skipITs}</skip>
<skip>${tck.old.skip}</skip>
</configuration>
<executions>
<execution>
Expand All @@ -121,7 +122,7 @@
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>old-faces-tck</includeArtifactIds>
<includeArtifactIds>old-tck-build</includeArtifactIds>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
Expand Down Expand Up @@ -150,24 +151,24 @@
</dependency>
</dependencies>
<configuration>
<skip>${skipITs}</skip>
<skip>${tck.old.skip}</skip>
</configuration>
<executions>
<execution>
<id>prepare-tck-and-glassfish</id>
<id>prepare-tck-and-payara</id>
<phase>pre-integration-test</phase>
<configuration>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />

<macrodef name="tck-setting">
<attribute name="key" /> <attribute name="value" />
<sequential>
<replaceregexp file="${tck.home}/bin/ts.jte" byline="true"
match="@{key}=.*" replace="@{key}=@{value}" />
</sequential>
</macrodef>

<if>
<equals arg1="${tck.mode}" arg2="platform" />
<then>
Expand All @@ -181,46 +182,91 @@
</elseif>
<else>
<echo message="The value of property ${tck.mode} should be set as standalone or platform " />
<fail/>
</else>
</if>



<!--
Set exclude file
This will exclude everything except for lines matching a pattern, which will not be excluded.
In effect, it works as the reverse and only these tests will be executed.
-->
<sequential if:set="run.test.pattern">
<echo message="Running test pattern ${run.test.pattern}" />

<copy file="${project.basedir}/src/test/etc/ts-all-${tck.mode}.jtx"
tofile="${tck.home}/bin/ts.jtx.tmp" overwrite="true" verbose="true"/>

<replaceregexp file="${tck.home}/bin/ts.jtx.tmp"
match="${run.test.pattern}" replace="" byline="true" />

<copy file="${tck.home}/bin/ts.jtx.tmp"
toFile="${tck.home}/bin/ts.jtx" overwrite="true" verbose="true">
<filterchain>
<ignoreblank/>
</filterchain>
</copy>

<delete file="${tck.home}/bin/ts.jtx.tmp"/>

<if>
<equals arg1="${tck.mode}" arg2="platform" />
<then>
<loadfile srcFile="${tck.home}/bin/ts.jtx.platform" property="ts.jtx.platform" />
<echo append="true" message="${ts.jtx.platform}" file="${tck.home}/bin/ts.jtx"/>
</then>
<elseif>
<equals arg1="${tck.mode}" arg2="standalone" />
<then>
<loadfile srcFile="${tck.home}/bin/ts.jtx.standalone" property="ts.jtx.standalone" />
<echo append="true" message="${ts.jtx.standalone}" file="${tck.home}/bin/ts.jtx"/>
</then>
</elseif>
</if>

</sequential>



<!-- Change configuration -->

<tck-setting key="web.home" value="${glassfish.home}/glassfish"/>
<tck-setting key="webServerHome" value="${glassfish.home}/glassfish"/>
<tck-setting key="webServerHost" value="localhost"/>
<tck-setting key="webServerPort" value="${port.http}"/>

<tck-setting key="securedWebServicePort" value="${port.https}"/>
<tck-setting key="s1as.admin.port" value="${port.admin}"/>
<tck-setting key="glassfish.admin.port" value="${port.admin}"/>
<tck-setting key="orb.port" value="${port.orb}"/>
<tck-setting key="database.port" value="${port.derby}"/>
<tck-setting key="harness.log.port" value="${port.harness.log}"/>

<tck-setting key="report.dir" value="${tck.home}/facesreport/faces"/>
<tck-setting key="work.dir" value="${tck.home}/faceswork/faces"/>

<tck-setting key="impl.vi" value="glassfish"/>
<tck-setting key="impl.vi.deploy.dir" value="${webServerHome}/domains/domain1/autodeploy"/>
<tck-setting key="impl.deploy.timeout.multiplier" value="960"/>

<tck-setting key="jsf.classes" value="${webServerHome}/modules/cdi-api.jar;${webServerHome}/modules/jakarta.servlet.jsp.jstl-api.jar;${webServerHome}/modules/jakarta.inject.jar;${webServerHome}/modules/jakarta.faces.jar;${webServerHome}/modules/jakarta.servlet.jsp-api.jar;${webServerHome}/modules/jakarta.servlet-api.jar;${webServerHome}/modules/expressly.jar"/>

<limit maxwait="60">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin" failonerror="true">
<arg value="delete-domain"/>
<arg value="domain1" />
</exec>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin" failonerror="true">
<arg value="create-domain"/>
<arg value="--domainproperties=domain.adminPort=${port.admin}:domain.instancePort=${port.http}:http.ssl.port=${port.https}:jms.port=${port.jms}:domain.jmxPort=${port.jmx}:orb.listener.port=${port.orb}:orb.ssl.port=${port.orb.ssl}:orb.mutualauth.port=${port.orb.mutual}" />
<arg value="--user=admin" />
<arg value="--nopassword" />
<arg value="domain1" />
</exec>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin" failonerror="true">
<arg value="start-domain"/>
</exec>

Expand All @@ -234,15 +280,15 @@
</exec>
</then>
</if>
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin" failonerror="true">
<arg value="stop-domain"/>
<arg value="domain1"/>
</exec>
</limit>

<mkdir dir="${tck.home}/facesreport"/>
<mkdir dir="${tck.home}/facesreport/faces"/>

<replace file="${tck.home}/bin/xml/ts.top.import.xml" if:set="suspend-tck" >
<replacetoken><![CDATA[<jvmarg value="-Xmx512m"/>]]></replacetoken>
<replacevalue><![CDATA[<jvmarg value="-Xmx512m"/>
Expand All @@ -263,31 +309,31 @@
</goals>
<configuration>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<replace file="${glassfish.home}/glassfish/domains/domain1/config/domain.xml"
<replace file="${glassfish.home}/glassfish/domains/domain1/config/domain.xml"
token="-Xmx512m" value="-Xmx1024m" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />

<limit maxwait="300">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin" failonerror="true">
<arg value="start-domain"/>
<arg value="--suspend" if:set="glassfish.suspend"/>
</exec>
</limit>

<!-- Deploy single test -->
<sequential if:set="run.test" >
<dirname property="test.dir" file="${tck.home}/src/${run.test}"/>
<echo>Deploying from ${test.dir}</echo>
<exec executable="${ant.home}/bin/ant" dir="${test.dir}">

<exec executable="${ant.home}/bin/ant" dir="${test.dir}" failonerror="true">
<arg value="deploy" />
</exec>
</sequential>

<!-- Deploy all tests -->
<sequential unless:set="run.test" >
<echo>Deploying all archives</echo>
<exec executable="${ant.home}/bin/ant" dir="${tck.tests.home}">
<exec executable="${ant.home}/bin/ant" dir="${tck.tests.home}" failonerror="true">
<arg value="-Dutil.dir=${tck.home}" />
<arg value="deploy.all" />
</exec>
Expand Down Expand Up @@ -329,6 +375,15 @@
<exec executable="${glassfish.asadmin}" dir="${glassfish.home}/glassfish/bin">
<arg value="stop-domain" />
</exec>

<if>
<not>
<equals arg1="${testResult}" arg2="0" />
</not>
<then>
<fail/>
</then>
</if>
</target>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion faces-tck/pom.xml-tck
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<groupId>org.eclipse.ee4j.faces.tck</groupId>
<artifactId>jakarta-faces-tck</artifactId>
<version>4.0.1</version>
<version>4.0.3</version>
<packaging>pom</packaging>

<name>Jakarta Faces ${project.version} TCK</name>
Expand Down
18 changes: 9 additions & 9 deletions faces-tck/run-tck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ fi

rm -r target
mkdir target
if [ ! -f target/jakarta-faces-tck-4.0.1.zip ]; then
echo "Downloading jakarta-faces-tck-4.0.1.zip"
wget -q https://download.eclipse.org/jakartaee/faces/4.0/jakarta-faces-tck-4.0.1.zip -O target/jakarta-faces-tck-4.0.1.zip
if [ ! -f target/jakarta-faces-tck-4.0.3.zip ]; then
echo "Downloading jakarta-faces-tck-4.0.3.zip"
wget -q https://download.eclipse.org/jakartaee/faces/4.0/jakarta-faces-tck-4.0.3.zip -O target/jakarta-faces-tck-4.0.3.zip
fi
echo "Unzipping"
rm -rf target/faces-tck-4.0.1
unzip -q target/jakarta-faces-tck-4.0.1.zip -d target
rm -rf target/faces-tck-4.0.3
unzip -q target/jakarta-faces-tck-4.0.3.zip -d target

echo "Running TCK"
# add payara profile, should be in the next version of upstream pom.xml
cp pom.xml-tck target/faces-tck-4.0.1/tck/pom.xml
cp pom.xml-tck target/faces-tck-4.0.3/tck/pom.xml
# change usage of glassfish with payara
cp pom.xml-old-tck-run target/faces-tck-4.0.1/tck/old-tck/run/pom.xml
#mvn verify -P payara-ci-remote,\!glassfish-ci-managed -Dglassfish.version=6.2022.1.Alpha5-SNAPSHOT -f target/faces-tck-4.0.1/tck/pom.xml -pl old-tck -amd
mvn verify -P payara-ci-remote,\!glassfish-ci-managed -Dglassfish.version=6.2022.1.Alpha4 -f target/faces-tck-4.0.1/tck/pom.xml
cp pom.xml-old-tck-run target/faces-tck-4.0.3/tck/old-tck/run/pom.xml
#mvn verify -P payara-ci-remote,\!glassfish-ci-managed -Dglassfish.version=6.2022.1.Alpha5-SNAPSHOT -f target/faces-tck-4.0.3/tck/pom.xml -pl old-tck -amd
mvn verify -P payara-ci-remote,\!glassfish-ci-managed -Dglassfish.version=6.2022.1.Alpha4 -f target/faces-tck-4.0.3/tck/pom.xml
Empty file modified faces-tck/summary-tck.sh
100644 → 100755
Empty file.

0 comments on commit fd12265

Please sign in to comment.