Skip to content

Commit

Permalink
Merge pull request #738 from KyleAure/737-updates-to-jakarta-data-tck
Browse files Browse the repository at this point in the history
Fix concerns with tck-dist
  • Loading branch information
KyleAure authored Jun 7, 2024
2 parents 5241665 + 0b91682 commit 3dfd34d
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 63 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
directory: /
schedule:
interval: daily

- package-ecosystem: maven
directory: /tck-dist/src/main/
schedule:
interval: daily
20 changes: 17 additions & 3 deletions tck-dist/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
~ Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation
~
~ 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 Down Expand Up @@ -87,18 +87,32 @@
</configuration>
</plugin>

<!-- Load TCK dependency location as variable -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<!-- Load TCK dependency location as variable -->
<execution>
<phase>initialize</phase>
<goals>
<goal>properties</goal>
</goals>
</execution>
<!-- Copy tck sources to a known location -->
<execution>
<id>get-dependency-sources</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>jakarta.data-tck</includeArtifactIds>
<classifier>sources</classifier>
<prependGroupId>true</prependGroupId>
<outputDirectory>${project.build.directory}/copied-sources/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

Expand All @@ -119,7 +133,7 @@
<configuration>
<mainClass>ee.jakarta.tck.data.metadata.CollectMetaData</mainClass>
<arguments>
<argument>true</argument>
<argument>false</argument> <!-- debug -->
<argument>${jakarta.data:jakarta.data-tck:jar}</argument>
<argument>${project.basedir}/src/main/asciidoc/sections/generated</argument>
</arguments>
Expand Down
20 changes: 10 additions & 10 deletions tck-dist/src/main/artifacts/artifact-install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

## A sample script to install the artifact directory contents into a local maven repository

if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
VERSION="$1"
else
echo "A valid version is required to execute this script"
exit 1
fi
POM=$(ls *.pom)
TCK=$(ls *.jar | grep -v sources)

# Parent pom
NO_EXT=${POM%.*} # jakarta.data-parent-1.0.0-SNAPSHOT.pom > jakarta.data-parent-1.0.0-SNAPSHOT
NO_REPO=${NO_EXT#*-} # jakarta.data-parent-1.0.0-SNAPSHOT > parent-1.0.0-SNAPSHOT
VERSION=${NO_REPO#*-} # parent-1.0.0-SNAPSHOT > 1.0.0-SNAPSHOT

echo "Installing $POM with version $VERSION"
mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file \
-Dfile=jakarta.data-parent-"$VERSION".pom \
-Dfile=$POM \
-DgroupId=jakarta.data \
-DartifactId=jakarta.data-parent \
-Dversion="$VERSION" \
-Dpackaging=pom

# Jakarta Data TCK Installed Library
echo "Installing $TCK"
mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file \
-Dfile=jakarta.data-tck-"$VERSION".jar
-Dfile=$TCK
5 changes: 3 additions & 2 deletions tck-dist/src/main/asciidoc/sections/05inventory.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Once the TCK is extracted, you'll see the following structure:
----
data-tck-<version>-dist/
artifacts/
doc/
docs/
starter/
LICENSE
README.md
Expand All @@ -29,7 +29,7 @@ In more detail:
** The {TCKTestPlatform} configuration file
** A copy of the SignatureTest file for reference
** A script to copy the TCK into local maven repository.
* `doc` contains the documentation for the TCK (i.e. this reference guide)
* `docs` contains the documentation for the TCK (i.e. this reference guide)
* `starter` a very basic starter maven project to get you started.

=== A Quick Tour of the TCK Artifacts
Expand Down Expand Up @@ -67,6 +67,7 @@ Here is an essential checklist of what you will need per mode, and links to the
SE Mode:

- The {APIShortName} API, JUnit5, and Signature Test Plugin libraries available at runtime | <<Standalone Dependencies>>
- A dependency injection framework supported by your implementation | <<Standalone Dependencies>>
- A logging configuration for TCK logging available at runtime | <<Standalone Logging>>

EE Mode:
Expand Down
10 changes: 8 additions & 2 deletions tck-dist/src/main/asciidoc/sections/08example-runner.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ Below are links to projects where the {APILongName} TCK is being used and run su
|===
|Project |Link |Profile(s)

|Hibernate
|https://github.com/jakartaredhat/hibernate-data-tck/tree/3e5fd4ddc68b60cc026987021d8d3e80ebed6809[hibernate-data-tck]
|standalone

|Open Liberty
|https://github.com/OpenLiberty/open-liberty/tree/integration/dev/io.openliberty.jakarta.data.1.0_fat_tck
|standalone, core, and web
|https://github.com/OpenLiberty/open-liberty/tree/549a6b89005de62289df7b550aedd229dd407722/dev/io.openliberty.jakarta.data.1.0_fat_tck[open-liberty/io.openliberty.jakarta.data.1.0_fat_tck]
|core, web, full

|===

// TODO add JNoSQL once implemented
2 changes: 1 addition & 1 deletion tck-dist/src/main/asciidoc/sections/10signature.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The {APILongName} TCK will run signature tests within a standalone or deployed a
and not as part of a separate plugin / execution.
This means that the signature tests will run during the maven `test` phase.

You need to configure your test client with the system property `jimage.dir=<path-your-server-has-access-to>`.
Your test client is configured with the property `jimage.dir=${project.build.directory}/jimage/`.
This is because, when running the signature tests on JDK 9+ we need to convert the
JDK modules back into class files for signature testing.

Expand Down
8 changes: 6 additions & 2 deletions tck-dist/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
~ Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation
~
~ 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 Down Expand Up @@ -53,6 +53,11 @@
<include>**/*.txt</include>
</includes>
</fileSet>
<!-- The TCK source jar -->
<fileSet>
<directory>target/copied-sources/</directory>
<outputDirectory>artifacts/</outputDirectory>
</fileSet>
<!-- The docs -->
<fileSet>
<directory>target/generated-docs</directory>
Expand Down Expand Up @@ -81,7 +86,6 @@
<dependencySet>
<includes>
<include>jakarta.data:jakarta.data-tck</include>
<include>jakarta.data:jakarta.data-tck:jar:sources</include>
</includes>
<useTransitiveDependencies>true</useTransitiveDependencies>
<outputDirectory>artifacts</outputDirectory>
Expand Down
37 changes: 37 additions & 0 deletions tck-dist/src/main/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2024 Contributors to the Eclipse Foundation
~
~ 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<!--
This is just an aggregator pom so that dependabot can find the starter poms
This aggregator is not packaged into the tck distribution
-->

<groupId>jakarta.data</groupId>
<artifactId>data-tck-aggregator</artifactId>
<version>1.0-SNAPSHOT</version>

<modules>
<module>starter/ee-pom.xml</module>
<module>starter/se-pom.xml</module>
</modules>

</project>
38 changes: 19 additions & 19 deletions tck-dist/src/main/starter/ee-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<modelVersion>4.0.0</modelVersion>

<groupId>[YOUR_GROUP_ID]</groupId>
<groupId>jakarta.data</groupId>
<artifactId>data-tck-runner</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Jakarta Data TCK Runner for [YOUR_IMPL]</name>
Expand All @@ -33,17 +33,17 @@
<maven.compiler.testRelease>17</maven.compiler.testRelease>

<!-- Dependency and Plugin Versions -->

<!-- Default - use local snapshot - can be overwritten by runner -->
<jakarta.data.version>1.0.0-SNAPSHOT</jakarta.data.version>
<jakarta.data.version>1.0.0</jakarta.data.version>
<jakarta.servlet.version>6.1.0</jakarta.servlet.version>
<jakarta.enterprise.cdi.version>4.1.0</jakarta.enterprise.cdi.version>

<arquillian.version>1.7.0.Alpha13</arquillian.version>
<junit.version>5.9.0</junit.version>
<arquillian.version>1.8.0.Final</arquillian.version>
<junit.version>5.10.2</junit.version>
<sigtest.version>2.3</sigtest.version>

<maven.dep.plugin.version>3.3.0</maven.dep.plugin.version>
<maven.comp.plugin.version>3.10.1</maven.comp.plugin.version>
<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
<maven.comp.plugin.version>3.13.0</maven.comp.plugin.version>
<maven.surefire.plugin.version>3.2.5</maven.surefire.plugin.version>

<!-- Location to copy runtime dependencies to application server -->
<application.server.lib>[path/to/appserver/lib]</application.server.lib>
Expand All @@ -52,8 +52,11 @@
configuration -->
<logging.config>${project.basedir}/logging.properties</logging.config>

<!-- Output directory -->
<targetDirectory>${project.basedir}/target</targetDirectory>
<!-- jimage output directory -->
<jimage.dir>${project.build.directory}/jimage/</jimage.dir>

<!-- Default execution groups - user should override -->
<includedTests>core</includedTests>
</properties>

<repositories>
Expand Down Expand Up @@ -118,12 +121,12 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<version>${jakarta.servlet.version}</version>
</dependency>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>4.0.1</version>
<version>${jakarta.enterprise.cdi.version}</version>
</dependency>
</dependencies>
<!-- end::testClientDep[] -->
Expand Down Expand Up @@ -164,11 +167,11 @@
<tck_port>[TODO]</tck_port>
<!-- end::arquillian[] -->
<!-- tag::signature[] -->
<jimage.dir>[path-to-extract-jvm-classes]</jimage.dir>
<signature.sigTestClasspath>[path-to]/jakarta.data-api.jar:[path-to-jimage]/java.base:[path-to-jimage]/java.rmi:[path-to-jimage]/java.sql:[path-to-jimage]/java.naming</signature.sigTestClasspath>
<jimage.dir>${jimage.dir}</jimage.dir>
<signature.sigTestClasspath>[path-to]/jakarta.data-api.jar:${jimage.dir}/java.base:${jimage.dir}/java.rmi:${jimage.dir}/java.sql:${jimage.dir}/java.naming</signature.sigTestClasspath>
<!-- end::signature[] -->
<!-- tag::logging[] -->
<java.util.logging.config.file>${basedir}/../logging.properties</java.util.logging.config.file>
<java.util.logging.config.file>${logging.config}</java.util.logging.config.file>
<!-- end::logging[] -->
<!-- tag::profile[] -->
<!-- Optional, Arquillian will deploy artifacts by default -->
Expand All @@ -180,10 +183,7 @@
Profiles:[core|web|full]
Entities:[nosql|persistence]
Other: [signature] -->
<groups>[TODO]</groups>
<!-- If running back-to-back tests at different levels
use this to distinguish the results -->
<reportNameSuffix>[OPTIONAL]</reportNameSuffix>
<groups>${includedTests}</groups>
<!-- Ensure surfire plugin looks under src/main/java
instead of src/test/java -->
<testSourceDirectory>${basedir}/src/main/java/</testSourceDirectory>
Expand Down
Loading

0 comments on commit 3dfd34d

Please sign in to comment.