Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build-logic/PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ By default (`publishApiAndSpiOnly` unset or `false`), Gradle publishes the modul
publishing conventions, including the root `pulsar` parent POM and the full `pulsar-bom`. The
repository's `gradle.properties` supplies the default group (`org.apache.pulsar`) and version.

As in the `branch-4.2` Maven build, publications for `managed-ledger`, `pulsar-broker`,
`pulsar-broker-common`, `pulsar-metadata`, and `pulsar-package-core` include a `tests` classifier
JAR. These test JARs are published in both ordinary and API/SPI mode. In Maven,
`<type>test-jar</type>` and `<classifier>tests</classifier>` refer to the same test JAR; declare
only one dependency per module. Test JARs share their module's POM and do not expose its test
dependencies transitively, so consumers must declare any additional test dependencies they need.

Choose the task for the intended destination:

| Task | Destination | Version requirement |
Expand Down Expand Up @@ -222,6 +229,9 @@ client, Pulsar Functions, and Pulsar plugins such as interceptors and additional
includes the client implementations (including v5), API and service provider interface (SPI)
libraries, and their transitive Pulsar dependencies.

The selection also includes the `buildtools` JAR and all five test JAR publications described
above to support external tests.

A typical use case is distributing a custom Pulsar Java client build to your own Maven repository
so applications can quickly adopt a bug fix or security fix in Pulsar itself. Publishing this subset
avoids performing a full Pulsar dependency release to that repository. For deploying a custom server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ pluginManager.withPlugin("java-library") {
val mavenPublication = publishing.publications.create<MavenPublication>("maven") {
artifact(sourcesJar)
artifact(javadocJar)
// Preserve the test JAR publications from the branch-4.2 Maven build in both modes.
if (project.path in setOf(
":managed-ledger",
":pulsar-broker",
":pulsar-broker-common",
":pulsar-metadata",
":pulsar-package-management:pulsar-package-core",
)) {
artifact(tasks.named("testJar"))
}
}

// Shaded modules: the shadow plugin registers components["shadow"] in its own afterEvaluate, so
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ felix-http-wrappers = "1.1.10"
oxia = "0.9.5"
oxia-testcontainers = "0.7.4"
# Build plugins
lightproto = "0.8.1"
lightproto = "0.8.2"
graalvm-buildtools = "1.1.9"
errorprone = "2.50.0"
spotbugs = "4.10.3"
Expand Down
Loading