Note
|
The Jakarta EE Specification process provides for any number of compatible implementations.
As additional implementations become available, refer to project or product documentation from
those vendors for specific TCK setup and operational guidance.
|
This chapter describes how to set up the Annotations TCK.
Before proceeding with the instructions in
this chapter, be sure to install all required software, as described in
Chapter 3, "Installation."
Note
|
The Annotations TCK is not depended on any particular build
tool to run the tests. It will be convenient and advisable to create a
Apache Maven project to setup and run the TCK.
This chapter will henceforth use instructions and steps to provide setup
with Apache Maven as a build tool.
|
4.1 Configuring Your Environment to Run the TCK Against a Compatible Implementation
Note
|
In these instructions, variables in angle brackets need to be expanded
for each platform. For example, <JAVA_HOME> becomes $JAVA_HOME on
Solaris/Linux and %JAVA_HOME% on Windows. In addition, the forward
slashes (/ ) used in all of the examples need to be replaced with
backslashes (\ ) for Windows. Finally, be sure to use the appropriate
separator for your operating system when specifying multiple path
entries (; on Windows, : on UNIX/Linux).
On Windows, you must escape any backslashes with an extra backslash in
path separators used in any of the following properties, or use forward
slashes as a path separator instead.
|
-
Set the following environment variables in your shell environment:
-
JAVA_HOME
to the directory in which Java SE 17+ is installed
-
M2_HOME
to the directory in which the Apache Maven build tool is installed.
-
PATH
to include the following directories: JAVA_HOME/bin
,
and M2_HOME/bin
-
Set the following System properties:
-
Set the sigTestClassPath
property to point to a Jakarta Annotations CI classes/jars that contain the
annotations being supported in Step c, below.
-
Set the jimage.dir
property to the location where JDK modules will be extracted.
-
Depending on the annotations that are supported or unsupported in your
Jakarta Annotations implementation, the following properties
should be set to true
or false
respectively.
By default, all of these annotations are supported in the Jakarta Annotations CI.
#jakarta.annotation.Generated
ca.sig.generated=true
#jakarta.annotation.PostConstruct
ca.sig.postconstruct=true
#jakarta.annotation.PreDestroy
ca.sig.predestroy=true
#jakarta.annotation.Priorityca.sig.priority=true
#jakarta.annotation.Resource
ca.sig.resource=true
#jakarta.annotation.Resources
ca.sig.resources=true
#jakarta.annotation.security.DeclareRoles
ca.sig.securitydeclareroles=true
#jakarta.annotation.security.DenyAll
ca.sig.securitydenyall=true
#jakarta.annotation.security.PermitAll
ca.sig.securitypermitall=true
#jakarta.annotation.security.RolesAllowed
ca.sig.securityrolesallowed=true
#jakarta.annotation.security.RunAs
ca.sig.securityrunas=true
#jakarta.annotation.sql.DataSourceDefinition
ca.sig.sqldatasourcedefinition=true
#jakarta.annotation.sql.DataSourceDefinitions
ca.sig.sqldatasourcedefinitions=true
-
Set the below jars to the classpath
-
JAR file for the Annotations 3.0 API.
eg. ${web.home}/modules/jakarta.annotations-api.jar
.
-
JUnit 5 jars (5.10.2+)
Maven cordinates :
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.10.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
-
sigtest-maven-plugin (2.2) to run the signature tests.
Maven cordinates :
<dependency>
<groupId>jakarta.tck</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>2.2</version>
</dependency>
4.2 Configuring Your Environment to Repackage and Run the TCK Against the Vendor Implementation
This is not required for the Jakarta Annotations TCK.
4.3 Publishing the Test Applications
This is not required for the Jakarta Annotations TCK.