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

Add overwrite-settings to disable overwriting settings.xml #82

Closed
wants to merge 1 commit into from

Conversation

joschi
Copy link
Contributor

@joschi joschi commented Jul 20, 2020

In some scenarios there's already a valid Maven settings file which shouldn't or cannot be overwritten by actions/setup-java.

The overwrite-settings (default: true) configuration setting enables users to disable the generation of the Maven settings file by actions/setup-java.

Closes #79
Refs joschi/setup-jdk#11

@davidkarlsen
Copy link

Anything holding this?

@joschi
Copy link
Contributor Author

joschi commented Oct 5, 2020

@clarkbw @konradpabjan Is there any interested in me updating this PR to the latest main branch or should we close this PR?

@@ -36,6 +36,9 @@ inputs:
settings-path:
description: 'Path to where the settings.xml file will be written. Default is ~/.m2.'
required: false
overwrite-settings:
description: 'Overwrite the settings.xml file if it exists. Default is "true".'
required: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -23,8 +23,15 @@ async function run() {
core.getInput('server-username', {required: false}) || undefined;
const password =
core.getInput('server-password', {required: false}) || undefined;
const overwriteSettings =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use the same approach like actions/checkout: https://github.com/actions/checkout/blob/main/src/input-helper.ts#L118
May be we can wrap it in small util func

@maxim-lobanov
Copy link
Contributor

Closing as duplicate of #136

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

Successfully merging this pull request may close these issues.

Provide an option to by pass generating a settings.xml file
3 participants