Merge pull request #607 from eclipse/cd_cd_issue605WithTests

[#605][J9][Wizard] Surefire UI Tests dont run
This commit is contained in:
Christian Dietrich 2018-01-11 12:23:59 +01:00 committed by GitHub
commit 94e99370a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 994 additions and 3 deletions

View file

@ -29,6 +29,7 @@ import org.junit.rules.TemporaryFolder
import static org.junit.Assert.*
import org.eclipse.xtext.xtext.wizard.LanguageServer
import org.eclipse.xtext.util.JavaVersion
class CliWizardIntegrationTest {
@ -70,6 +71,19 @@ class CliWizardIntegrationTest {
webProject.enabled = true
lineDelimiter = "\n"
],
newProjectConfig => [
baseName = "org.xtext.example.mavenTychoJ9"
preferredBuildSystem = BuildSystem.MAVEN
sourceLayout = SourceLayout.PLAIN
projectLayout = ProjectLayout.HIERARCHICAL
runtimeProject.testProject.enabled = true
uiProject.enabled = true
uiProject.testProject.enabled = true
ideProject.enabled = true
webProject.enabled = true
lineDelimiter = "\n"
javaVersion = JavaVersion.JAVA9
],
newProjectConfig => [
baseName = "org.xtext.example.gradle"
preferredBuildSystem = BuildSystem.GRADLE

View file

@ -0,0 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.example.mavenTychoJ9.ide
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.example.mavenTychoJ9.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.xtext.example.mavenTychoJ9,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide
Bundle-RequiredExecutionEnvironment: JavaSE-9
Automatic-Module-Name: org.xtext.example.mavenTychoJ9.ide

View file

@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend

View file

@ -0,0 +1,21 @@
<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>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mavenTychoJ9.ide</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="org.xtext.example.mavenTychoJ9.target" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.xpand" version="0.0.0"/>
<unit id="org.eclipse.xtend" version="0.0.0"/>
<unit id="org.eclipse.xtend.typesystem.emf" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/oxygen/201712201001"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/"/>
</location>
</locations>
</target>

View file

@ -0,0 +1,15 @@
<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>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mavenTychoJ9.target</artifactId>
<packaging>eclipse-target-definition</packaging>
<dependencies>
</dependencies>
</project>

View file

@ -0,0 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.example.mavenTychoJ9.tests
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.example.mavenTychoJ9.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.xtext.example.mavenTychoJ9,
org.junit;bundle-version="4.12.0",
org.eclipse.xtext.testing,
org.eclipse.xtext.xbase.testing
Bundle-RequiredExecutionEnvironment: JavaSE-9
Automatic-Module-Name: org.xtext.example.mavenTychoJ9.tests

View file

@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend

View file

@ -0,0 +1,29 @@
<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>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mavenTychoJ9.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.example.mavenTychoJ9.ui.tests
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.example.mavenTychoJ9.ui.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.xtext.example.mavenTychoJ9.ui,
org.junit;bundle-version="4.12.0",
org.eclipse.xtext.testing,
org.eclipse.xtext.xbase.testing,
org.eclipse.xtext.junit4,
org.eclipse.xtext.xbase.junit
Bundle-RequiredExecutionEnvironment: JavaSE-9
Automatic-Module-Name: org.xtext.example.mavenTychoJ9.ui.tests

View file

@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend

View file

@ -0,0 +1,65 @@
<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>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mavenTychoJ9.ui.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
<tycho.testArgLine>--add-modules=ALL-SYSTEM</tycho.testArgLine>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<failIfNoTests>false</failIfNoTests>
<useUIHarness>true</useUIHarness>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<dependency-resolution>
<extraRequirements>
<!-- to get the org.eclipse.osgi.compatibility.state plugin
if the target platform is Luna or later.
(backward compatible with kepler and previous versions)
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=492149 -->
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.rcp</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>testing-on-mac</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<tycho.testArgLine>-XstartOnFirstThread --add-modules=ALL-SYSTEM</tycho.testArgLine>
</properties>
</profile>
</profiles>
</project>

View file

@ -0,0 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.example.mavenTychoJ9.ui
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.example.mavenTychoJ9.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.xtext.example.mavenTychoJ9,
org.xtext.example.mavenTychoJ9.ide,
org.eclipse.xtext.ui,
org.eclipse.xtext.ui.shared,
org.eclipse.xtext.ui.codetemplates.ui,
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-9
Automatic-Module-Name: org.xtext.example.mavenTychoJ9.ui

View file

@ -0,0 +1,7 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/,\
plugin.xml
bin.excludes = **/*.xtend

View file

@ -0,0 +1,21 @@
<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>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mavenTychoJ9.ui</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,129 @@
<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>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mavenTychoJ9.web</artifactId>
<packaging>war</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.xtend</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<warSourceDirectory>WebRoot</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.13.v20150730</version>
<configuration>
<webAppSourceDirectory>WebRoot</webAppSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
<goal>add-resource</goal>
</goals>
<configuration>
<sources>
<source>src-gen</source>
</sources>
<resources>
<resource>
<directory>src-gen</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.xtext.example.mavenTychoJ9</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.ide</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.xbase.web</artifactId>
<version>${xtextVersion}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.web.servlet</artifactId>
<version>${xtextVersion}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtend</groupId>
<artifactId>org.eclipse.xtend.lib</artifactId>
<version>${xtextVersion}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>requirejs</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>ace</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-annotations</artifactId>
<version>9.3.8.v20160314</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.21</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.xtext.example.mavenTychoJ9"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.parent&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.ide&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.ui&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.web&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.target&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.tests&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.ui.tests&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.tests&quot; type=&quot;4&quot;/&gt;&#10;&lt;item path=&quot;/org.xtext.example.mavenTychoJ9.ui.tests&quot; type=&quot;4&quot;/&gt;&#10;;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="org.xtext.example.mydsl.GenerateMyDsl"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.xtext.example.mavenTychoJ9"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/>
</launchConfiguration>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="true"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bad_container_name" value="/org.xtext.example.mavenTychoJ9/.launch/"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="false"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Launch Runtime Eclipse"/>
<booleanAttribute key="default" value="true"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseXtext"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="true"/>
<booleanAttribute key="usefeatures" value="false"/>
</launchConfiguration>

View file

@ -0,0 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.example.mavenTychoJ9
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.example.mavenTychoJ9; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext,
org.eclipse.xtext.xbase,
org.eclipse.equinox.common;bundle-version="3.5.0"
Bundle-RequiredExecutionEnvironment: JavaSE-9
Automatic-Module-Name: org.xtext.example.mavenTychoJ9

View file

@ -0,0 +1,19 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/,\
plugin.xml
bin.excludes = **/*.mwe2,\
**/*.xtend
additional.bundles = org.eclipse.xtext.xbase,\
org.eclipse.xtext.common.types,\
org.eclipse.xtext.xtext.generator,\
org.eclipse.emf.codegen.ecore,\
org.eclipse.emf.mwe.utils,\
org.eclipse.emf.mwe2.launch,\
org.eclipse.emf.mwe2.lib,\
org.objectweb.asm,\
org.apache.commons.logging,\
org.apache.log4j,\
com.ibm.icu

View file

@ -0,0 +1,155 @@
<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>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mavenTychoJ9</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>mwe2Launcher</id>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher</mainClass>
<arguments>
<argument>/${project.basedir}/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2</argument>
<argument>-p</argument>
<argument>rootPath=/${project.basedir}/..</argument>
</arguments>
<classpathScope>compile</classpathScope>
<includePluginDependencies>true</includePluginDependencies>
<cleanupDaemonThreads>false</cleanupDaemonThreads><!-- see https://bugs.eclipse.org/bugs/show_bug.cgi?id=475098#c3 -->
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.mwe2.launch</artifactId>
<version>2.9.1.201705291010</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.common.types</artifactId>
<version>${xtextVersion}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.xtext.generator</artifactId>
<version>${xtextVersion}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.xbase</artifactId>
<version>${xtextVersion}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>xtext-antlr-generator</artifactId>
<version>[2.1.1, 3)</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets combine.children="append">
<fileset>
<directory>${basedir}/../org.xtext.example.mavenTychoJ9/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.xtext.example.mavenTychoJ9.tests/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.xtext.example.mavenTychoJ9.ide/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.xtext.example.mavenTychoJ9.ui/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.xtext.example.mavenTychoJ9.ui.tests/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/../org.xtext.example.mavenTychoJ9.web/src-gen/</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/model/generated/</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
exec-maven-plugin
</artifactId>
<versionRange>
[1.2.1,)
</versionRange>
<goals>
<goal>java</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View file

@ -0,0 +1,47 @@
module org.xtext.example.mydsl.GenerateMyDsl
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
component = XtextGenerator {
configuration = {
project = StandardProjectConfig {
baseName = "org.xtext.example.mavenTychoJ9"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
web = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
}
}
language = StandardLanguage {
name = "org.xtext.example.mydsl.MyDsl"
fileExtensions = "mydsl"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
}
}
}
}

View file

@ -0,0 +1,9 @@
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
greetings+=Greeting*;
Greeting:
'Hello' name=ID '!';

View file

@ -0,0 +1,244 @@
<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.xtext.example.mavenTychoJ9</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>org.xtext.example.mavenTychoJ9.parent</artifactId>
<packaging>pom</packaging>
<properties>
<tycho-version>1.0.0</tycho-version>
<xtextVersion>unspecified</xtextVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>9</maven.compiler.source>
<maven.compiler.target>9</maven.compiler.target>
</properties>
<modules>
<module>org.xtext.example.mavenTychoJ9</module>
<module>org.xtext.example.mavenTychoJ9.ide</module>
<module>org.xtext.example.mavenTychoJ9.ui</module>
<module>org.xtext.example.mavenTychoJ9.web</module>
<module>org.xtext.example.mavenTychoJ9.target</module>
<module>org.xtext.example.mavenTychoJ9.tests</module>
<module>org.xtext.example.mavenTychoJ9.ui.tests</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<target>
<artifact>
<groupId>org.xtext.example.mavenTychoJ9</groupId>
<artifactId>org.xtext.example.mavenTychoJ9.target</artifactId>
<version>${project.version}</version>
</artifact>
</target>
<environments>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>${xtextVersion}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>xtend-install-debug-info</goal>
<goal>testCompile</goal>
<goal>xtend-test-install-debug-info</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${basedir}/xtend-gen</outputDirectory>
<testOutputDirectory>${basedir}/xtend-gen</testOutputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/xtend-gen</directory>
<includes>
<include>**/*</include>
</includes>
<directory>${basedir}/xtend-gen</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<versionRange>
[2.4.3,)
</versionRange>
<goals>
<goal>resources</goal>
<goal>testResources</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
build-helper-maven-plugin
</artifactId>
<versionRange>
[1.9.1,)
</versionRange>
<goals>
<goal>add-resource</goal>
<goal>add-source</goal>
<goal>add-test-resource</goal>
<goal>add-test-source</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.eclipse.tycho
</groupId>
<artifactId>
tycho-compiler-plugin
</artifactId>
<versionRange>
[0.23.1,)
</versionRange>
<goals>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.eclipse.tycho
</groupId>
<artifactId>
tycho-packaging-plugin
</artifactId>
<versionRange>
[0.23.1,)
</versionRange>
<goals>
<goal>build-qualifier</goal>
<goal>build-qualifier-aggregator</goal>
<goal>validate-id</goal>
<goal>validate-version</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<!--
Can be removed after first generator execution
https://bugs.eclipse.org/bugs/show_bug.cgi?id=480097
-->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<compilerArgument>-err:-forbidden</compilerArgument>
<useProjectSettings>false</useProjectSettings>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<repositories>
<repository>
<id>codehaus-snapshots</id>
<name>disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>
<url>http://nexus.codehaus.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>codehaus-snapshots</id>
<name>disable dead 'Codehaus Snapshots' repository, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=481478</name>
<url>http://nexus.codehaus.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
</dependencies>
</project>

View file

@ -22,6 +22,7 @@ import org.eclipse.xtend.lib.annotations.Data;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.tests.LineDelimiters;
import org.eclipse.xtext.util.Files;
import org.eclipse.xtext.util.JavaVersion;
import org.eclipse.xtext.util.XtextVersion;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Conversions;
@ -173,6 +174,24 @@ public class CliWizardIntegrationTest {
WebProjectDescriptor _webProject = it.getWebProject();
_webProject.setEnabled(true);
it.setLineDelimiter("\n");
})), ObjectExtensions.<WizardConfiguration>operator_doubleArrow(
CliWizardIntegrationTest.newProjectConfig(), ((Procedure1<WizardConfiguration>) (WizardConfiguration it) -> {
it.setBaseName("org.xtext.example.mavenTychoJ9");
it.setPreferredBuildSystem(BuildSystem.MAVEN);
it.setSourceLayout(SourceLayout.PLAIN);
it.setProjectLayout(ProjectLayout.HIERARCHICAL);
TestProjectDescriptor _testProject = it.getRuntimeProject().getTestProject();
_testProject.setEnabled(true);
UiProjectDescriptor _uiProject = it.getUiProject();
_uiProject.setEnabled(true);
TestProjectDescriptor _testProject_1 = it.getUiProject().getTestProject();
_testProject_1.setEnabled(true);
IdeProjectDescriptor _ideProject = it.getIdeProject();
_ideProject.setEnabled(true);
WebProjectDescriptor _webProject = it.getWebProject();
_webProject.setEnabled(true);
it.setLineDelimiter("\n");
it.setJavaVersion(JavaVersion.JAVA9);
})), ObjectExtensions.<WizardConfiguration>operator_doubleArrow(
CliWizardIntegrationTest.newProjectConfig(), ((Procedure1<WizardConfiguration>) (WizardConfiguration it) -> {
it.setBaseName("org.xtext.example.gradle");

View file

@ -13,6 +13,7 @@ import java.util.List
import java.util.Set
import org.eclipse.xtend.lib.annotations.Accessors
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
import org.eclipse.xtext.util.JavaVersion
@FinalFieldsConstructor
@Accessors
@ -152,6 +153,10 @@ abstract class ProjectDescriptor {
null
}
protected def isAtLeastJava9() {
config.javaVersion.isAtLeast(JavaVersion.JAVA9)
}
def GradleBuildFile buildGradle() {
new GradleBuildFile(this)
}

View file

@ -59,6 +59,11 @@ abstract class TestProjectDescriptor extends ProjectDescriptor {
super.pom => [
packaging = if(isEclipsePluginProject) "eclipse-test-plugin" else "jar"
buildSection = '''
«IF isEclipsePluginProject && needsUiHarness && isAtLeastJava9»
<properties>
<tycho.testArgLine>--add-modules=ALL-SYSTEM</tycho.testArgLine>
</properties>
«ENDIF»
<build>
«IF !isEclipsePluginProject && config.sourceLayout == SourceLayout.PLAIN»
<testSourceDirectory>«Outlet.TEST_JAVA.sourceFolder»</testSourceDirectory>
@ -155,7 +160,7 @@ abstract class TestProjectDescriptor extends ProjectDescriptor {
</os>
</activation>
<properties>
<tycho.testArgLine>-XstartOnFirstThread</tycho.testArgLine>
<tycho.testArgLine>-XstartOnFirstThread«IF isAtLeastJava9» --add-modules=ALL-SYSTEM«ENDIF»</tycho.testArgLine>
</properties>
</profile>
</profiles>

View file

@ -18,6 +18,7 @@ import java.util.Set;
import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.util.JavaVersion;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
@ -292,6 +293,10 @@ public abstract class ProjectDescriptor {
return null;
}
protected boolean isAtLeastJava9() {
return this.config.getJavaVersion().isAtLeast(JavaVersion.JAVA9);
}
public GradleBuildFile buildGradle() {
return new GradleBuildFile(this);
}

View file

@ -109,6 +109,17 @@ public abstract class TestProjectDescriptor extends ProjectDescriptor {
}
it.setPackaging(_xifexpression);
StringConcatenation _builder = new StringConcatenation();
{
if (((this.isEclipsePluginProject() && this.needsUiHarness()) && this.isAtLeastJava9())) {
_builder.append("<properties>");
_builder.newLine();
_builder.append("\t");
_builder.append("<tycho.testArgLine>--add-modules=ALL-SYSTEM</tycho.testArgLine>");
_builder.newLine();
_builder.append("</properties>");
_builder.newLine();
}
}
_builder.append("<build>");
_builder.newLine();
{
@ -453,8 +464,15 @@ public abstract class TestProjectDescriptor extends ProjectDescriptor {
_builder_1.append("<properties>");
_builder_1.newLine();
_builder_1.append("\t\t\t");
_builder_1.append("<tycho.testArgLine>-XstartOnFirstThread</tycho.testArgLine>");
_builder_1.newLine();
_builder_1.append("<tycho.testArgLine>-XstartOnFirstThread");
{
boolean _isAtLeastJava9 = this.isAtLeastJava9();
if (_isAtLeastJava9) {
_builder_1.append(" --add-modules=ALL-SYSTEM");
}
}
_builder_1.append("</tycho.testArgLine>");
_builder_1.newLineIfNotEmpty();
_builder_1.append("\t\t");
_builder_1.append("</properties>");
_builder_1.newLine();