question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

When using self-hosted runners we provision compute with a Maven settings.xml and currently this action will overwrite our correct settings.xml with one that’s inoperable. It would be nice to signal to the action to not generate a settings.xml file.

Another option might be to allow a template .github/workflow/maven/settings.xml that can be provisioned on the runner. In the case of running with GitHub actions proper the template can use ${{ secrets.references }} and in self-host just normal envars which Maven will interpolate into the settings file. Either way it’s secure.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
anderiuscommented, Mar 24, 2021

I am still at loss as to why the action deals with Maven at all. Why should installing java involve anything with Maven?

2reactions
maxim-lobanovcommented, Mar 25, 2021

I don’t have much historical context but @konradpabjan has shared some details in https://github.com/actions/setup-java/pull/132#issuecomment-796873588

The main reason why setup-java has Maven functionality in it is so that it’s easier to publish to GitHub package registry. When the initial maven publishing feature was added there was a pretty lengthy debate (and I was very much against adding the functionality to setup-java) but we ultimately decided to do it so that publishing would “just work” without any extra configurations or any other actions. I agree that it somewhat distorts the single purpose intent that setup-java initially was meant to provide (and that most users think it provides) but we ultimately decided that the pros outweight the cons. One solution that was floating around was to create a separate setup-maven or setup-gradle package but we don’t have the bandwidth to support yet another action and the maintenance burden would also be very high so we just extended setup-java Before we started work on the v2-preview, we had some discussions regarding what to do with the existing Maven publishing functionality and the general consensus was to just leave it as is. Don’t prioritize any new features for it, don’t break what we currently have, but keep the current functionality as is because we still want publishing to GitHub packages to “just work”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The settings.xml File in Maven - Baeldung
We can configure maven via the settings.xml file. We look at some common use cases and configuration options.
Read more >
maven command line how to point to a specific settings.xml for ...
I ran mvn install with a non default settings.xml option via -s and the artifacts were posted to the default .m2 repository and...
Read more >
Missing Maven settings.xml file for your Eclipse? What if you ...
Go to ~/.m2 folder · Put local eclipse related crunchify-settings.xml file and provide localRepository path: · <localRepository>/Users/<username>/ ...
Read more >
Settings Reference - Maven
The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml ......
Read more >
Using a Custom Maven Settings File - Heroku Dev Center
To demonstrate this, add a settings.xml file to the root directory of your Java project and put the following code in it. <?xml...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found