Skip to content

Commit 98e35e7

Browse files
committed
fix: exclude all samples from Maven Central publishing
Replaces the skipPublishing property on the Kotlin sample with an excludeArtifacts list on central-publishing-maven-plugin, so the exclusion lives next to the publishing configuration, and extends it to every sample module: they are demos and end-to-end tests, not artifacts to depend on.
1 parent c90a1e3 commit 98e35e7

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,20 @@
642642
<tokenAuth>true</tokenAuth>
643643
<autoPublish>true</autoPublish>
644644
<waitUntil>published</waitUntil>
645+
<!-- The samples are demos and end-to-end tests, not artifacts to depend on, so they
646+
are not published. The Kotlin one could not be published anyway: it has no Java
647+
sources, so no javadoc jar is attached to it and Central rejects the whole
648+
deployment with "Javadocs must be provided but not found in entries". -->
649+
<excludeArtifacts>
650+
<excludeArtifact>sample-operators</excludeArtifact>
651+
<excludeArtifact>sample-controller-namespace-deletion</excludeArtifact>
652+
<excludeArtifact>sample-kotlin-operator</excludeArtifact>
653+
<excludeArtifact>sample-leader-election</excludeArtifact>
654+
<excludeArtifact>sample-mysql-schema-operator</excludeArtifact>
655+
<excludeArtifact>sample-operations</excludeArtifact>
656+
<excludeArtifact>sample-tomcat-operator</excludeArtifact>
657+
<excludeArtifact>sample-webpage-operator</excludeArtifact>
658+
</excludeArtifacts>
645659
</configuration>
646660
</plugin>
647661
</plugins>

sample-operators/kotlin-operator/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
<properties>
3636
<kotlin.version>2.4.10</kotlin.version>
37-
<skipPublishing>true</skipPublishing>
3837
</properties>
3938

4039
<dependencyManagement>

0 commit comments

Comments
 (0)