-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow injecting maven settings in JDT LS sidecar #14391
Comments
indeed, starting the container with a custom settings.xml, defining a mirror (or not) and the local repository with something like cc @tsmaeder |
if MAVEN_MIRROR_URL is not present, the settings.xml should not define the mirror |
yeah thats what we do currently in most . of the openshift images via entrypoint scripts |
The resulted <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<url>${env.MAVEN_MIRROR_URL}</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings> |
@fbricon I am wonder if |
Is your enhancement related to a problem? Please describe.
The problem has been originally described by #14343. It's currently not possible to specify, in a devfile, maven settings that would be taken into account by the LS.
Describe the solution you'd like
We can implement a mechanism that would:
settings.xml
in the sidecarjava.configuration.maven.userSettings
That maybe done by a plugin init container (mechanism that should be introduced by #13387) that would look for
MAVEN_OPTS
environment variable (#14343 should be addressed first) and generate the settings.xml.Describe alternatives you've considered
Another simpler solution that may work would be to pre-package the JDT.LS sidecar image with a settings.xml file:
Settings the environment variable
MAVEN_MIRROR_URL
for the ChePlugin would do the trick then (#14343 need to be fixed first).The text was updated successfully, but these errors were encountered: