Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.93 KB

readme.md

File metadata and controls

50 lines (35 loc) · 1.93 KB

Maven setup example to run the Jakarta Validation TCK

This is an example setup to run the Jakarta Validation TCK 3.1 against Eclipse GlassFish 7+ using Maven.

Prerequisites

How to run

  1. Extract Eclipse GlassFish into a directory (this directory is referenced subsequently as <container.home>)

  2. Add the JVM option validation.provider to domain.xml under <container.home>/domains/domain1/config/domain.xml in the section (this is used by the test harness to look up the Jakarta Validation provider under test):

     <java-config>
         ...
        <jvm-options>-Dvalidation.provider=org.hibernate.validator.HibernateValidator</jvm-options>
     </java-config>
    
  3. Make sure that container.home in pom.xml points to your <container.home> directory

  4. Extract the BV TCK distribution.

  5. Edit the setup-examples/artifact-install.sh script and set the TCK_DIST to the path of the extracted BV TCK.

  6. Run once:

     bash ../artifact-install.sh
    
  7. Run the TCK tests against the default glassfish-managed profile:

     mvn test
    

Note: when testing a staged final TCK you need to use the -Pstaging profile mvn -Pstaging test

Test results can be found in target/surefire-reports/index.html

Running tests against a running GlassFish 7+ instance

There is a glassfish-remote profile that allows the testsuite to run against a running GlassFish 7+ instance. To use that profile, run with:

    mvn -Pglassish-remote test

Running local only tests

You can run the tests that do not require a Jakarta EE container by using the pom-local.xml file:

    mvn -f pom-local.xml test

or when using staged TCKs:

    mvn -f pom-local.xml -Pstaging test