Skip to content

Commit

Permalink
Added configure maven settings for central token auth
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbenckhuijsen committed Mar 23, 2024
1 parent f7c3e67 commit c6677dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ pipelines:
deployment: Production
trigger: manual
script:
- bash configure-maven.sh
- mvn -B deploy --file pom.xml
8 changes: 8 additions & 0 deletions configure-maven.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

sed -i~ "/<servers>/ a\
<server>\
<id>central</id>\
<username>${MVN_CENTRAL_TOKEN_USERNAME}</username>\
<password>${MVN_CENTRAL_TOKEN_PASSWORD}</password>\
</server>" /usr/share/maven/conf/settings.xml

0 comments on commit c6677dc

Please sign in to comment.