Skip to content

Commit 4731568

Browse files
committed
chore: ignore nexus-staging-maven-plugin
1 parent e9d2e48 commit 4731568

File tree

1 file changed

+51
-11
lines changed
  • clients/google-api-services-abusiveexperiencereport/v1/2.0.0

1 file changed

+51
-11
lines changed

clients/google-api-services-abusiveexperiencereport/v1/2.0.0/pom.xml

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@
4444
<target>1.7</target>
4545
</configuration>
4646
</plugin>
47-
<plugin>
48-
<groupId>org.sonatype.plugins</groupId>
49-
<artifactId>nexus-staging-maven-plugin</artifactId>
50-
<version>1.6.8</version>
51-
<extensions>true</extensions>
52-
<configuration>
53-
<serverId>ossrh</serverId>
54-
<nexusUrl>https://google.oss.sonatype.org/</nexusUrl>
55-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
56-
</configuration>
57-
</plugin>
5847
<plugin>
5948
<groupId>org.apache.maven.plugins</groupId>
6049
<artifactId>maven-source-plugin</artifactId>
@@ -134,6 +123,57 @@
134123
</properties>
135124

136125
<profiles>
126+
<!-- Because the BOM artifact does not need to inherit other properties such as dependencies
127+
in the root pom.xml, this needs to define publication-related profiles. -->
128+
<profile>
129+
<!-- By default, we release artifacts to Sonatype, which requires
130+
nexus-staging-maven-plugin. -->
131+
<id>release-sonatype</id>
132+
<activation>
133+
<property>
134+
<!-- Only when we use the release-gcp-artifact-registry profile,
135+
which comes with artifact-registry-url property, this profile is
136+
turned off. -->
137+
<name>!artifact-registry-url</name>
138+
</property>
139+
</activation>
140+
<build>
141+
<plugins>
142+
<plugin>
143+
<groupId>org.sonatype.plugins</groupId>
144+
<artifactId>nexus-staging-maven-plugin</artifactId>
145+
<version>1.6.13</version>
146+
<extensions>true</extensions>
147+
<configuration>
148+
<serverId>sonatype-nexus-staging</serverId>
149+
<nexusUrl>https://google.oss.sonatype.org/</nexusUrl>
150+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
151+
</configuration>
152+
</plugin>
153+
</plugins>
154+
</build>
155+
</profile>
156+
<profile>
157+
<!-- Optionally, we can publish the artifacts to GCP Artifact Registry specifying
158+
this release-gcp-artifact-registry profile:
159+
mvn deploy -P=release-gcp-artifact-registry -P=-release-sonatype \
160+
-Dartifact-registry-url=artifactregistry://us-maven.pkg.dev/...
161+
-->
162+
<id>release-gcp-artifact-registry</id>
163+
<properties>
164+
<artifact-registry-url>artifactregistry://please-define-artifact-registry-url-property</artifact-registry-url>
165+
</properties>
166+
<distributionManagement>
167+
<repository>
168+
<id>gcp-artifact-registry-repository</id>
169+
<url>${artifact-registry-url}</url>
170+
</repository>
171+
<snapshotRepository>
172+
<id>gcp-artifact-registry-repository</id>
173+
<url>${artifact-registry-url}</url>
174+
</snapshotRepository>
175+
</distributionManagement>
176+
</profile>
137177
<profile>
138178
<id>release-sign-artifacts</id>
139179
<activation>

0 commit comments

Comments
 (0)