Skip to content

Commit e253a84

Browse files
SONARJAVA-4664 Disable deployment of java-check-test-sources artifacts (#4500)
* SONARJAVA-4664 Disable deployment of java-check-test-sources artifacts Set a property that should be picked up by the artifactory plugin and prevent any attempt to synchronize from repox to Maven central at release time. Can be tested by adding a local repository to the top-level pom and running `mvn clean deploy`. An example of a local repository in your pom.xml ```xml <distributionManagement> <repository> <id>local-folder</id> <name>Local folder to test deployment configuration</name> <url>file:./local-deployment</url> </repository> </distributionManagement> ```
1 parent b4ff76a commit e253a84

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

java-checks-test-sources/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<sonar.skip>true</sonar.skip>
1919
<forbiddenapis.skip>true</forbiddenapis.skip>
2020
<skipTests>true</skipTests>
21+
<maven.deploy.skip>true</maven.deploy.skip>
2122
</properties>
2223

2324
<!--
@@ -951,12 +952,6 @@
951952
<argLine>--enable-preview</argLine>
952953
</configuration>
953954
</plugin>
954-
<!--
955-
We don't want to publish any artifacts from this module in artifactory or maven central.
956-
Unfortunately, "org.jfrog.buildinfo : artifactory-maven-plugin" only supports maven.deploy.skip=true at the project level
957-
and not in a submodule. If the bellow plugins are disabled (<phase>none</phase>), it's a workaround to
958-
not generate ".jar" "-sources.jar" and "-javadoc.jar".
959-
-->
960955
<plugin>
961956
<groupId>org.simplify4u.plugins</groupId>
962957
<artifactId>sign-maven-plugin</artifactId>

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@
9999
<version.jacoco.plugin>0.8.10</version.jacoco.plugin>
100100
</properties>
101101

102+
<distributionManagement>
103+
<repository>
104+
<id>local-folder</id>
105+
<name>Local folder to test deployment configuration</name>
106+
<url>file:./local-deployment</url>
107+
</repository>
108+
</distributionManagement>
109+
102110
<dependencyManagement>
103111
<dependencies>
104112
<dependency>

0 commit comments

Comments
 (0)