Skip to content

Commit

Permalink
Don't hardcode repositoryId (salesforce#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
simontoens authored Mar 2, 2021
1 parent e735d7d commit 720e64f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions maven/maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ Usage: maven.sh -a action(s) [-t bazel package]
or ${REPOSITORY_URL}/releases/content, based on whether the artifact
version ends in -SNAPTSHOT or not.
REPOSITORY_ID: in settings.xml, the <id> of the <server> entry to use for
authentication. Defaults to "nexus".
See https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
POM_DESCRIPTION: if set, used as the value of the <description> element
in the generated pom(s).
Expand Down
6 changes: 5 additions & 1 deletion maven/maven_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ _deploy_artifacts_to_nexus() {
exit 1
fi

if [ -z "$REPOSITORY_ID" ]; then
REPOSITORY_ID="nexus"
fi

if [[ "$version" = *"-SNAPSHOT" ]]; then
repository="snapshots"
else
Expand Down Expand Up @@ -285,7 +289,7 @@ _deploy_artifacts_to_nexus() {
mvn ${MVN_ARGS} org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file \
-DpomFile=$pom_path \
-Dfile=$artifact_path \
-DrepositoryId="default" \
-DrepositoryId=${REPOSITORY_ID} \
-Durl=$full_repository_url \
$file_arg $type_arg $classifier_arg
}
Expand Down

0 comments on commit 720e64f

Please sign in to comment.