Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifact helper for Maven #32

Open
timward60 opened this issue Jun 9, 2023 · 2 comments
Open

Artifact helper for Maven #32

timward60 opened this issue Jun 9, 2023 · 2 comments

Comments

@timward60
Copy link

Wanted to know if this on the road map, or if it is something we should consider contributing?

@markphip
Copy link
Contributor

markphip commented Aug 8, 2023

Open to doing it as well as receiving contribution. What does it require? Is Maven capable of authenticating using a short-lived Azure token as opposed to a PAT?

@markphip
Copy link
Contributor

markphip commented Aug 8, 2023

Should add I only know what I see here: https://learn.microsoft.com/en-us/azure/devops/artifacts/maven/install?view=azure-devops

At least for NPM, it has different properties for PAT (password) vs Token authentication. It also possible to specify an environment variable name in the configuration file. Do you know if the settings.xml supports a variable? Otherwise, the file would have to be rewritten with the value of the token.

The pattern used, because the tokens are short-lived, is to add a bash alias that replaces the CLI mvn with a script that generates a token on the fly, stores it in environment variable, then calls the CLI. So something like that, or a variant that writes the token into settings.xml would be the thing to try. The question would be whether the token will work as the password. It doesn't for other tools, AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants