Skip to content

Commit

Permalink
TCK distribution improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAure committed May 16, 2024
1 parent d2fc015 commit dbdc42d
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 62 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ updates:
labels:
- "dependencies"
- "bot"

- package-ecosystem: maven
directory: /tck-dist/src/main/starter/
schedule:
interval: daily
40 changes: 27 additions & 13 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 @@ -44,7 +44,7 @@
</licenses>

<properties>
<jakarta.concurrent.tck.version>${project.version}</jakarta.concurrent.tck.version>
<jakarta.concurrent.version>${project.version}</jakarta.concurrent.version>

<maven.site.skip>true</maven.site.skip>
<asciidoctor-maven.version>3.0.0</asciidoctor-maven.version>
Expand All @@ -56,18 +56,18 @@
<dependency>
<groupId>jakarta.enterprise.concurrent</groupId>
<artifactId>jakarta.enterprise.concurrent.parent</artifactId>
<version>${jakarta.concurrent.tck.version}</version>
<version>${jakarta.concurrent.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>jakarta.enterprise.concurrent</groupId>
<artifactId>jakarta.enterprise.concurrent-api</artifactId>
<version>${jakarta.concurrent.tck.version}</version>
<version>${jakarta.concurrent.version}</version>
</dependency>
<dependency>
<groupId>jakarta.enterprise.concurrent</groupId>
<artifactId>jakarta.enterprise.concurrent-tck</artifactId>
<version>${jakarta.concurrent.tck.version}</version>
<version>${jakarta.concurrent.version}</version>
</dependency>
</dependencies>

Expand All @@ -83,19 +83,33 @@
<target>17</target>
</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.enterprise.concurrent-tck</includeArtifactIds>
<classifier>sources</classifier>
<prependGroupId>true</prependGroupId>
<outputDirectory>${project.build.directory}/copied-sources/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

Expand All @@ -116,15 +130,15 @@
<configuration>
<mainClass>ee.jakarta.tck.data.metadata.CollectMetaData</mainClass>
<arguments>
<argument>true</argument>
<argument>false</argument> <!-- debug? -->
<argument>
${jakarta.enterprise.concurrent:jakarta.enterprise.concurrent-tck:jar}</argument>
<argument>
${project.basedir}/src/main/asciidoc/generated</argument>
</arguments>
</configuration>
</plugin>

<!-- Aciidoctor will create the html and pdf distributions of the user-guide -->
<plugin>
<groupId>org.asciidoctor</groupId>
Expand All @@ -147,7 +161,7 @@
<configuration>
<backend>html5</backend>
<outputFile>
${project.build.directory}/generated-docs/concurrency-tck-reference-guide-${jakarta.concurrent.tck.version}.html
${project.build.directory}/generated-docs/concurrency-tck-reference-guide-${jakarta.concurrent.version}.html
</outputFile>
</configuration>
</execution>
Expand All @@ -160,7 +174,7 @@
<configuration>
<backend>pdf</backend>
<outputFile>
${project.build.directory}/generated-docs/concurrency-tck-reference-guide-${jakarta.concurrent.tck.version}.pdf
${project.build.directory}/generated-docs/concurrency-tck-reference-guide-${jakarta.concurrent.version}.pdf
</outputFile>
</configuration>
</execution>
Expand Down Expand Up @@ -191,11 +205,11 @@
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<finalName>
concurrency-tck-${jakarta.concurrent.tck.version}</finalName>
concurrency-tck-${jakarta.concurrent.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>
25 changes: 14 additions & 11 deletions tck-dist/src/main/artifacts/artifact-install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +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.enterprise.concurrent-parent-3.1.0-SNAPSHOT.pom > jakarta.enterprise.concurrent-parent-3.1.0-SNAPSHOT
NO_REPO=${NO_EXT#*-} # jakarta.enterprise.concurrent-parent-3.1.0-SNAPSHOT > parent-3.1.0-SNAPSHOT
VERSION=${NO_REPO#*-} # parent-3.1.0-SNAPSHOT > 3.1.0-SNAPSHOT

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

# CDI TCK Installed Library - test bean archive
echo "Installing $TCK"
mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file \
-Dfile=jakarta.enterprise.concurrent-tck-"$VERSION".jar
-Dfile=$TCK
22 changes: 0 additions & 22 deletions tck-dist/src/main/artifacts/exceptions.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Once the TCK is extracted, you'll see the following structure:
----
concurrency-tck-<version>-dist/
artifacts/
doc/
docs/
starter/
LICENSE
README.md
Expand All @@ -126,7 +126,7 @@ In more detail:

- `artifacts` contains all the test artifacts pertaining to the TCK: The TCK test classes and source, the {TCKTestPlatform} configuration file, a copy of the SignatureTest file for reference, and a script to copy the TCK into local maven repository.

- `doc` contains the documentation for the TCK: this reference guide.
- `docs` contains the documentation for the TCK: this reference guide.

- `starter` a very basic starter maven project to get you started.

Expand Down
22 changes: 15 additions & 7 deletions tck-dist/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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 All @@ -25,7 +25,7 @@
<format>zip</format>
</formats>

<baseDirectory>concurrency-tck-${jakarta.concurrent.tck.version}
<baseDirectory>concurrency-tck-${jakarta.concurrent.version}
</baseDirectory>

<files>
Expand All @@ -42,6 +42,12 @@
<destName>README.md</destName>
</file>

<!-- The jakarta.enterprise.concurrent-parent pom file -->
<file>
<source>../pom.xml</source>
<destName>artifacts/jakarta.enterprise.concurrent-parent-${project.version}.pom</destName>
</file>

</files>

<fileSets>
Expand All @@ -54,6 +60,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 @@ -88,15 +99,12 @@
<dependencySets>
<dependencySet>
<includes>
<include>jakarta.enterprise.concurrent:jakarta.enterprise.concurrent-tck
</include>
<include>jakarta.enterprise.concurrent:jakarta.enterprise.concurrent.parent:pom
</include>
<include>jakarta.enterprise.concurrent:jakarta.enterprise.concurrent-tck</include>
</includes>
<useTransitiveDependencies>true</useTransitiveDependencies>
<outputDirectory>artifacts</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
</dependencySets>

</assembly>
</assembly>
22 changes: 15 additions & 7 deletions tck-dist/src/main/starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

<modelVersion>4.0.0</modelVersion>

<groupId>[YOUR_GROUP_ID]</groupId>
<groupId>jakarta.enterprise.concurrent</groupId>
<artifactId>concurrency.tck.runner</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Jakarta Concurrency TCK Runner for [YOUR_IMPL]</name>
<name>Jakarta Concurrency TCK Runner</name>

<properties>
<!-- General properties -->
Expand All @@ -35,17 +35,21 @@

<!-- Dependency and Plugin Versions -->
<jakarta.concurrent.version>3.1.0</jakarta.concurrent.version>
<jakarta.servlet.version>6.1.0</jakarta.servlet.version>

<arquillian.version>1.7.0.Final</arquillian.version>
<junit5.version>5.9.3</junit5.version>
<sigtest.version>1.6</sigtest.version>

<derby.version>10.15.2.0</derby.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>

<!-- Location to put test application dependencies -->
<application.server.lib>[path/to/appserver/lib]</application.server.lib>

<!-- Pointer to logging.properties file that has the java.util.logging configuration -->
<logging.config>logging.properties</logging.config>

Expand Down Expand Up @@ -102,8 +106,8 @@
</dependency>
<!-- JUnit5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit5.version}</version>
</dependency>
<!-- Signature Test Plugin -->
Expand All @@ -119,6 +123,8 @@
<directory>${targetDirectory}</directory>
<defaultGoal>clean test</defaultGoal>
<plugins>
<!-- TODO - We now package junit and sigtest plugin into application, perhaps we should
do the same with derby? -->
<!-- tag::testServerDep[] -->
<!-- Test Server Dependencies -->
<plugin>
Expand Down Expand Up @@ -165,7 +171,7 @@
<version>${maven.surefire.plugin.version}</version>
<configuration>
<systemPropertyVariables>
<!-- tag::arquillian[] -->
<!-- tag::arquillian[] -->
<tck_server>[TODO]</tck_server>
<tck_port>[TODO]</tck_port>
<!-- end::arquillian[] -->
Expand All @@ -176,7 +182,9 @@
<groups>${test.included}</groups> <!-- Groups to include i.e. web/full -->
<excludedGroups>${test.excluded.groups}</excludedGroups> <!-- Groups to ignore i.e. signature -->
<!-- Ensure surfire plugin looks under src/main/java instead of src/test/java -->
<testSourceDirectory>${basedir}${file.separarator}src${file.separarator}main${file.separarator}java${file.separarator}</testSourceDirectory>
<testSourceDirectory>
${basedir}${file.separarator}src${file.separarator}main${file.separarator}java${file.separarator}
</testSourceDirectory>
</configuration>
</plugin>
<!-- end::configSurefire[] -->
Expand Down

0 comments on commit dbdc42d

Please sign in to comment.