|
14 | 14 |
|
15 | 15 | <inceptionYear>2011</inceptionYear> |
16 | 16 |
|
| 17 | + <developers> |
| 18 | + <developer> |
| 19 | + <id>GoogleAPIs</id> |
| 20 | + <name>GoogleAPIs</name> |
| 21 | + |
| 22 | + <organization>Google</organization> |
| 23 | + <organizationUrl>https://www.google.com</organizationUrl> |
| 24 | + </developer> |
| 25 | + </developers> |
| 26 | + |
17 | 27 | <organization> |
18 | 28 | <name>Google</name> |
19 | 29 | <url>http://www.google.com/</url> |
|
44 | 54 | <target>1.7</target> |
45 | 55 | </configuration> |
46 | 56 | </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> |
58 | 57 | <plugin> |
59 | 58 | <groupId>org.apache.maven.plugins</groupId> |
60 | 59 | <artifactId>maven-source-plugin</artifactId> |
|
134 | 133 | </properties> |
135 | 134 |
|
136 | 135 | <profiles> |
| 136 | + <profile> |
| 137 | + <!-- By default, we release artifacts to Sonatype, which requires |
| 138 | + nexus-staging-maven-plugin. --> |
| 139 | + <id>release-sonatype</id> |
| 140 | + <activation> |
| 141 | + <property> |
| 142 | + <!-- Only when we use the release-gcp-artifact-registry profile, |
| 143 | + which comes with artifact-registry-url property, this profile is |
| 144 | + turned off. --> |
| 145 | + <name>!artifact-registry-url</name> |
| 146 | + </property> |
| 147 | + </activation> |
| 148 | + <build> |
| 149 | + <plugins> |
| 150 | + <plugin> |
| 151 | + <groupId>org.sonatype.plugins</groupId> |
| 152 | + <artifactId>nexus-staging-maven-plugin</artifactId> |
| 153 | + <version>1.6.13</version> |
| 154 | + <extensions>true</extensions> |
| 155 | + <configuration> |
| 156 | + <serverId>sonatype-nexus-staging</serverId> |
| 157 | + <nexusUrl>https://google.oss.sonatype.org/</nexusUrl> |
| 158 | + <autoReleaseAfterClose>false</autoReleaseAfterClose> |
| 159 | + </configuration> |
| 160 | + </plugin> |
| 161 | + </plugins> |
| 162 | + </build> |
| 163 | + </profile> |
| 164 | + <profile> |
| 165 | + <!-- Optionally, we can publish the artifacts to GCP Artifact Registry specifying |
| 166 | + this release-gcp-artifact-registry profile: |
| 167 | + mvn deploy -P=release-gcp-artifact-registry -P=-release-sonatype \ |
| 168 | + -Dartifact-registry-url=artifactregistry://us-maven.pkg.dev/... |
| 169 | + --> |
| 170 | + <id>release-gcp-artifact-registry</id> |
| 171 | + <properties> |
| 172 | + <artifact-registry-url>artifactregistry://please-define-artifact-registry-url-property</artifact-registry-url> |
| 173 | + </properties> |
| 174 | + <distributionManagement> |
| 175 | + <repository> |
| 176 | + <id>gcp-artifact-registry-repository</id> |
| 177 | + <url>${artifact-registry-url}</url> |
| 178 | + </repository> |
| 179 | + <snapshotRepository> |
| 180 | + <id>gcp-artifact-registry-repository</id> |
| 181 | + <url>${artifact-registry-url}</url> |
| 182 | + </snapshotRepository> |
| 183 | + </distributionManagement> |
| 184 | + </profile> |
137 | 185 | <profile> |
138 | 186 | <id>release-sign-artifacts</id> |
139 | 187 | <activation> |
|
0 commit comments