-
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
Support for Environment Variables in Plugins and Editors #14343
Comments
I don't understand what is being suggested here. The maven repo is controlled by the the maven settings. |
I think the idea is something like that ---
apiVersion: 1.0.0
metadata:
generateName: java-maven-
projects:
-
name: console-java-simple
source:
type: git
location: "https://github.com/che-samples/console-java-simple.git"
components:
-
type: chePlugin
id: redhat/java/latest
env:
- name: MAVEN_MIRROR_URL
value: http://mirror.host/
-
type: dockerimage
alias: maven
image: quay.io/eclipse/che-java11-maven:nightly
env:
- name: MAVEN_CONFIG
value: /home/user/.m2 |
The idea is to support environment variables in |
But VSCode-Java would still not use that variable, so what's the point? |
@tsmaeder - vscode does use the settings from the host which runs the plugin, so my point was to cascade the variable down to the host so that vscode can pick it up. IIUC the host in this case will be another container. correct me if am wrong |
The local Maven repo is not configurable directly in m2e. You need to pass a custom Maven settings.xml path instead in java.configuration.maven.userSettings. |
@fbricon - thats the settings I was looking for, may be we can make that configureable to Che like how we do the kubernetes references, that helps users adding the settings refernece devfile. does that make sense ? |
@tsmaeder |
After discussing this task with @l0rd @metlos @sleshchenko we decided to not to make things too complex that is why we want to populate environment variable to all containers that ChePlugin provides. |
Also it would be useful to be able to configure env variables for Che editors as well. This way we could easily alter some editor configuration from devfile without requirement to override meta.yaml. |
@kameshsampath @mmorhun The PR is just merged #15435 and you should be able to use this feature as soon as you got newer Che images |
As developer I wish to use my internal nexus repository as a maven mirror for all the components of Che. Currently when I configure Che with Java project and I use
MAVEN_MIRROR_URL
env to do some mirror settings, the vscode java8 language server is still trying to reach to Maven central for the artefacts instead of local maven mirror (if one deployed)The text was updated successfully, but these errors were encountered: