|
34 | 34 | # file in the ~/.m2/ directory and add this section :
|
35 | 35 | # <servers>
|
36 | 36 | # <server>
|
37 |
| -# <id>sonatype-nexus-staging</id> |
38 |
| -# <username>...</username> |
39 |
| -# <password>...</password> |
| 37 | +# <id>central</id> |
| 38 | +# <username>central_portal_token_username</username> |
| 39 | +# <password>central_portal_token_password</password> |
40 | 40 | # </server>
|
41 | 41 | # </servers>
|
42 | 42 | #
|
| 43 | +# You can find the repository credentials in go/valentine |
| 44 | +# |
43 | 45 | readonly BAZEL_ROOT=$(pwd)
|
44 | 46 | readonly BUILD_SECTION_FILE="${BAZEL_ROOT}/maven/build_section.xml"
|
45 | 47 |
|
@@ -118,10 +120,10 @@ common::check_maven_prerequisites() {
|
118 | 120 | common::error "deploy_to_sonatype variable is missing."
|
119 | 121 | fi
|
120 | 122 |
|
121 |
| - # sonatype_auto_release is used to automatically release the artifacts after |
| 123 | + # sonatype_auto_publish is used to automatically publish the artifacts after |
122 | 124 | # deployment.
|
123 |
| - if [[ -z "${sonatype_auto_release:-}" ]]; then |
124 |
| - common::error "sonatype_auto_release variable is missing." |
| 125 | + if [[ -z "${sonatype_auto_publish:-}" ]]; then |
| 126 | + common::error "sonatype_auto_publish variable is missing." |
125 | 127 | fi
|
126 | 128 |
|
127 | 129 | if [[ -z ${MAVEN_GPG_PASSPHRASE:-} ]]; then
|
@@ -242,7 +244,7 @@ common::deploy_to_sonatype() {
|
242 | 244 | if [[ "${deploy_to_sonatype}" == true ]]; then
|
243 | 245 | common::info "Deploying artifacts to sonatype..."
|
244 | 246 | # Use maven to sign and deploy jar, sources jar and javadocs jar to OSS sonatype
|
245 |
| - mvn -f "${pom_file}" clean deploy "-DautoReleaseAfterClose=${sonatype_auto_release}" |
| 247 | + mvn -f "${pom_file}" clean deploy "-DautoPublish=${sonatype_auto_publish}" |
246 | 248 |
|
247 | 249 | common::info "Deployment completed."
|
248 | 250 | else
|
|
0 commit comments