che icon indicating copy to clipboard operation
che copied to clipboard

Am I using che-install-plugin correctly? I can't make the JSON plugin works

Open mariosotil opened this issue 10 years ago • 5 comments

I could build the 4.7.0 version. But when I tried to configure the JSON plugin sample, I can't see it in the workspace.

I checked out the repo, build it, copy the JSON plugin Jar files to the plugins folder, and run che-install-plugin. Am I missing something?

These were the steps I took:

$ cd ~/eclipse-che
$ git checkout tags/4.7.0
[...]
$ cd che
$ mvn clean install 
[...]
$ cd assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/
$ cp ~/eclipse-che/che/samples/sample-plugin-json/che-sample-plugin-json-server/target/che-sample-plugin-json-server-4.7.0.jar  ./plugins/ws-agent
$ cp ~/eclipse-che/che/samples/sample-plugin-json/che-sample-plugin-json-ide/target/che-sample-plugin-json-ide-4.7.0.jar  ./plugins/ide
$ bin/che-install-plugin.sh -a
#####################################################################
CHE SDK: Installing each extension into local maven repository
#####################################################################


#####################################################################
CHE SDK: Adding IDE extensions as dependencies
#####################################################################

Extension found org.eclipse.che.sample:che-sample-plugin-json-ide:4.7.0
    Including GWT module org.eclipse.che.plugin.jsonexample.JSONExample
Found: 1 extension(s)

#####################################################################
CHE SDK: Adding extensions as dependencies to ws-agent
#####################################################################

Extension found org.eclipse.che.sample:che-sample-plugin-json-server:4.7.0
Found: 1 extension(s)

[...]

[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ assembly-main ---
[INFO] Installing /home/ubuntu/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/sdk/assembly-main/pom.xml to /home/ubuntu/.m2/repository/org/eclipse/che/assembly-main/4.7.0/assembly-main-4.7.0.pom
[INFO] Installing /home/ubuntu/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/sdk/assembly-main/target/eclipse-che-4.7.0.zip to /home/ubuntu/.m2/repository/org/eclipse/che/assembly-main/4.7.0/assembly-main-4.7.0.zip
[INFO] Installing /home/ubuntu/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/sdk/assembly-main/target/eclipse-che-4.7.0.tar.gz to /home/ubuntu/.m2/repository/org/eclipse/che/assembly-main/4.7.0/assembly-main-4.7.0.tar.gz
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.033 s
[INFO] Finished at: 2016-09-04T14:44:51-04:00
[INFO] Final Memory: 36M/1310M
[INFO] ------------------------------------------------------------------------

#####################################################################
Good Job! Your build has completed.
#####################################################################

New Workspace Master Web App: 
    /home/ubuntu/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/tomcat/webapps/ide.war
New Workspace Agent: 
    /home/ubuntu/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/lib/ws-agent.zip
New Che Assembly 
    /home/ubuntu/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/plugins/assembly/

You can start this Che assemby to see your plugins.

So far, so good.

First attempt:

$ cd ~/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/
$ bin/che.sh

Second attempt:

$ cd ~/eclipse-che/che/assembly/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0/sdk/assembly-main/target/eclipse-che-4.7.0/eclipse-che-4.7.0
$ bin/che.sh

In both cases, Eclipse Che worked fine, but the features from the JSON plugin were not visible. There's no a 'JSON test' project, menus, etc.

My computer's configuration is

  • Ubuntu 16.04.1
  • Oracle Java 1.8.0_101
  • Docker 1.12.1
  • docker-machine 0.7.0 a650a40
  • Maven 3.3.9
  • Bower 1.7.9
  • Gulp CLI version - 1.2.2
  • I added the gwt-dev dependency, and removed all provided scopes on assembly-ide-war/pom.xml

mariosotil avatar Sep 04 '16 20:09 mariosotil

@mariosotil Have you tried to configure JSON plugin manually? You can do that as follows:

  1. Build Che.
  2. Add dependencies to the ~/che/assembly/assembly-ide-war/pom.xml:
<dependency>
            <groupId>org.eclipse.che.sample</groupId>
            <artifactId>che-sample-plugin-json-ide</artifactId>
</dependency>
  1. Add GWT module dependency to the ~/che/assembly/assembly-ide-war/src/main/resources/org/eclipse/che/ide/IDE.gwt.xml:

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

  1. Add dependencies to the ~/che/assembly/assembly-wsagent-war/pom.xml:
<dependency>
        <groupId>org.eclipse.che.sample</groupId>
            <artifactId>che-sample-plugin-json-server</artifactId>
</dependency>
  1. sortpom:sort and rebuild Che.
  2. Start Che.

ddementieva avatar Sep 06 '16 14:09 ddementieva

It seems like it worked. Thank you.

mariosotil avatar Sep 09 '16 03:09 mariosotil

"1. Build Che." Sorry, but for what we need build Che. We will it later how you make "rebuild Che"

friendRU avatar Sep 23 '16 11:09 friendRU

@friendRU Hi. You need to read this ==> https://eclipse-che.readme.io

If you read "SETUP" and "SETUP - ALTERNATIVES", you will be able to do it.

mariosotil avatar Sep 23 '16 11:09 mariosotil

Why do we need first to build che before we add the dependencies?

aleksei-burlakov avatar Dec 09 '16 11:12 aleksei-burlakov