Skip to content
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

sample-json-plugin doesn't appear in IDE #3338

Closed
aleksei-burlakov opened this issue Dec 9, 2016 · 7 comments
Closed

sample-json-plugin doesn't appear in IDE #3338

aleksei-burlakov opened this issue Dec 9, 2016 · 7 comments
Assignees
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@aleksei-burlakov
Copy link

aleksei-burlakov commented Dec 9, 2016

I'm trying to equip che with sample-json-plugin, but I don't see the changes in the Web IDE. I followed the steps mentioned in #2330 with one exception , I didn't build che first, I started directly with the second step.

Reproduction Steps:

  1. ~$ git clone https://github.com/eclipse/che.git
  2. I added dependency into ~/che/assembly/assembly-ide-war/pom.xml
<dependency>
            <groupId>org.eclipse.che.sample</groupId>
            <artifactId>che-sample-plugin-json-ide</artifactId>
</dependency>
  1. I added dependency into ~/che/assembly/assembly-ide-war/src/main/resources/org/eclipse/che/ide/IDE.gwt.xml

<inherits name="org.eclipse.che.plugin.jsonexample.JSONExample"/>

  1. I added dependency into ~/che/assembly/assembly-wsagent-war/pom.xml
<dependency>
        <groupId>org.eclipse.che.sample</groupId>
            <artifactId>che-sample-plugin-json-server</artifactId>
</dependency>
  1. ~/che$ mvn sortpom:sort
  2. ~/che$ mvn clean install
  3. ~/che$ ./che.sh start
  4. I opened localhost:8080, then clicked on Create Workspace bar and I there was no json stack in the runtime tab
  5. I selected the BLANK stack and created a new workspace
  6. I started the workspace
  7. I clicked the Workspace menu and selected Create Project... and there was nothing like JSON in the popped dialog.
  8. I created a new project and when I added a new file to the project there is no json option (actually I did not expect it here, but I was not sure).

Did I miss something?

Expected behavior:

I expect that there is a new stack named JSON or maybe an option JSON when creating a new project (I'm not sure).

Observed behavior:

I see no changes in the Web IDE comparing to that when no new dependencies are added.

Che version: 5.0.0-latest
OS and version: Ubuntu 16.04 LTS
Docker version: 1.12.1, build 23cf638

Additional information:

  • Problem started happening recently, didn't happen in an older version of Che: Yes
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
@TylerJewell TylerJewell added the kind/question Questions that haven't been identified as being feature requests or bugs. label Dec 9, 2016
@aleksei-burlakov
Copy link
Author

aleksei-burlakov commented Dec 9, 2016

It's noteworthy, that when I do ./che.sh start it downloads something. It might be that it does not use the compiled image.

alex@alex-VirtualBox:~/che$ ./che.sh start
WARNING: No swap limit support
INFO: (che update): Pulling image eclipse/che-launcher:nightly
nightly: Pulling from eclipse/che-launcher
3690ec4760f9: Already exists 
48187e2d8244: Already exists 
349f1dce913e: Already exists 
a23397dd575b: Pull complete 
cec1d1ac15e1: Pull complete 
357635c189cd: Pull complete 
Digest: sha256:dd0d89c63b7d22ef81ed6e69259c3ee015d3f1cdc1c51733055974f44d6ca9f7
Status: Downloaded newer image for eclipse/che-launcher:nightly

INFO: ECLIPSE CHE: Pulling image eclipse/che-server:5.0.0-latest
5.0.0-latest: Pulling from eclipse/che-server
3690ec4760f9: Already exists 
3cfcebaba840: Downloading [===================================>               ] 52.39 MB/74.18 MB
2de6e0dd61f4: Downloading [=================>                                 ] 51.86 MB/149.9 MB

At the same time $CHE_ASSEMBLY is undefined and it is expected that che should use the default path to image when compiling and starting.

@slemeur
Copy link
Contributor

slemeur commented Dec 12, 2016

Hi @aleksei-burakov,

Have you installed the Eclipse Che CLI?
You need to configure $CHE_ASSEMBLY, with the path to built assembly.
https://eclipse-che.readme.io/docs/usage-docker#local-eclipse-che-binaries

@aleksei-burlakov
Copy link
Author

No, I did not install CLI, I only did those twelve steps.
I have a folder /home/alex/che/assembly/assembly-main/target/eclipse-che-5.0.0-M9-SNAPSHOT/eclipse-che-5.0.0-M9-SNAPSHOT where are the files bin conf lib LICENSE plugins README sdk stacks templates tomcat , so it seems to be correct. I use the command docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e CHE_ASSEMBLY=/home/alex/che/assembly/assembly-main/target/eclipse-che-5.0.0-M9-SNAPSHOT/eclipse-che-5.0.0-M9-SNAPSHOT eclipse/che start which output the following

Unable to find image 'eclipse/che:latest' locally
latest: Pulling from eclipse/che
3690ec4760f9: Already exists 
48187e2d8244: Already exists 
349f1dce913e: Already exists 
a23397dd575b: Pull complete 
cec1d1ac15e1: Pull complete 
357635c189cd: Pull complete 
Digest: sha256:dd0d89c63b7d22ef81ed6e69259c3ee015d3f1cdc1c51733055974f44d6ca9f7
Status: Downloaded newer image for eclipse/che:latest
INFO: ECLIPSE CHE: Pulling image eclipse/che-server:latest
latest: Pulling from eclipse/che-server
3690ec4760f9: Already exists
7fe36e46c847: Pulling fs layer
dfadaee9cf2b: Pulling fs layer
7fe36e46c847: Verifying Checksum
7fe36e46c847: Download complete
7fe36e46c847: Pull complete
dfadaee9cf2b: Verifying Checksum
dfadaee9cf2b: Download complete
dfadaee9cf2b: Pull complete
Digest: sha256:c26ae6e678db91c263be66410bdcd4611a455505ed6eea6db74af530f76c04d0
Status: Downloaded newer image for eclipse/che-server:latest

INFO: ECLIPSE CHE: Starting container...
INFO: ECLIPSE CHE: Server logs at "docker logs -f che-server"
INFO: ECLIPSE CHE: Server booting...
INFO: ECLIPSE CHE: Booted and reachable
INFO: ECLIPSE CHE: Ver: 5.0.0-M9-SNAPSHOT
INFO: ECLIPSE CHE: Use: http://172.17.0.1:8080
INFO: ECLIPSE CHE: API: http://172.17.0.1:8080/swagger

it says that it cannot find the image, although it seems to exists in that folder.

@slemeur
Copy link
Contributor

slemeur commented Dec 12, 2016

Thanks @aleksei-burakov.

You are missing a dependency to the module che-sample-plugin-json-shared. This module has code that is shared between che-sample-plugin-json-ide and che-sample-plugin-json-server.

The dependency to this module is needed in both assembly:

  • /che/assembly/assembly-ide-war/pom.xml
  • /che/assembly/assembly-wsagent-war

Also, I would recommend you to do the sortpom and the build step by step, as described here:
https://github.com/eclipse/che/tree/master/samples/sample-plugin-json

@aleksei-burlakov
Copy link
Author

The plugins che-sample-plugin-json-ide and che-sample-plugin-json-server already have

<dependency>
            <groupId>org.eclipse.che.sample</groupId>
            <artifactId>che-sample-plugin-json-shared</artifactId>
        </dependency>

so it is supposed to be included recursively. I tryed however the same twelve steps but this time with this dependency included explicitely, (as they say in the steps 1 and 2 in https://github.com/eclipse/che/tree/master/samples/sample-plugin-json) and it had no effect.
I wonder if it actually worked on your machine?

@elpdspec
Copy link

@aleksei-burakov
How did you resolve the issue ?

@aleksei-burlakov
Copy link
Author

@elpdspec this is pure magic. I did not figure out it myself because of its non-deterministic behaviour. There is a simple instruction https://github.com/eclipse/che/tree/master/samples/sample-plugin-json I repeated it maybe 5-7 times and it somehow appeared in the project creation dialog. Once it appeared it did not go, untill I did a git pull.
It was really a headache so I did a workaround. There are many other plugins, I used che/plugins/plugin-csharp (a C# plugin) as a pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

4 participants