[ 
https://issues.apache.org/jira/browse/MBUILDCACHE-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17676726#comment-17676726
 ] 

Alexander Schwartz commented on MBUILDCACHE-33:
-----------------------------------------------

In a previous comment, it is stated that {{${env.MY_VAR}}} is not working for a 
settings.xml.

I've used it myself in this example 
[https://github.com/ahus1/keycloak-dropwizard-integration/blob/master/cisettings.xml]
 so I suppose this can be used in other setups as well.

I've been using this to have a per-project {{settings.xml}} checked into the 
repo next to the pom.xml, and keeping the secrets as environment variables. The 
project-specific settings can then be passed to maven on the CLI as {{mvn 
--settings cisettings.xml ...}} 

> Support remote cache credentials from environment variables 
> ------------------------------------------------------------
>
>                 Key: MBUILDCACHE-33
>                 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-33
>             Project: Maven Build Cache Extension
>          Issue Type: New Feature
>            Reporter: Alexander Ashitkin
>            Priority: Major
>              Labels: pull-request-available
>
> In my current environment settings.xml are managed by a build team which is 
> not allowing any modification because the same build service is used by all 
> teams. Atop of that, maven build runs in a fresh container which doesn't have 
> any credentials injected for security reasons. Because of that cache cannot 
> read/deploy build artifacts to an authenticated http server. Still, our build 
> service allows to inject credentials from environment variables into build 
> container. Need to support cache setup without settings.xml by injecting 
> environment variables:
>  * MAVEN_BUILD_CACHE_DIRECT_CONNECT
>  * MAVEN_BUILD_CACHE_USER
>  * MAVEN_BUILD_CACHE_PASSWORD
>  * MAVEN_BUILD_CACHE_PROXY_USER
>  * MAVEN_BUILD_CACHE_PROXY_PASSWORD



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to