• False
    • None
    • False

      it has been provided upstream eclipse/che#21465

      JBang is required to use some key functionalities of VS Code Debug Adapter for Camel and VS Code Apache Karavan.

      More generally, JBang is also a nice cli for java developers to quickly test a lot of things.

      Technical: I was pointed to this image to modify https://github.com/redhat-developer/devspaces-images/tree/devspaces-3-rhel-8/devspaces-udi

            [CRW-3072] Include jbang binary in Universal Developer image

            Aurélien Pupier added a comment - - edited

            I do not see mentions of jbang in the last commits https://github.com/redhat-developer/devspaces-images/commits/devspaces-3-rhel-8/devspaces-udi
            Can you point me how it was added to the productized Universal Developer Image which is used by the Red Hat OpenShift Dev Spaces by default?

             

            EDIT: my bad, i thought it was resolved, the fix version is for the "targeted version" I guess.

            Aurélien Pupier added a comment - - edited I do not see mentions of jbang in the last commits https://github.com/redhat-developer/devspaces-images/commits/devspaces-3-rhel-8/devspaces-udi Can you point me how it was added to the productized Universal Developer Image which is used by the Red Hat OpenShift Dev Spaces by default?   EDIT: my bad, i thought it was resolved, the fix version is for the "targeted version" I guess.

            Nick Boldt added a comment - - edited

            Related to CRW-3865 - in which we might include sdkman in downstream UDI.

            Looks like PNC supports gradle, so we might be able to build jbang in PNC, then import it into Brew/OSBS.

            Hibernate build config examples, for reference:

            Nick Boldt added a comment - - edited Related to CRW-3865 - in which we might include sdkman in downstream UDI. Looks like PNC supports gradle, so we might be able to build jbang in PNC, then import it into Brew/OSBS. Hibernate build config examples, for reference: https://orch.psi.redhat.com/pnc-web/#/projects/325/build-configs/9249 https://orch.psi.redhat.com/pnc-web/#/projects/643/build-configs/6782 (different repos/params)

            Nick Boldt added a comment - - edited

            OK so for this to work in Brew we need one of these to provide the jbang binary in UDI for offline/airgap:

            Alternatively, we could provide the plugin, then users/admins would need to whitelist the jbang download URL as something accessible thru the proxy/firewall/airgap (but that won't work for the "I'm on a train going through a reallllly long tunnel" offline usecase).

            I don't yet know when we plan to switch to vscode as the default editor in Eclipse Che and Dev Spaces, but I hope it's before the end of the year. Theia may persist as a secondary option, as will IDEA, but the primary dev focus should be on and with vscode.

            Nick Boldt added a comment - - edited OK so for this to work in Brew we need one of these to provide the jbang binary in UDI for offline/airgap: install it from RHEL-signed RPM from a RHEL 8 content set build it from sources in the dockerfile, or via PNC build fetch it from some url using https://osbs.readthedocs.io/en/latest/users.html#fetch-artifacts-koji-yaml Alternatively, we could provide the plugin, then users/admins would need to whitelist the jbang download URL as something accessible thru the proxy/firewall/airgap (but that won't work for the "I'm on a train going through a reallllly long tunnel" offline usecase). I don't yet know when we plan to switch to vscode as the default editor in Eclipse Che and Dev Spaces, but I hope it's before the end of the year. Theia may persist as a secondary option, as will IDEA, but the primary dev focus should be on and with vscode.

            btw. "Since the Fuse sample in DS 3.0 uses maven, perhaps you could simply use https://github.com/jbangdev/jbang-maven-plugin/ to include this in the workspace?" ...how would that actually help if you'll need that to work airgapped (it can't as it needs to download jbang) or to do a build you'll need it built in brew anyway wont you?

            Max Andersen added a comment - btw. "Since the Fuse sample in DS 3.0 uses maven, perhaps you could simply use https://github.com/jbangdev/jbang-maven-plugin/ to include this in the workspace?" ...how would that actually help if you'll need that to work airgapped (it can't as it needs to download jbang) or to do a build you'll need it built in brew anyway wont you?

            jbang is built from its sources at github.com/jbangdev/jbang
            note: it has a custom fork of shrinkwrap to handle BOM's - uses different GAV so should be fine but its intended use is purely for embedding in jbang.

            JBang works as fine as maven/gradle works in offline/airgapped envs - you point them to the maven repository you need it to use. if you find issues do please report them.

            Java 11 support for running single java files has very little to do with what Aurelien is after - java 11 support does not support fetching dependencies and doing the build for multiple source files and more.

            Max Andersen added a comment - jbang is built from its sources at github.com/jbangdev/jbang note: it has a custom fork of shrinkwrap to handle BOM's - uses different GAV so should be fine but its intended use is purely for embedding in jbang. JBang works as fine as maven/gradle works in offline/airgapped envs - you point them to the maven repository you need it to use. if you find issues do please report them. Java 11 support for running single java files has very little to do with what Aurelien is after - java 11 support does not support fetching dependencies and doing the build for multiple source files and more.

            > Will this new editor be embedded inside Theia? IntelliJ? VSCode?

            Currently trying with VS Code. If Theia is staying for some time, we will need it for it too. Currently, there is no extension for IntelliJ leveraging Camel with JBang.

            > Since the Fuse sample in DS 3.0 uses maven, perhaps you could simply use https://github.com/jbangdev/jbang-maven-plugin/ to include this in the workspace?

            This will be too complicated for the end-user. And it will require to redownload jbang for each new workspace.

            > how to get jbang sources offline into Brew to build this as part of the UDI image?

            No, I have no idea how JBang is built. cc manderse@redhat.com

            > how to make jbang work in offline/airgapped envs?

            No, I have no idea on the internals of jbang and I'm not familiar with the offline/airgapped mode of Devspaces. cc manderse@redhat.com

            > license issues?

            No, but as you mentioned it is MIT so should be fine.

            > Finally, I see a comment on the jbang GH page that says "Ever tried out Java 11+ support for running .java files directly in your shell but felt it was a bit too cumbersome ?" ... so do you REAAAAALLLY need this if Java 11 already natively supports running .java files?

            Camel has built on top of jbang to start Camel routes locally. A user will finally need to configure and use Java but it requires more configuration which are often a showstopper.

            Aurélien Pupier added a comment - > Will this new editor be embedded inside Theia? IntelliJ? VSCode? Currently trying with VS Code. If Theia is staying for some time, we will need it for it too. Currently, there is no extension for IntelliJ leveraging Camel with JBang. > Since the Fuse sample in DS 3.0 uses maven, perhaps you could simply use https://github.com/jbangdev/jbang-maven-plugin/ to include this in the workspace? This will be too complicated for the end-user. And it will require to redownload jbang for each new workspace. > how to get jbang sources offline into Brew to build this as part of the UDI image? No, I have no idea how JBang is built. cc manderse@redhat.com > how to make jbang work in offline/airgapped envs? No, I have no idea on the internals of jbang and I'm not familiar with the offline/airgapped mode of Devspaces. cc manderse@redhat.com > license issues? No, but as you mentioned it is MIT so should be fine. > Finally, I see a comment on the jbang GH page that says "Ever tried out Java 11+ support for running .java files directly in your shell but felt it was a bit too cumbersome ?" ... so do you REAAAAALLLY need this if Java 11 already natively supports running .java files? Camel has built on top of jbang to start Camel routes locally. A user will finally need to configure and use Java but it requires more configuration which are often a showstopper.

            Nick Boldt added a comment -

            Will this new editor be embedded inside Theia? IntelliJ? VSCode? Today there are 3 supported editors in Eclipse Che, with the 3rd one on its way into Dev Spaces soon.

            Since the Fuse sample in DS 3.0 uses maven, perhaps you could simply use https://github.com/jbangdev/jbang-maven-plugin/ to include this in the workspace?

            Also have you considered:

            • how to get jbang sources offline into Brew to build this as part of the UDI image?
            • how to make jbang work in offline/airgapped envs?
            • license issues? (Should be fine, looks like it's all under MIT)

            Finally, I see a comment on the jbang GH page that says "Ever tried out Java 11+ support for running .java files directly in your shell but felt it was a bit too cumbersome ?" ... so do you REAAAAALLLY need this if Java 11 already natively supports running .java files?

            https://stackoverflow.com/questions/39582491/debug-run-standard-java-in-visual-studio-code-ide-and-os-x#:~:text=Open%20your%20Java%20code%20file,shown%20in%20the%20Output%20Window.

            Nick Boldt added a comment - Will this new editor be embedded inside Theia? IntelliJ? VSCode? Today there are 3 supported editors in Eclipse Che, with the 3rd one on its way into Dev Spaces soon. Since the Fuse sample in DS 3.0 uses maven, perhaps you could simply use https://github.com/jbangdev/jbang-maven-plugin/ to include this in the workspace? Also have you considered: how to get jbang sources offline into Brew to build this as part of the UDI image? how to make jbang work in offline/airgapped envs? license issues? (Should be fine, looks like it's all under MIT) Finally, I see a comment on the jbang GH page that says "Ever tried out Java 11+ support for running .java files directly in your shell but felt it was a bit too cumbersome ?" ... so do you REAAAAALLLY need this if Java 11 already natively supports running .java files? https://stackoverflow.com/questions/39582491/debug-run-standard-java-in-visual-studio-code-ide-and-os-x#:~:text=Open%20your%20Java%20code%20file,shown%20in%20the%20Output%20Window .

              ibuziuk@redhat.com Ilya Buziuk
              apupier@redhat.com Aurélien Pupier
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: