= Appendix

[[reproducible-builds]]
== Reproducible Builds

Starting with version 5.7, JUnit 5 aims for its non-javadoc JARs to be
https://reproducible-builds.org/[reproducible].

Under identical build conditions, such as Java version, repeated builds should provide the
same output byte-for-byte.

This means that anyone can reproduce the build conditions of the artifacts on Maven
Central/Sonatype and produce the same output artifact locally, confirming that the
artifacts in the repositories were actually generated from this source code.

[[dependency-metadata]]
== Dependency Metadata

Artifacts for final releases and milestones are deployed to {Maven_Central}. Consult
https://central.sonatype.org/consume/[Sonatype's documentation] for how to consume those
artifacts with a build tool of your choice.

Snapshot artifacts are deployed to Sonatype's {snapshot-repo}[snapshots repository]
under {snapshot-repo}/org/junit/[/org/junit]. Please refer to
https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-snapshot-releases-for-your-project[Sonatype's documentation]
for instructions on how to consume them with a build tool of your choice.

The sections below list all artifacts with their versions for the three groups:
<<dependency-metadata-junit-platform, Platform>>,
<<dependency-metadata-junit-jupiter, Jupiter>>, and
<<dependency-metadata-junit-vintage, Vintage>>.
The <<dependency-metadata-junit-bom, Bill of Materials (BOM)>> contains a list of all
of the above artifacts and their versions.

[TIP]
.Aligning dependency versions
====
To ensure that all JUnit artifacts are compatible with each other, their versions should
be aligned.
If you rely on xref:running-tests/build-support.adoc#spring-boot[Spring Boot] for dependency management,
please see the corresponding section.
Otherwise, instead of managing individual versions of the JUnit artifacts, it is
recommended to apply the <<dependency-metadata-junit-bom, BOM>> to your project.
Please refer to the corresponding sections for xref:running-tests/build-support.adoc#maven-bom[Maven] or
xref:running-tests/build-support.adoc#gradle-bom[Gradle].
====

[[dependency-metadata-junit-platform]]
=== JUnit Platform

* *Group ID*: `org.junit.platform`
* *Version*: `{platform-version}`
* *Artifact IDs*:
  `junit-platform-commons`::
    Common APIs and support utilities for the JUnit Platform. Any API annotated with
    `@API(status = INTERNAL)` is intended solely for usage within the JUnit framework
    itself. _Any usage of internal APIs by external parties is not supported!_
  `junit-platform-console`::
    Support for discovering and executing tests on the JUnit Platform from the console.
    See xref:running-tests/console-launcher.adoc[] for details.
  `junit-platform-console-standalone`::
    An executable _Fat JAR_ that contains all dependencies is provided in Maven Central under the
    https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone[junit-platform-console-standalone]
    directory. See xref:running-tests/console-launcher.adoc[] for details.
  `junit-platform-engine`::
    Public API for test engines. See xref:advanced-topics/launcher-api.adoc#engines-custom[Registering a TestEngine] for details.
  `junit-platform-jfr`::
    Provides a `LauncherDiscoveryListener` and `TestExecutionListener` for Java Flight
	Recorder events on the JUnit Platform. See xref:running-tests/using-listeners-and-interceptors.adoc#recorder[Flight Recorder Support]
	for details.
  `junit-platform-launcher`::
    Public API for configuring and launching test plans -- typically used by IDEs and
    build tools. See xref:advanced-topics/launcher-api.adoc[] for details.
  `junit-platform-reporting`::
    `TestExecutionListener` implementations that generate test reports -- typically used
    by IDEs and build tools. See xref:advanced-topics/junit-platform-reporting.adoc[] for details.
  `junit-platform-runner`::
    Runner for executing tests and test suites on the JUnit Platform in a JUnit 4
    environment. See xref:running-tests/using-junit-4-to-run-the-junit-platform.adoc[] for details.
  `junit-platform-suite`::
    JUnit Platform Suite artifact that transitively pulls in dependencies on
    `junit-platform-suite-api` and `junit-platform-suite-engine` for simplified dependency
	management in build tools such as Gradle and Maven.
  `junit-platform-suite-api`::
    Annotations for configuring test suites on the JUnit Platform. Supported by the
    xref:advanced-topics/junit-platform-suite-engine.adoc[JUnit Platform Suite Engine] and the
    xref:running-tests/using-junit-4-to-run-the-junit-platform.adoc[JUnitPlatform runner].
  `junit-platform-suite-commons`::
    Common support utilities for executing test suites on the JUnit Platform.
  `junit-platform-suite-engine`::
    Engine that executes test suites on the JUnit Platform; only required at runtime. See
    xref:advanced-topics/junit-platform-suite-engine.adoc[JUnit Platform Suite Engine] for details.
  `junit-platform-testkit`::
     Provides support for executing a test plan for a given `TestEngine` and then
     accessing the results via a fluent API to verify the expected results.

[[dependency-metadata-junit-jupiter]]
=== JUnit Jupiter

* *Group ID*: `org.junit.jupiter`
* *Version*: `{jupiter-version}`
* *Artifact IDs*:
  `junit-jupiter`::
    JUnit Jupiter aggregator artifact that transitively pulls in dependencies on
    `junit-jupiter-api`, `junit-jupiter-params`, and `junit-jupiter-engine` for
    simplified dependency management in build tools such as Gradle and Maven.
  `junit-jupiter-api`::
    JUnit Jupiter API for xref:writing-tests/intro.adoc#tests[writing tests] and xref:extensions/overview.adoc[extensions].
  `junit-jupiter-engine`::
    JUnit Jupiter test engine implementation; only required at runtime.
  `junit-jupiter-params`::
    Support for xref:writing-tests/parameterized-classes-and-tests.adoc[] in JUnit Jupiter.
  `junit-jupiter-migrationsupport`::
    Support for migrating from JUnit 4 to JUnit Jupiter; only required for support for
    JUnit 4's `@Ignore` annotation and for running selected JUnit 4 rules.

[[dependency-metadata-junit-vintage]]
=== JUnit Vintage

* *Group ID*: `org.junit.vintage`
* *Version*: `{vintage-version}`
* *Artifact ID*:
  `junit-vintage-engine`::
    JUnit Vintage test engine implementation that allows one to run _vintage_ JUnit tests
    on the JUnit Platform. _Vintage_ tests include those written using JUnit 3 or JUnit 4
    APIs or tests written using testing frameworks built on those APIs.

[[dependency-metadata-junit-bom]]
=== Bill of Materials (BOM)

The _Bill of Materials_ POM provided under the following Maven coordinates can be used to
ease dependency management when referencing multiple of the above artifacts using
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies[Maven]
or https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import[Gradle].

* *Group ID*: `org.junit`
* *Artifact ID*: `junit-bom`
* *Version*: `{bom-version}`

[[dependency-metadata-dependencies]]
=== Dependencies

Most of the above artifacts have a dependency in their published Maven POMs on the
following _@API Guardian_ JAR.

* *Group ID*: `org.apiguardian`
* *Artifact ID*: `apiguardian-api`
* *Version*: `{apiguardian-version}`

In addition, most of the above artifacts have a direct or transitive dependency on the
following _OpenTest4J_ JAR.

* *Group ID*: `org.opentest4j`
* *Artifact ID*: `opentest4j`
* *Version*: `{ota4j-version}`

[[dependency-diagram]]
== Dependency Diagram

image::component-diagram.svg[]
