Setup and Configuration

Previous Next Contents

4 Setup and Configuration

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 JSON Binding TCK. Before proceeding with the instructions in this chapter, be sure to install all required software, as described in Chapter 3, "Installation."

After completing the instructions in this chapter, proceed to Chapter 5, "Executing Tests," for instructions on running the JSON Binding TCK.

Note

The JSON Binding 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 the Reference Implementation

After configuring your environment as described in this section, continue with the instructions in Chapter 5, "Executing Tests."

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.

  1. Set the following environment variables in your shell environment:

    1. JAVA_HOME to the directory in which Java SE 11+ is installed

    2. M2_HOME to the directory in which the Apache Maven build tool is installed.

    3. JSONB_HOME to the directory in which the JSON Binding 3.0 CI has been installed

    4. PATH to include the following directories: JAVA_HOME/bin, and M2_HOME/bin

  2. Set below Maven/System properties

    1. jimage.dir This property specifies the directory where Java 11+ modules will be expanded by the jimage tool for use in sigTestClasspath

    2. sigTestClasspath This property must be set when running signature tests. This property should be set to a list of jar files and/or directories which contain your Jakarta EE and Java SE classes. Paths must be separated by the appropriate path separator (; windows, : Unixes).

    3. jsonb-impl.groupId property is set to the Maven Group Id of the CI to test.

    4. jsonb-impl.artifactId property is set to the Maven Artifact Id of the CI to test.

    5. jsonb-impl.version property is set to the Maven Version of the CI to test.

  3. Set the below jars to the classpath

    1. JAR file for the JSON Binding 3.0 CI.
      jakarta.json.bind-api.jar.

    2. JUnit 5 jars (5.7.2+)

    3. JSON Binding TCK tests (jakarta.json.bind:jakarta.json.bind-tck)

    Example: Maven configuration
        <dependencies>
            <dependency>
              <groupId>CI.group.id</groupId>
              <artifactId>CI.artifact.id</artifactId>
              <version>CI.version</version>
              <scope>test</scope>
            </dependency>
            <dependency>
              <groupId>jakarta.json.bind</groupId>
              <artifactId>jakarta.json.bind-api</artifactId>
              <version>3.0.0</version>
              <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.json</groupId>
                <artifactId>jakarta.json-api</artifactId>
                <version>2.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld.se</groupId>
                <artifactId>weld-se-core</artifactId>
                <version>5.0.0.Beta1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.json.bind</groupId>
                <artifactId>jakarta.json.bind-tck</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>

    +

4.2 Configuring Your Environment to Run the TCK Against the Vendor Implementation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After configuring your environment as described in this section, continue with the instructions in Chapter 5, "Executing Tests."

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.

  1. Set the following environment variables in your shell environment:

    1. JAVA_HOME to the directory in which Java SE 11+ is installed

    2. M2_HOME to the directory in which the Apache Maven build tool is installed.

    3. JSONB_HOME to the directory in which the JSON Binding 3.0 CI has been installed

    4. PATH to include the following directories: JAVA_HOME/bin, and M2_HOME/bin

  2. Set below Maven/System properties

    1. jimage.dir This property specifies the directory where Java 11+ modules will be expanded by the jimage tool for use in sigTestClasspath

    2. sigTestClasspath This property must be set when running signature tests. This property should be set to a list of jar files and/or directories which contain your Java EE and Java SE classes. Paths must be separated by the appropriate path separator (; windows, : Unixes).

    3. jsonb-api.groupId property is set to the Maven Group Id of the VI to test.

    4. jsonb-api.artifactId property is set to the Maven Artifact Id of the VI to test.

    5. jsonb-api.version property is set to the Maven Version of the VI to test.

  3. Set the below jars to the classpath

    1. JAR file for the JSON Binding 3.0 VI.
      yasson.jar.

    2. JUnit 5 jars (5.7.2+)

    3. JSON Binding TCK tests (jakarta.json.bind:jakarta.json.bind-tck)

    Example: Maven configuration
        <dependencies>
            <dependency>
              <groupId>VI.grou.id</groupId>
              <artifactId>VI.artefact.id</artifactId>
              <version>VI.version</version>
              <scope>test</scope>
            </dependency>
            <dependency>
              <groupId>org.eclipse</groupId>
              <artifactId>yasson</artifactId>
              <version>3.0.0-R1</version>
              <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.json</groupId>
                <artifactId>jakarta.json-api</artifactId>
                <version>2.1.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld.se</groupId>
                <artifactId>weld-se-core</artifactId>
                <version>5.0.0.Beta1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.json.bind</groupId>
                <artifactId>jakarta.json.bind-tck</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>

    +

4.3 Publishing the Test Applications

Not needed for the JSON Binding TCK.


Previous Next Contents
Eclipse Foundation Logo  Copyright © 2017, 2022 Oracle and/or its affiliates. All rights reserved.