-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
38 changed files
with
2,285 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,8 @@ maven-eclipse.xml | |
*.iws | ||
.idea/ | ||
|
||
.vscode/ | ||
|
||
# Compiled source # | ||
################### | ||
!*.com/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2018-2018 Red Hat, Inc. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
Red Hat, Inc. - initial API and implementation | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>che-assembly-parent</artifactId> | ||
<groupId>org.eclipse.che</groupId> | ||
<version>6.2.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>assembly-workspace-loader-war</artifactId> | ||
<packaging>war</packaging> | ||
<name>Che Workspace Loader :: War Packaging</name> | ||
<description>Packages Che Workspace Loader application as a Java web app</description> | ||
<inceptionYear>2018</inceptionYear> | ||
<dependencies> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.workspace.loader</groupId> | ||
<artifactId>che-workspace-loader</artifactId> | ||
<type>zip</type> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<configuration> | ||
<overlays> | ||
<overlay> | ||
<groupId>org.eclipse.che.workspace.loader</groupId> | ||
<artifactId>che-workspace-loader</artifactId> | ||
<type>zip</type> | ||
</overlay> | ||
</overlays> | ||
<packagingExcludes>/webapp/</packagingExcludes> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>analyze</id> | ||
<configuration> | ||
<ignoredUnusedDeclaredDependencies> | ||
<!-- dependency is required just to overlay it's content --> | ||
<dep>org.eclipse.che.workspace.loader:che-workspace-loader</dep> | ||
</ignoredUnusedDeclaredDependencies> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
assembly/assembly-workspace-loader-war/src/main/java/org/eclipse/che/WSLoaderController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2018-2018 Red Hat, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
package org.eclipse.che; | ||
|
||
import java.io.IOException; | ||
import javax.servlet.RequestDispatcher; | ||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
/** | ||
* Defines a controller that is serving the index.html page of a workspace loader. | ||
* | ||
* @author Florent Benoit | ||
*/ | ||
public class WSLoaderController extends HttpServlet { | ||
|
||
/** Use the default dispatcher to serve the resource. */ | ||
@Override | ||
protected void doGet(HttpServletRequest request, HttpServletResponse response) | ||
throws ServletException, IOException { | ||
|
||
RequestDispatcher dispatcher = request.getRequestDispatcher("/loader/index.html"); | ||
dispatcher.forward(request, response); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
assembly/assembly-workspace-loader-war/src/main/webapp/WEB-INF/web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2018-2018 Red Hat, Inc. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
Red Hat, Inc. - initial API and implementation | ||
--> | ||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | ||
version="3.0" | ||
metadata-complete="true"> | ||
<absolute-ordering></absolute-ordering> | ||
|
||
<servlet> | ||
<servlet-name>WSLoader</servlet-name> | ||
<servlet-class>org.eclipse.che.WSLoaderController</servlet-class> | ||
</servlet> | ||
|
||
<servlet-mapping> | ||
<servlet-name>WSLoader</servlet-name> | ||
<url-pattern>/*</url-pattern> | ||
</servlet-mapping> | ||
|
||
<servlet-mapping> | ||
<servlet-name>default</servlet-name> | ||
<url-pattern>/loader/*</url-pattern> | ||
</servlet-mapping> | ||
|
||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Dockerfile | ||
node_modules | ||
target | ||
dist | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) 2018-2018 Red Hat, Inc | ||
# All rights reserved. This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License v1.0 | ||
# which accompanies this distribution, and is available at | ||
# http://www.eclipse.org/legal/epl-v10.html | ||
|
||
# This is a Dockerfile allowing to build workspace loader by using a docker container. | ||
# Build step: $ docker build -t eclipse-che-workspace-loader . | ||
# It builds an archive file that can be used by doing later | ||
# $ docker run --rm eclipse-che-workspace-loader | tar -C target/ -zxf - | ||
FROM node:6.11.2 | ||
|
||
COPY package.json /workspace-loader/ | ||
RUN cd /workspace-loader && npm install | ||
|
||
COPY . /workspace-loader/ | ||
|
||
RUN cd /workspace-loader && \ | ||
npm run build && \ | ||
npm run test && \ | ||
cd target && \ | ||
tar zcf /tmp/workspace-loader.tar.gz dist | ||
|
||
CMD zcat /tmp/workspace-loader.tar.gz |
Oops, something went wrong.