blob: 71ff4fbecc2b87b8ffcf33838042b088fcce3506 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021, 2022 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
-->
<!--
Usage:
Run full TCK:
mvn clean clean
Run all tests in test class
mvn clean install -Drun.test="com/sun/ts/tests/el/api/jakarta_el/methodexpression/ELClient.java"
Run single test:
mvn clean install -Drun.test="com/sun/ts/tests/el/api/jakarta_el/methodexpression/ELClient.java#methodExpressionMatchingAmbiguousTest"
Run single test via standalone runner: (note, remove _from_standalone marker if pressent)
mvn clean install -Drun.test="com/sun/ts/tests/el/api/jakarta_el/methodexpression/ELClient.java#methodExpressionMatchingAmbiguousTest" -Dtck.standalone
Run single test via standalone runner and suspend on port 9009:
mvn clean install -Drun.test="com/sun/ts/tests/el/api/jakarta_el/methodexpression/ELClient.java#methodExpressionMatchingAmbiguousTest" -Dtck.standalone -Dmaven.tck.debug
-->
<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.glassfish.main.tests.tck</groupId>
<artifactId>tck</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>glassfish-external-tck-expression-language</artifactId>
<packaging>jar</packaging>
<name>TCK: Expression Language</name>
<properties>
<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}/expression-language-tck</tck.home>
<tck.tests.home>${tck.home}/src/com/sun/ts/tests</tck.tests.home>
<glassfish.home>${project.build.directory}/glassfish7</glassfish.home>
<glassfish.modules>${glassfish.home}/glassfish/modules</glassfish.modules>
<glassfish.version>${project.version}</glassfish.version>
<glassfish.asadmin>${glassfish.home}/glassfish/bin/asadmin</glassfish.asadmin>
<jacoco.includes>org/glassfish/**\:com/sun/enterprise/**</jacoco.includes>
</properties>
<dependencies>
<dependency>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>glassfish</artifactId>
<version>${glassfish.version}</version>
<type>zip</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.main.tests.tck</groupId>
<artifactId>jakarta-expression-language-tck</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.glassfish.main.tests.tck</groupId>
<artifactId>javatest</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.main.tests.tck</groupId>
<artifactId>tsharness</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<execution>
<id>download-ant</id>
<phase>generate-resources</phase>
<goals>
<goal>wget</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${skipITs}</skip>
<url>${ant.zip.url}</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<skip>${skipITs}</skip>
</configuration>
<executions>
<execution>
<id>unpack-glassfish</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeArtifactIds>glassfish</includeArtifactIds>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
<execution>
<id>unpack-tck</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>jakarta-expression-language-tck</includeArtifactIds>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${ant.version}</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<configuration>
<skip>${skipITs}</skip>
</configuration>
<executions>
<execution>
<id>prepare-tck-and-glassfish</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>
<!-- Change configuration -->
<tck-setting key="el.classes" value="${tck.home}/lib/javatest.jar:${glassfish.modules}/jakarta.el.jar:${glassfish.modules}/jakarta.el-api.jar:${glassfish.modules}/expressly.jar"/>
<tck-setting key="report.dir" value="${tck.home}/expression-languagereport/expression-language"/>
<tck-setting key="work.dir" value="${tck.home}/expression-languagework/expression-language"/>
<mkdir dir="${tck.home}/expression-languagereport"/>
<mkdir dir="${tck.home}/expression-languagetckreport/expression-language"/>
<replace file="${tck.home}/bin/xml/ts.top.import.xml">
<replacetoken><![CDATA[<jvmarg value="-Xmx512m"/>]]></replacetoken>
<replacevalue><![CDATA[<jvmarg value="-Xmx512m"/>
<jvmarg value="-Djavatest.security.noSecurityManager=true"/>]]></replacevalue>
</replace>
<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"/>
<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=9008"/>]]></replacevalue>
</replace>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>run-tck-tests</id>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
<sequential unless:set="tck.standalone">
<echo level="info" message="Start running all tests" />
<exec executable="${ant.home}/bin/ant" dir="${tck.home}/bin" resultproperty="testResult">
<arg value="-Dmultiple.tests=${run.test}" if:set="run.test" />
<arg value="run.all" unless:set="run.test"/>
<arg value="runclient" if:set="run.test" />
<arg value="-Dkeywords=all" />
<env key="LC_ALL" value="C" />
</exec>
<if>
<not>
<equals arg1="${testResult}" arg2="0" />
</not>
<then>
<echo message="Running tests failed." />
</then>
</if>
</sequential>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>${skipITs}</skip>
<systemPropertyVariables>
<tck.home>${tck.home}</tck.home>
<glassfish.home>${glassfish.home}</glassfish.home>
<glassfish.version>${project.version}</glassfish.version>
<maven.tck.debug>${tck.debug}</maven.tck.debug>
<standalone>${tck.standalone}</standalone>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>