Skip to content

Commit

Permalink
SONARJAVA-4664 Disable deployment of java-check-test-sources artifacts (
Browse files Browse the repository at this point in the history
#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>
```
  • Loading branch information
dorian-burihabwa-sonarsource authored Oct 24, 2023
1 parent b4ff76a commit e253a84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 1 addition & 6 deletions java-checks-test-sources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<sonar.skip>true</sonar.skip>
<forbiddenapis.skip>true</forbiddenapis.skip>
<skipTests>true</skipTests>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<!--
Expand Down Expand Up @@ -951,12 +952,6 @@
<argLine>--enable-preview</argLine>
</configuration>
</plugin>
<!--
We don't want to publish any artifacts from this module in artifactory or maven central.
Unfortunately, "org.jfrog.buildinfo : artifactory-maven-plugin" only supports maven.deploy.skip=true at the project level
and not in a submodule. If the bellow plugins are disabled (<phase>none</phase>), it's a workaround to
not generate ".jar" "-sources.jar" and "-javadoc.jar".
-->
<plugin>
<groupId>org.simplify4u.plugins</groupId>
<artifactId>sign-maven-plugin</artifactId>
Expand Down
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@
<version.jacoco.plugin>0.8.10</version.jacoco.plugin>
</properties>

<distributionManagement>
<repository>
<id>local-folder</id>
<name>Local folder to test deployment configuration</name>
<url>file:./local-deployment</url>
</repository>
</distributionManagement>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down

0 comments on commit e253a84

Please sign in to comment.