Purpose of this docker image is to create a maven settings.xml from a few parameters, that specifically for deploying maven artifacts to some maven repository. This image features:
--settings parameters to .mvn/maven.config, so no additional command line parameter is necessary, when invoking mavenmvn deploy -DperformRelease), to also deploy sources and javadocTo use this image, nothing is needed beside a repository server, of course. The project's pom.xml could be vanilla and does not need to fulfill any requirements:
repositories or pluginRepositories section neededmaven-deploy-plugin configuration neededmvn deployThis image uses the following environment variables for rendering the settings.xml
.mvn/release-settings.xml, which is in the defaulting case also appended to .mvn/maven.confignone to disable mirroring${user.home}/.m2/repositoryotherwiseInvoke either from command line via:
docker run --rm -eREPO_URL=http://myrepo -eUSERNAME=xxx -ePASSWORD=xxx kamalook/drone-maven-settings
where the settings.xml is rendered to stdout or use via drone.
A possible .drone.yml could look like:
kind: pipeline
name: default
steps:
- name: init maven
image: kamalook/drone-maven-settings
settings:
releases_url: { from_secret: repo-releases }
snapshots_url: { from_secret: repo-snapshots }
username: { from_secret: repo-username }
password: { from_secret: repo-password }
mirror: none
property_xxx: yyy
property_my_param: value
- name: build
image: maven:3-jdk-11-slim
commands: [mvn -B -V deploy -DperformRelease]
Content type
Image
Digest
Size
3.9 MB
Last updated
over 4 years ago
docker pull dronee/maven-settings