= Publishing Java Projects
:page-aliases: Publishing_Java_Projects.adoc
:language: Java
:language-small: java

This page will discuss common topics around publishing your Java projects for others to use.

== Basic Publishing Configuration

include::partial$example/javalib/publishing/1-publishing.adoc[]

== Programmatic Publishing Configuration

include::partial$example/javalib/publishing/2-publish-module.adoc[]

== Publishing to Sonatype Maven Central

include::partial$example/javalib/publishing/3-publish-module-sonatype.adoc[]

== Checking API compatibility

Mill provides the ability to check API changes with the https://revapi.org/revapi-site/main/index.html[Revapi] analysis and change tracking tool.

include::partial$example/javalib/publishing/4-revapi.adoc[]

CAUTION: The `revapi` task does not fail if incompatibilities are reported. You should fix these, and verify by re-running `revapi`, before a release.

[TIP]
====
The `revapi` task returns the path to a directory that can be used to resolve the relative path to any extension configuration output.
[source,json]
----
[
  {
    "extension": "revapi.reporter.text",
    "configuration": {
      "minSeverity": "BREAKING",
      "output": "report.txt"
    }
  }
]
----
====

include::partial$Publishing_Footer.adoc[]

