Made it possible to extend Che IDE GWT app in custom assemblies by including additional plugins and/or excluding existing (standard) ones (#7746)
Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>6.19.x
parent
d11f38e9b4
commit
4ca92c9bc4
|
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2012-2017 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-core-parent</artifactId>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<version>6.0.0-M3-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>che-core-gwt-maven-plugin</artifactId>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Che Core :: IDE :: GWT Maven Plugin</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-artifact</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>jsr250-api</artifactId>
|
||||
<groupId>javax.annotation</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||
<artifactId>maven-plugin-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-model</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-testing</groupId>
|
||||
<artifactId>maven-plugin-testing-harness</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-help-ext-client</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<currentVersion>${project.version}</currentVersion>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>mojo-descriptor</id>
|
||||
<goals>
|
||||
<goal>descriptor</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>help-goal</id>
|
||||
<goals>
|
||||
<goal>helpmojo</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>net.ltgt.gwt.maven</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies-for-tests</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<destFileName>che-ide-full-${project.version}.jar</destFileName>
|
||||
<outputDirectory>${project.build.directory}/local-repo/org/eclipse/che/core/che-ide-full/${project.version}</outputDirectory>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-help-ext-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<destFileName>che-plugin-help-ext-client-${project.version}.jar</destFileName>
|
||||
<outputDirectory>${project.build.directory}/local-repo/org/eclipse/che/plugin/che-plugin-help-ext-client/${project.version}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,277 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 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.plugin.gwt;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.eclipse.che.plugin.gwt.Utils.getFileContent;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.zip.ZipFile;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
|
||||
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
|
||||
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
||||
import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugins.annotations.Component;
|
||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.repository.RepositorySystem;
|
||||
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
|
||||
import org.codehaus.plexus.util.xml.XMLWriter;
|
||||
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
|
||||
import org.codehaus.plexus.util.xml.Xpp3DomWriter;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
|
||||
/**
|
||||
* Detects if Full IDE dependency with excluded plugins declared in pom.xml and modifies the IDE GWT
|
||||
* module to avoid inheriting modules of the excluded plugins.
|
||||
*/
|
||||
@Mojo(
|
||||
name = "process-excludes",
|
||||
defaultPhase = LifecyclePhase.PROCESS_RESOURCES,
|
||||
requiresDependencyResolution = ResolutionScope.COMPILE
|
||||
)
|
||||
public class ProcessExcludesMojo extends AbstractMojo {
|
||||
|
||||
public static final String FULL_IDE_ARTIFACT_ID = "che-ide-full";
|
||||
public static final String FULL_IDE_GWT_MODULE_SUFFIX = "-with-excludes";
|
||||
|
||||
@Component private RepositorySystem repositorySystem;
|
||||
|
||||
/** The local repository to use for the artifacts resolution. */
|
||||
@Parameter(defaultValue = "${localRepository}", required = true, readonly = true)
|
||||
private ArtifactRepository localRepository;
|
||||
|
||||
/** The remote repositories to use for the artifacts resolution. */
|
||||
@Parameter(
|
||||
defaultValue = "${project.remoteArtifactRepositories}",
|
||||
required = true,
|
||||
readonly = true
|
||||
)
|
||||
private List<ArtifactRepository> remoteRepositories;
|
||||
|
||||
@Parameter(defaultValue = "${project.build.outputDirectory}", required = true)
|
||||
private File outputDirectory;
|
||||
|
||||
@Parameter(defaultValue = "${project}", required = true, readonly = true)
|
||||
private MavenProject project;
|
||||
|
||||
/** Full IDE maven artifact. */
|
||||
private Artifact fullIdeArtifact;
|
||||
|
||||
/** Name of the Full IDE GWT module. */
|
||||
private String fullIdeGwtModule;
|
||||
|
||||
@Override
|
||||
public void execute() throws MojoExecutionException {
|
||||
if (!init()) {
|
||||
getLog().debug(format("No dependency on '%s'. Skipping the execution", FULL_IDE_ARTIFACT_ID));
|
||||
return;
|
||||
}
|
||||
|
||||
getLog().debug("Detected dependency on " + fullIdeArtifact.getArtifactId());
|
||||
|
||||
try {
|
||||
Set<String> excludedModules = detectExcludedGwtModules();
|
||||
|
||||
if (excludedModules.isEmpty()) {
|
||||
getLog().debug("No excluded GWT modules detected. Skipping the execution");
|
||||
return;
|
||||
}
|
||||
|
||||
createFullIdeModuleWithExcludes(excludedModules);
|
||||
patchGwtModule();
|
||||
} catch (XmlPullParserException | IOException e) {
|
||||
throw new MojoExecutionException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes mojo with the essential information about Full IDE dependency.
|
||||
*
|
||||
* @return {@code true} if there is a dependency on Full IDE in pom.xml; otherwise - {@code false}
|
||||
* @throws IllegalStateException if error occurs during getting Full IDE dependency information
|
||||
*/
|
||||
private boolean init() {
|
||||
Optional<Artifact> fullIdeArtifactOpt =
|
||||
project
|
||||
.getDependencyArtifacts()
|
||||
.stream()
|
||||
.filter(artifact -> FULL_IDE_ARTIFACT_ID.equals(artifact.getArtifactId()))
|
||||
.findAny();
|
||||
|
||||
if (!fullIdeArtifactOpt.isPresent()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
fullIdeArtifact = fullIdeArtifactOpt.get();
|
||||
|
||||
try {
|
||||
fullIdeGwtModule = readGwtModuleName(fullIdeArtifact);
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects the GWT modules that should be excluded from the IDE GWT app.
|
||||
*
|
||||
* @return detected GWT modules
|
||||
*/
|
||||
private Set<String> detectExcludedGwtModules() throws IOException {
|
||||
Set<String> modules = new HashSet<>();
|
||||
|
||||
ArtifactFilter dependencyFilter = fullIdeArtifact.getDependencyFilter();
|
||||
|
||||
if (dependencyFilter instanceof ExcludesArtifactFilter) {
|
||||
ExcludesArtifactFilter excludesDependencyFilter = (ExcludesArtifactFilter) dependencyFilter;
|
||||
|
||||
for (String pattern : excludesDependencyFilter.getPatterns()) {
|
||||
String[] split = pattern.split(":");
|
||||
String groupId = split[0];
|
||||
String artifactId = split[1];
|
||||
String version = fullIdeArtifact.getVersion();
|
||||
|
||||
Artifact artifact = repositorySystem.createArtifact(groupId, artifactId, version, "jar");
|
||||
String gwtModule = readGwtModuleName(artifact);
|
||||
|
||||
modules.add(gwtModule);
|
||||
|
||||
getLog().info("Detected GWT module to exclude: " + gwtModule);
|
||||
}
|
||||
}
|
||||
|
||||
return modules;
|
||||
}
|
||||
|
||||
/** Creates copy of the Full.gwt.xml with removed '<inherits>' for the excluded GWT modules. */
|
||||
private void createFullIdeModuleWithExcludes(Set<String> modulesToExclude)
|
||||
throws XmlPullParserException, IOException {
|
||||
String fullIdeGwtModulePath = fullIdeGwtModule.replace('.', '/') + ".gwt.xml";
|
||||
String fullIdeGwtModuleContent =
|
||||
getFileContent(new ZipFile(fullIdeArtifact.getFile()), fullIdeGwtModulePath);
|
||||
|
||||
InputStream in = new ByteArrayInputStream(fullIdeGwtModuleContent.getBytes(UTF_8.name()));
|
||||
Xpp3Dom module = Xpp3DomBuilder.build(in, UTF_8.name());
|
||||
|
||||
for (int i = module.getChildCount() - 1; i >= 0; i--) {
|
||||
Xpp3Dom child = module.getChild(i);
|
||||
|
||||
if ("inherits".equals(child.getName())) {
|
||||
String moduleName = child.getAttribute("name");
|
||||
|
||||
if (modulesToExclude.contains(moduleName)) {
|
||||
module.removeChild(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String moduleRelPath =
|
||||
fullIdeGwtModulePath.replace(".gwt.xml", FULL_IDE_GWT_MODULE_SUFFIX + ".gwt.xml");
|
||||
|
||||
Path modulePath = Paths.get(outputDirectory.getPath(), moduleRelPath);
|
||||
|
||||
try (Writer writer = new StringWriter()) {
|
||||
XMLWriter xmlWriter = new PrettyPrintXMLWriter(writer);
|
||||
Xpp3DomWriter.write(xmlWriter, module);
|
||||
Files.write(modulePath, writer.toString().getBytes());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Patches the IDE GWT module by replacing inheritance of Full.gwt.xml by
|
||||
* Full-with-excludes.gwt.xml.
|
||||
*/
|
||||
private void patchGwtModule() throws XmlPullParserException, IOException {
|
||||
String gwtModuleFileRelPath = getGwtModule().replace('.', '/') + ".gwt.xml";
|
||||
Path gwtModuleFilePath = Paths.get(outputDirectory.getPath(), gwtModuleFileRelPath);
|
||||
|
||||
Xpp3Dom module = Xpp3DomBuilder.build(Files.newInputStream(gwtModuleFilePath), UTF_8.name());
|
||||
|
||||
for (int i = module.getChildCount() - 1; i >= 0; i--) {
|
||||
Xpp3Dom child = module.getChild(i);
|
||||
|
||||
if ("inherits".equals(child.getName())) {
|
||||
String moduleName = child.getAttribute("name");
|
||||
|
||||
if (moduleName.equals(fullIdeGwtModule)) {
|
||||
child.setAttribute("name", fullIdeGwtModule + FULL_IDE_GWT_MODULE_SUFFIX);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try (Writer writer = new StringWriter()) {
|
||||
XMLWriter xmlWriter = new PrettyPrintXMLWriter(writer);
|
||||
Xpp3DomWriter.write(xmlWriter, module);
|
||||
Files.write(gwtModuleFilePath, writer.toString().getBytes());
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns GWT module name specified in the configuration of the gwt-maven-plugin. */
|
||||
private String getGwtModule() {
|
||||
Xpp3Dom configuration =
|
||||
project.getGoalConfiguration("net.ltgt.gwt.maven", "gwt-maven-plugin", null, null);
|
||||
|
||||
return configuration.getChild("moduleName").getValue();
|
||||
}
|
||||
|
||||
/** Reads name of GWT module from the given artifact. */
|
||||
private String readGwtModuleName(Artifact artifact) throws IOException {
|
||||
if (artifact.getFile() == null) {
|
||||
resolveArtifact(artifact);
|
||||
}
|
||||
|
||||
return getFileContent(new ZipFile(artifact.getFile()), "META-INF/gwt/mainModule");
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the given artifact from a repository.
|
||||
*
|
||||
* @param artifact artifact to resolve
|
||||
* @throws IllegalStateException if unable to resolve artifact
|
||||
*/
|
||||
private void resolveArtifact(Artifact artifact) {
|
||||
ArtifactResolutionRequest resolutionRequest =
|
||||
new ArtifactResolutionRequest()
|
||||
.setLocalRepository(localRepository)
|
||||
.setRemoteRepositories(remoteRepositories)
|
||||
.setArtifact(artifact);
|
||||
|
||||
ArtifactResolutionResult resolutionResult = repositorySystem.resolve(resolutionRequest);
|
||||
|
||||
if (!resolutionResult.isSuccess()) {
|
||||
throw new IllegalStateException("Unable to resolve artifact " + artifact.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 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.plugin.gwt;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Enumeration;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
|
||||
public class Utils {
|
||||
|
||||
private Utils() {}
|
||||
|
||||
/**
|
||||
* Reads content of the file from ZIP archive.
|
||||
*
|
||||
* @param zipFile ZIP file
|
||||
* @param path path of the file to read content
|
||||
* @return content of the file with the given path
|
||||
* @throws IOException if error occurs while reading
|
||||
* @throws IllegalArgumentException if file not found in ZIP archive
|
||||
*/
|
||||
public static String getFileContent(ZipFile zipFile, String path) throws IOException {
|
||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||
|
||||
while (entries.hasMoreElements()) {
|
||||
ZipEntry entry = entries.nextElement();
|
||||
|
||||
if (path.equals(entry.getName())) {
|
||||
try (InputStream in = zipFile.getInputStream(entry)) {
|
||||
byte[] bytes = IOUtils.toByteArray(in);
|
||||
|
||||
return new String(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException(
|
||||
format("Cannot find file '%s' in '%s'", path, zipFile.getName()));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 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.plugin.gwt;
|
||||
|
||||
import static org.eclipse.che.plugin.gwt.ProcessExcludesMojo.FULL_IDE_GWT_MODULE_SUFFIX;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import org.apache.maven.plugin.testing.MojoRule;
|
||||
import org.apache.maven.plugin.testing.resources.TestResources;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ProcessExcludesMojoTest {
|
||||
|
||||
/** Rule to manage the mojo (set/get values of variables of mojo). */
|
||||
@Rule public MojoRule rule = new MojoRule();
|
||||
|
||||
/** Resources of each test mapped on the name of the method. */
|
||||
@Rule public TestResources resources = new TestResources();
|
||||
|
||||
/**
|
||||
* Injects data in mojo.
|
||||
*
|
||||
* @param mojo the mojo
|
||||
* @param baseDir root dir on which we extract files
|
||||
* @throws IllegalAccessException if unable to set variables
|
||||
*/
|
||||
private void configureMojo(ProcessExcludesMojo mojo, File baseDir) throws Exception {
|
||||
rule.setVariableValueToObject(mojo, "outputDirectory", new File(baseDir, "classes"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the ability of the plugin to process IDE GWT module (IDE.gwt.xml) to prevent inheriting
|
||||
* the GWT modules of the excluded IDE plugins.
|
||||
*/
|
||||
@Test
|
||||
public void testProcessingExcludes() throws Exception {
|
||||
File projectCopy = resources.getBasedir("project");
|
||||
File pom = new File(projectCopy, "pom.xml");
|
||||
assertTrue(pom.exists());
|
||||
|
||||
ProcessExcludesMojo mojo = (ProcessExcludesMojo) rule.lookupMojo("process-excludes", pom);
|
||||
assertNotNull(mojo);
|
||||
|
||||
configureMojo(mojo, projectCopy);
|
||||
mojo.execute();
|
||||
|
||||
File fullGwtXml =
|
||||
new File(
|
||||
projectCopy,
|
||||
"classes/org/eclipse/che/ide/Full" + FULL_IDE_GWT_MODULE_SUFFIX + ".gwt.xml");
|
||||
assertTrue(fullGwtXml.exists());
|
||||
|
||||
String fullGwtXmlContent = FileUtils.fileRead(fullGwtXml);
|
||||
assertFalse(fullGwtXmlContent.contains("org.eclipse.che.ide.ext.help.HelpAboutExtension"));
|
||||
|
||||
File ideGwtXml = new File(projectCopy, "classes/org/eclipse/che/ide/IDE.gwt.xml");
|
||||
assertTrue(ideGwtXml.exists());
|
||||
|
||||
String ideGwtXmlContent = FileUtils.fileRead(ideGwtXml);
|
||||
assertFalse(ideGwtXmlContent.contains("<inherits name=\"org.eclipse.che.ide.Full\"/>"));
|
||||
assertTrue(
|
||||
ideGwtXmlContent.contains(
|
||||
"<inherits name=\"org.eclipse.che.ide.Full" + FULL_IDE_GWT_MODULE_SUFFIX + "\"/>"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that plugins doesn't modify the IDE GWT module (IDE.gwt.xml) if there are no excluded
|
||||
* plugins.
|
||||
*/
|
||||
@Test
|
||||
public void testWithoutExcludes() throws Exception {
|
||||
File projectCopy = resources.getBasedir("project-without-exclusions");
|
||||
File pom = new File(projectCopy, "pom.xml");
|
||||
assertTrue(pom.exists());
|
||||
|
||||
ProcessExcludesMojo mojo = (ProcessExcludesMojo) rule.lookupMojo("process-excludes", pom);
|
||||
assertNotNull(mojo);
|
||||
|
||||
configureMojo(mojo, projectCopy);
|
||||
mojo.execute();
|
||||
|
||||
File outputDirectory = (File) rule.getVariableValueFromObject(mojo, "outputDirectory");
|
||||
File expected =
|
||||
new File(
|
||||
"src/test/projects/project-without-exclusions/classes/org/eclipse/che/ide/IDE.gwt.xml");
|
||||
File actual = new File(outputDirectory, "org/eclipse/che/ide/IDE.gwt.xml");
|
||||
|
||||
assertEquals(
|
||||
"IDE.gwt.xml is changed but it shouldn't.",
|
||||
StringUtils.getNestedString(FileUtils.fileRead(expected), "<module", "</module>"),
|
||||
StringUtils.getNestedString(FileUtils.fileRead(actual), "<module", "</module>"));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 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.plugin.gwt.stub;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
|
||||
import org.apache.maven.model.Build;
|
||||
import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.Plugin;
|
||||
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
|
||||
import org.apache.maven.plugin.testing.ArtifactStubFactory;
|
||||
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
|
||||
import org.codehaus.plexus.util.ReaderFactory;
|
||||
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||
|
||||
public class ProjectStub extends MavenProjectStub {
|
||||
|
||||
public ProjectStub() {
|
||||
MavenXpp3Reader pomReader = new MavenXpp3Reader();
|
||||
Model model;
|
||||
try {
|
||||
model = pomReader.read(ReaderFactory.newXmlReader(new File(getBasedir(), "pom.xml")));
|
||||
setModel(model);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
setGroupId(model.getGroupId());
|
||||
setArtifactId(model.getArtifactId());
|
||||
setVersion(model.getVersion());
|
||||
setName(model.getName());
|
||||
setUrl(model.getUrl());
|
||||
setPackaging(model.getPackaging());
|
||||
|
||||
List<String> compileSourceRoots = new ArrayList<>();
|
||||
compileSourceRoots.add(getBasedir() + "/src/main/java");
|
||||
setCompileSourceRoots(compileSourceRoots);
|
||||
|
||||
List<String> testCompileSourceRoots = new ArrayList<>();
|
||||
testCompileSourceRoots.add(getBasedir() + "/src/test/java");
|
||||
setTestCompileSourceRoots(testCompileSourceRoots);
|
||||
|
||||
setupBuild(model);
|
||||
setupDependencyArtifacts(model);
|
||||
}
|
||||
|
||||
private void setupDependencyArtifacts(Model model) {
|
||||
Set<Artifact> artifacts = new HashSet<>();
|
||||
ArtifactStubFactory artifactStubFactory = new ArtifactStubFactory();
|
||||
|
||||
for (Dependency dependency : model.getDependencies()) {
|
||||
Artifact artifact;
|
||||
|
||||
try {
|
||||
artifact =
|
||||
artifactStubFactory.createArtifact(
|
||||
dependency.getGroupId(),
|
||||
dependency.getArtifactId(),
|
||||
System.getProperty("currentVersion"));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
List<String> patterns =
|
||||
dependency
|
||||
.getExclusions()
|
||||
.stream()
|
||||
.map(exclusion -> exclusion.getGroupId() + ":" + exclusion.getArtifactId())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
artifact.setDependencyFilter(new ExcludesArtifactFilter(patterns));
|
||||
artifacts.add(artifact);
|
||||
}
|
||||
|
||||
setDependencyArtifacts(artifacts);
|
||||
}
|
||||
|
||||
private void setupBuild(Model model) {
|
||||
Build build = new Build();
|
||||
|
||||
build.setFinalName(model.getArtifactId());
|
||||
build.setDirectory(getBasedir() + "/target");
|
||||
build.setSourceDirectory(getBasedir() + "/src/main/java");
|
||||
build.setOutputDirectory(getBasedir() + "/target/classes");
|
||||
build.setTestSourceDirectory(getBasedir() + "/src/test/java");
|
||||
build.setTestOutputDirectory(getBasedir() + "/target/test-classes");
|
||||
build.setPlugins(model.getBuild().getPlugins());
|
||||
|
||||
setBuild(build);
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getBasedir() {
|
||||
return new File(super.getBasedir() + "/src/test/projects/" + getProjectFolder());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Xpp3Dom getGoalConfiguration(
|
||||
String pluginGroupId, String pluginArtifactId, String executionId, String goalId) {
|
||||
Plugin plugin = getPlugin(pluginGroupId + ':' + pluginArtifactId);
|
||||
Object configuration = plugin.getConfiguration();
|
||||
|
||||
return (Xpp3Dom) configuration;
|
||||
}
|
||||
|
||||
protected String getProjectFolder() {
|
||||
return "project";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2017 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.plugin.gwt.stub;
|
||||
|
||||
public class ProjectWithoutExclusionsStub extends ProjectStub {
|
||||
|
||||
@Override
|
||||
protected String getProjectFolder() {
|
||||
return "project-without-exclusions";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<!--
|
||||
|
||||
Copyright (c) 2012-2017 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
|
||||
|
||||
-->
|
||||
<module rename-to="_app">
|
||||
<inherits name="org.eclipse.che.ide.Full"/>
|
||||
<stylesheet src="IDE.css"/>
|
||||
<entry-point class="org.eclipse.che.ide.client.IDE"/>
|
||||
<source path="client"/>
|
||||
<source path="shared"/>
|
||||
<super-source path="super"/>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<!--
|
||||
|
||||
Copyright (c) 2012-2017 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>
|
||||
<groupId>org.eclipse.che.test</groupId>
|
||||
<artifactId>test-module</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Test Maven project for Che GWT Maven plugin</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>net.ltgt.gwt.maven</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<moduleName>org.eclipse.che.ide.IDE</moduleName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-gwt-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<project implementation="org.eclipse.che.plugin.gwt.stub.ProjectWithoutExclusionsStub"/>
|
||||
<localRepository>${localRepository}</localRepository>
|
||||
</configuration>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<!--
|
||||
|
||||
Copyright (c) 2012-2017 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
|
||||
|
||||
-->
|
||||
<module rename-to="_app">
|
||||
<inherits name="org.eclipse.che.ide.Full"/>
|
||||
<stylesheet src="IDE.css"/>
|
||||
<entry-point class="org.eclipse.che.ide.client.IDE"/>
|
||||
<source path="client"/>
|
||||
<source path="shared"/>
|
||||
<super-source path="super"/>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<!--
|
||||
|
||||
Copyright (c) 2012-2017 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>
|
||||
<groupId>org.eclipse.che.test</groupId>
|
||||
<artifactId>test-module</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Test Maven project for Che GWT Maven plugin</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>che-plugin-help-ext-client</artifactId>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>net.ltgt.gwt.maven</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<moduleName>org.eclipse.che.ide.IDE</moduleName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-gwt-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<project implementation="org.eclipse.che.plugin.gwt.stub.ProjectStub"/>
|
||||
<localRepository>${localRepository}</localRepository>
|
||||
</configuration>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
<module>che-core-api-dto-maven-plugin</module>
|
||||
<module>che-core-typescript-dto-maven-plugin</module>
|
||||
<module>che-core-dynamodule-maven-plugin</module>
|
||||
<module>che-core-gwt-maven-plugin</module>
|
||||
<module>che-core-api-core</module>
|
||||
<module>che-core-api-model</module>
|
||||
<module>che-core-db</module>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* [Consuming the shared libraries](#consuming-the-shared-libraries)
|
||||
- [Including an IDE plugin to the IDE GWT app](#including-an-ide-plugin-to-the-ide-gwt-app)
|
||||
- [GWT Super DevMode](#gwt-super-devmode)
|
||||
- [Extending IDE GWT app](#extending-ide-gwt-app)
|
||||
|
||||
## Making a GWT library for the IDE GWT app
|
||||
GWT library it's a JAR that contains compiled classes, project's (re-)sources, GWT module descriptor (*.gwt.xml) and possibly other GWT-specific files.
|
||||
|
|
@ -67,3 +68,56 @@ There are two options available to launch GWT Super DevMode, depending on the st
|
|||
The second one requires *more time* to launch GWT CodeServer since the second one it executes `process-classes` build phase for each maven module. So using the first command is preferable.
|
||||
|
||||
**Note**, both commands have to be performed in the root folder of the Che project.
|
||||
|
||||
## Extending IDE GWT app
|
||||
There're two GWT libraries provided which allows you to easily extend IDE GWT app: Basic IDE and Full IDE.
|
||||
|
||||
Basic IDE represents IDE without any plugins. It allows you to compile IDE GWT app with your own IDE plugins only, e.g.:
|
||||
```xml
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>my.ide.plugin</groupId>
|
||||
<artifactId>my-ide-plugin</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
Full IDE represents IDE with full set of the standard plugins. It allows you to compile IDE GWT app excluding some of the standard plugins and/or including your own IDE plugins, e.g.:
|
||||
```xml
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>che-plugin-product-info</artifactId>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>my.ide.plugin</groupId>
|
||||
<artifactId>my-ide-plugin</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-gwt-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>process-excludes</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
```
|
||||
Note that `che-core-gwt-maven-plugin` have to be added in order to correctly process the IDE plugins exclusions.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,243 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2012-2017 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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>che-parent</artifactId>
|
||||
<groupId>org.eclipse.che</groupId>
|
||||
<version>6.0.0-M3-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<packaging>gwt-lib</packaging>
|
||||
<name>Che Core IDE :: Full IDE</name>
|
||||
<description>Che IDE includes all plugins</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-core</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.multiuser</groupId>
|
||||
<artifactId>che-multiuser-keycloak-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.multiuser</groupId>
|
||||
<artifactId>che-multiuser-machine-authentication-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-activity-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-composer-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-cpp-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-csharp-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-debugger-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-ext-dashboard-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-gdb-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-git-ext-git</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-github-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-github-pullrequest</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-gwt-ext-gwt</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-help-ext-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-java-debugger-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-java-ext-lang-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-java-plain-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-keybinding-eclipse-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-languageserver-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-machine-ssh-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-maven-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-nodejs-debugger-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-nodejs-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-orion-compare</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-php-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-product-info</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-pullrequest-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-python-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-sdk-ext-plugins</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-ssh-key-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-junit-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-phpunit-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-testng-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-web-ext-web</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-yaml-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-zend-debugger-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>net.ltgt.gwt.maven</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<moduleName>org.eclipse.che.ide.Full</moduleName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>analyze</id>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -25,202 +25,15 @@
|
|||
<description>Compiles Che IDE GWT application and packages it as a WAR-like archive which contains pure output of the GWT compiler</description>
|
||||
<properties>
|
||||
<generated.sources.directory>${project.build.directory}/generated-sources/gen</generated.sources.directory>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<!-- gwt-dev is required in classpath for launching GWT tools (compiler, codeserver, etc.) by gwt-maven-plugin -->
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-dev</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-core</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.multiuser</groupId>
|
||||
<artifactId>che-multiuser-keycloak-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.multiuser</groupId>
|
||||
<artifactId>che-multiuser-machine-authentication-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-activity-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-composer-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-cpp-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-csharp-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-debugger-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-ext-dashboard-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-gdb-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-git-ext-git</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-github-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-github-pullrequest</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-gwt-ext-gwt</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-help-ext-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-java-debugger-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-java-ext-lang-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-java-plain-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-keybinding-eclipse-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-languageserver-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-machine-ssh-client</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-maven-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-nodejs-debugger-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-nodejs-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-orion-compare</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-php-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-product-info</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-pullrequest-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-python-lang-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-sdk-ext-plugins</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-ssh-key-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-junit-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-phpunit-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-testing-testng-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-web-ext-web</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-yaml-ide</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-zend-debugger-ide</artifactId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
|||
22
pom.xml
22
pom.xml
|
|
@ -33,6 +33,7 @@
|
|||
<module>infrastructures</module>
|
||||
<module>plugins</module>
|
||||
<module>ide/che-ide-core</module>
|
||||
<module>ide/che-ide-full</module>
|
||||
<module>ide/che-ide-gwt-app</module>
|
||||
<module>dashboard</module>
|
||||
<module>assembly</module>
|
||||
|
|
@ -605,6 +606,11 @@
|
|||
<version>${che.version}</version>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-gwt-maven-plugin</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-core-ide-api</artifactId>
|
||||
|
|
@ -680,6 +686,17 @@
|
|||
<version>${che.version}</version>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-ide-full</artifactId>
|
||||
<version>${che.version}</version>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.core</groupId>
|
||||
<artifactId>che-wsagent-core</artifactId>
|
||||
|
|
@ -1184,6 +1201,11 @@
|
|||
<version>${che.version}</version>
|
||||
<type>gwt-lib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-help-ext-client</artifactId>
|
||||
<version>${che.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.che.plugin</groupId>
|
||||
<artifactId>che-plugin-help-ext-client</artifactId>
|
||||
|
|
|
|||
Loading…
Reference in New Issue