Skip to content

Commit

Permalink
Fixes #4591 - Add Inject TCK certification for Piranha Core Profile (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem authored Feb 17, 2025
1 parent b7b1088 commit 916401b
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/tck-coreprofile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
with:
paths: "test/tck/coreprofile/annotations/runner/target/failsafe-reports/*IT.xml"
if: always()
- name: Inject TCK Test Summary
uses: test-summary/action@v2
with:
paths: "test/tck/coreprofile/inject/installer/target/tck/example/target/surefire-reports/TEST-*.xml"
if: always()
result:
if: ${{ always() }} && github.repository == 'piranhacloud/piranha'
runs-on: ubuntu-latest
Expand Down
60 changes: 60 additions & 0 deletions test/tck/coreprofile/inject/installer/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>

<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>cloud.piranha.test.tck.coreprofile.inject</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<artifactId>installer</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - Inject TCK - Installer</name>
<properties>
<tck.home>${project.build.directory}/tck</tck.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Download, unzip and rename TCK -->
<get src="https://download.eclipse.org/jakartaee/dependency-injection/2.0/jakarta.inject-tck-${inject.tck.version}-bin.zip"
dest="${project.build.directory}/tck.zip"
skipexisting="true"/>
<unzip src="${project.build.directory}/tck.zip"
dest="${project.build.directory}"/>
<move file="${project.build.directory}/jakarta.inject-tck-${inject.tck.version}"
tofile="${project.build.directory}/tck"/>

<!-- Install the TCK into local Maven repository -->
<exec executable="mvn">
<arg value="install:install-file"/>
<arg value="-Dfile=${project.build.directory}/tck/jakarta.inject-tck-${inject.tck.version}.jar"/>
</exec>

<!-- Setup example/pom.xml for correct Weld version -->
<replaceregexp file="${tck.home}/example/pom.xml"
match="&lt;weld.version>(.*)&lt;/weld.version>"
replace="&lt;weld.version>${weld.version}&lt;/weld.version>"
byline="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
21 changes: 21 additions & 0 deletions test/tck/coreprofile/inject/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<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>cloud.piranha.test.tck.coreprofile</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<groupId>cloud.piranha.test.tck.coreprofile.inject</groupId>
<artifactId>project</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - Inject TCK - Project</name>
<modules>
<module>installer</module>
<module>runner</module>
</modules>
</project>
53 changes: 53 additions & 0 deletions test/tck/coreprofile/inject/runner/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>

<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>cloud.piranha.test.tck.coreprofile.inject</groupId>
<artifactId>project</artifactId>
<version>25.3.0-SNAPSHOT</version>
</parent>
<artifactId>runner</artifactId>
<packaging>pom</packaging>
<name>Piranha - Test - TCK - Core Profile - Inject TCK - Runner</name>
<properties>
<tck.home>${project.build.directory}/../../installer/target/tck</tck.home>
</properties>
<dependencies>
<dependency>
<groupId>cloud.piranha.test.tck.coreprofile.inject</groupId>
<artifactId>installer</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Run the tests -->
<exec dir="${tck.home}/example"
executable="mvn">
<arg value="verify"/>
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions test/tck/coreprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
<name>Piranha - Test - TCK - Core Profile</name>
<properties>
<annotations.tck.version>3.0.0</annotations.tck.version>
<inject.tck.version>2.0.2</inject.tck.version>
<sigtest-maven-plugin.version>2.4</sigtest-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>cloud.piranha</groupId>
<artifactId>bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
Expand All @@ -34,5 +42,6 @@
</dependencyManagement>
<modules>
<module>annotations</module>
<module>inject</module>
</modules>
</project>

0 comments on commit 916401b

Please sign in to comment.