-
Notifications
You must be signed in to change notification settings - Fork 114
Conversation
Signed-off-by: Esteban Mañaricua <[email protected]>
Signed-off-by: Esteban Mañaricua <[email protected]>
Signed-off-by: Esteban Mañaricua <[email protected]>
Signed-off-by: Esteban Mañaricua <[email protected]>
Signed-off-by: Esteban Mañaricua <[email protected]>
@gattytto I am giving a try right now |
@gattytto so it is missing the plugin |
I guess this one: eclipse-che/che-plugin-registry#761 |
yes @sunix you can test it using this one, just edit pom.xml to use java11 instead of java8: apiVersion: 1.0.0
metadata:
name: Lombok
projects:
- name: iot-core
source:
location: 'https://github.com/chuucks/LOMBOK-PROJECT-EXAMPLE'
type: git
branch: master
components:
- id: redhat/java8/latest
type: chePlugin
volumes:
- containerPath: /tmp/vscode-unpacked
name: lombok-java-unpacked
preferences:
java.jdt.ls.vmargs: -javaagent:/tmp/vscode-unpacked/lombok.jar
- type: chePlugin
reference: >-
https://raw.githubusercontent.com/gattytto/cheplugins/master/lombok/1.0.1/meta.yaml
volumes:
- containerPath: /tmp/vscode-unpacked
name: lombok-java-unpacked
alias: lombok
- id: eclipse/che-theia/next
type: cheEditor
- type: dockerimage
command:
- sh
- -c
args:
- until [ -d /tmp/vscode-unpacked/*lombok* ]; do sleep 1; done; cp $(find /tmp |grep lombok |grep jar) /tmp/vscode-unpacked/; sleep infinity
alias: maven
image: quay.io/eclipse/che-java8-maven:nightly
env:
- name: MAVEN_CONFIG
value: >-
-javaagent:/tmp/vscode-unpacked/lombok.jar -XX:MaxRAMPercentage=50.0
-XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20
-XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
-Dsun.zip.disableMemoryMapping=true -Xms20m
-Djava.security.egd=file:/dev/./urandom -Duser.home=/home/user
- name: MAVEN_OPTS
value: >-
-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom
-Duser.home=/home/user
- name: JAVA_OPTS
value: >-
-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4
-XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true
-Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/user
- name: JAVA_TOOL_OPTIONS
value: >-
-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom
memoryLimit: 512Mi
mountSources: true
volumes:
- name: m2
containerPath: /home/user/.m2
- name: lombok-java-unpacked
containerPath: /tmp/vscode-unpacked
endpoints:
- name: 8080/tcp
port: 8080 |
projects: | ||
- name: lombok-demo | ||
source: | ||
location: 'https://github.com/che-samples/lombok-demo.git' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This git repo is empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id: cool2k/vscode-lombok/latest | ||
volumes: | ||
- containerPath: /tmp/vscode-unpacked | ||
name: lombok-java-unpacked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gattytto This looks tricky for the enduser to figure out what he needs to do to have the plugin working.
Why not making it in the same sidecar with Java extension like we do for Quarkus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other option we could try: add the volume vscode-unpack
to all the java based plugin.
and add
preferences:
java.jdt.ls.vmargs: -javaagent:/tmp/vscode-unpacked/lombok.jar
to the lombok meta.yaml (not sure it is possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunix that is a feature request
For a nice demo (to be included in the |
- sh | ||
- -c | ||
args: | ||
- until [ -d /tmp/vscode-unpacked/*lombok* ]; do sleep 1; done; cp $(find /tmp |grep lombok |grep jar) /tmp/vscode-unpacked/; sleep infinity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that works but i don't think this is the right approach. It should be done by the Che plugin (entrypoint maybe ?)
@sunix maybe we can have a feature in plugins meta.yaml like "globalVolume" or "volumeForAll" to set up a folder that will be mounted in all CLI and sidecar containers (including theia's) to have files copied there. With that and settings from meta.yaml and a command in the meta.yaml that is run in the sidecar, we could have all this sorted out invisibly to the user. I don't know about the current status of meta.yaml but it's easy to be able to just override the init command from the yaml and not having to put it in the sidecar .sh/Dockerfile. command:
- sh
- -c
args:
- until [ -d /tmp/vscode-unpacked/*lombok* ]; do sleep 1; done; cp $(find /tmp |grep lombok |grep jar) /tmp/vscode-unpacked/; sleep infinity |
I think this PR is stale now as we have added Lombok without the plugin. Let's close this PR and try again with the new approach. |
Signed-off-by: Esteban Mañaricua [email protected]