Skip to content

Commit 1b4e791

Browse files
authored
build(release): add sources/javadoc jars profile + canonicalise SCM block (D1) (#95)
Wires up Track D1 from the v1.6.5->1.7 readiness taskboard - the first step of the Maven Central pipeline. Two changes, one PR, both prerequisites for Central upload: 1. New 'release' Maven profile activated with -P release. Attaches *-sources.jar (maven-source-plugin 3.3.1 jar-no-fork) and *-javadoc.jar (maven-javadoc-plugin 3.12.0 jar) to the package phase. Javadoc runs with doclint=none + failOnError=false so Lombok-generated members and @internal engine surface don't block a publish; warnings surface quietly. Off by default; default mvnw verify does not pay the ~30s of extra packaging. 2. SCM block canonicalised. Central metadata validator is strict: <connection> now scm:git:https:// (HTTPS, not legacy git://), <developerConnection> now scm:git:ssh://git@github.com/ (canonical SSH URL with git@ user). Matches every Central artefact's POM shape. Verification: mvnw -P release -DskipTests package -pl . -> BUILD SUCCESS (36s) -> target/graphcompose-1.6.5.jar (19MB) -> target/graphcompose-1.6.5-sources.jar (18MB) -> target/graphcompose-1.6.5-javadoc.jar (4MB) -> Central jar trio complete; ready for GPG signing (D2) and central-publishing wiring (D3).
1 parent 2ba7458 commit 1b4e791

2 files changed

Lines changed: 80 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@ JitPack continue to resolve through the existing coordinates.
2121
`./mvnw -DskipTests -P japicmp verify -pl .`; HTML/MD/XML reports
2222
land in `target/japicmp/`. JitPack repository is scoped to the
2323
`japicmp` profile, so downstream consumers do not inherit it.
24+
- **`release` Maven profile with sources + javadoc jars** (Track D1).
25+
Activated with `-P release`, attaches `*-sources.jar` and
26+
`*-javadoc.jar` to the `package` phase via the standard
27+
`maven-source-plugin` (3.3.1) and `maven-javadoc-plugin` (3.12.0)
28+
configurations Maven Central requires. The Javadoc plugin runs with
29+
`doclint=none` and `failOnError=false` so Lombok-generated members
30+
and `@Internal` engine surface don't block a publish; warnings are
31+
surfaced quietly. Default `mvnw verify` still does not pay the
32+
~30 s of extra packaging — the profile is off by default and turned
33+
on by `cut-release.ps1` (once Track D3's central-publishing plugin
34+
lands) and the publish workflow (Track D4).
35+
- **SCM block canonicalised** in `pom.xml` (Track D1 polish). The
36+
Central metadata validator is strict about the `<scm>` block:
37+
`<connection>` now uses `scm:git:https://…` (HTTPS, not the legacy
38+
`git://` transport) and `<developerConnection>` now uses
39+
`scm:git:ssh://git@github.com/…` (the canonical SSH URL with the
40+
`git@` user, not the older `ssh://github.com:…` form). Matches the
41+
shape every Central artefact's POM carries.
2442
- **New `benchmarks/README.md`** (Track B1). Honest framing for the
2543
manual benchmark layer ahead of the Maven Central debut: explicitly
2644
positions the harness as a smoke / diff / endurance tool — not a

pom.xml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
</developers>
3636

3737
<scm>
38-
<connection>scm:git:git://github.com/DemchaAV/GraphCompose.git</connection>
39-
<developerConnection>scm:git:ssh://github.com:DemchaAV/GraphCompose.git</developerConnection>
38+
<connection>scm:git:https://github.com/DemchaAV/GraphCompose.git</connection>
39+
<developerConnection>scm:git:ssh://git@github.com/DemchaAV/GraphCompose.git</developerConnection>
4040
<url>https://github.com/DemchaAV/GraphCompose/tree/main</url>
4141
</scm>
4242

@@ -68,6 +68,7 @@
6868
<maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
6969
<maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version>
7070
<maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
71+
<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
7172
<maven.surefire.plugin.version>3.5.5</maven.surefire.plugin.version>
7273

7374
<!-- Minimum toolchain (enforced by maven-enforcer-plugin) -->
@@ -452,6 +453,65 @@
452453
</build>
453454

454455
<profiles>
456+
<!--
457+
Maven Central / release-publishing artefacts. Activated
458+
with `-P release`. Produces the `*-sources.jar` and
459+
`*-javadoc.jar` Maven Central requires alongside the main
460+
`.jar`. Activated by `cut-release.ps1` (when the
461+
central-publishing plugin lands in Track D3) and by the
462+
publish workflow (Track D4); never activated by the default
463+
local build so a maintainer's everyday `mvnw verify` does
464+
not pay the extra ~30 s of source / javadoc packaging.
465+
Tracked in v1.6.6 stabilization (Track D1).
466+
-->
467+
<profile>
468+
<id>release</id>
469+
<build>
470+
<plugins>
471+
<plugin>
472+
<groupId>org.apache.maven.plugins</groupId>
473+
<artifactId>maven-source-plugin</artifactId>
474+
<version>${maven.source.plugin.version}</version>
475+
<executions>
476+
<execution>
477+
<id>attach-sources</id>
478+
<phase>package</phase>
479+
<goals>
480+
<goal>jar-no-fork</goal>
481+
</goals>
482+
</execution>
483+
</executions>
484+
</plugin>
485+
<plugin>
486+
<groupId>org.apache.maven.plugins</groupId>
487+
<artifactId>maven-javadoc-plugin</artifactId>
488+
<version>${maven.javadoc.plugin.version}</version>
489+
<executions>
490+
<execution>
491+
<id>attach-javadocs</id>
492+
<phase>package</phase>
493+
<goals>
494+
<goal>jar</goal>
495+
</goals>
496+
<configuration>
497+
<!--
498+
Lombok-generated members and the
499+
`@Internal` engine surface are not
500+
part of the public Javadoc; skip
501+
anything that would fail to resolve
502+
rather than blocking the publish.
503+
-->
504+
<doclint>none</doclint>
505+
<failOnError>false</failOnError>
506+
<quiet>true</quiet>
507+
</configuration>
508+
</execution>
509+
</executions>
510+
</plugin>
511+
</plugins>
512+
</build>
513+
</profile>
514+
455515
<!--
456516
Optional-deps regression: runs the canonical suite with
457517
`poi-ooxml` (and its transitives) excluded from the test

0 commit comments

Comments
 (0)