Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generating a project with two languages using maven
Generating a project with two languages using maven [message #1805963] Mon, 29 April 2019 12:16 Go to next message
Werner Müller is currently offline Werner MüllerFriend
Messages: 4
Registered: April 2019
Junior Member
Hi,

I am having issues to build my project containing two languages with maven.

As a simple reproducer I created the 'MyDsl' example project leaving all parameters at their default except using Maven as preferred build system. I then created a second language MyDsl2.xtext in the same package as MyDsl.xtext. MyDsl2 depends on MyDsl:

grammar org.xtext.example.mydsl.MyDsl2 with org.xtext.example.mydsl.MyDsl

generate myDsl2 "http : / / www.xtext.org/example/mydsl/MyDsl2"

Model2:
	model2 = Model;

(The URI in "generate" actually does not contain spaces. This is only because "as a new user I am not allowed to include links".)


I adapted the GenerateMyDsl.mwe2 to build MyDsl2 as well:

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.mydsl"
				rootPath = rootPath
				runtimeTest = {
					enabled = true
				}
				eclipsePlugin = {
					enabled = true
				}
				eclipsePluginTest = {
					enabled = true
				}
				createEclipseMetaData = true
			}
			code = {
				encoding = "UTF-8"
				lineDelimiter = "\r\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"
				// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
				generateDeprecationValidation = true
			}
			junitSupport = {
				junitVersion = "5"
			}
		}
		language = StandardLanguage {
			name = "org.xtext.example.mydsl.MyDsl2"
			fileExtensions = "mydsl2"
			// referencedResource = "platform:/resource/org.xtext.example.mydsl/model/generated/MyDsl.genmodel"

			serializer = {
				generateStub = false
			}
			validator = {
				// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
				// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
				generateDeprecationValidation = true
			}
			junitSupport = {
				junitVersion = "5"
			}
		}
	}
}


Running
mvn clean install
gives the following message:

1233 ERROR XtextGeneratorLanguage - [XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'., XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule]
1233 ERROR Mwe2Launcher       - Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: Problem parsing 'file:/C:/dev/eclipseworkspaces/CislMapXtext/org.xtext.example.mydsl.parent/org.xtext.example.mydsl/../org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext':
XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'.
XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule
java.lang.RuntimeException: Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: Problem parsing 'file:/C:/dev/eclipseworkspaces/CislMapXtext/org.xtext.example.mydsl.parent/org.xtext.example.mydsl/../org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext':
XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'.
XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:104)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Problem parsing 'file:/C:/dev/eclipseworkspaces/CislMapXtext/org.xtext.example.mydsl.parent/org.xtext.example.mydsl/../org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext':
XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'.
XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule
        at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:278)
        at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:189)
        at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:185)
        at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:139)
        at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:21)
        at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:65)
        at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
        at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:29)
        at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
        ... 10 more


When I uncomment the "referencedResource" for MyDsl2 in GenerateMyDsl.mwe2 the following error is output:

1047 ERROR Mwe2Launcher       - Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: java.io.FileNotFoundException: C:\dev\eclipseworkspaces\CislMapXtext\org.xtext.example.mydsl.parent\org.xtext.example.mydsl\model\generated\MyDsl.genmodel (Das System kann den angegebenen Pfad nicht finden)
java.lang.RuntimeException: Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: java.io.FileNotFoundException: C:\dev\eclipseworkspaces\CislMapXtext\org.xtext.example.mydsl.parent\org.xtext.example.mydsl\model\generated\MyDsl.genmodel (Das System kann den angegebenen Pfad nicht finden)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:104)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.FileNotFoundException: C:\dev\eclipseworkspaces\CislMapXtext\org.xtext.example.mydsl.parent\org.xtext.example.mydsl\model\generated\MyDsl.genmodel (Das System kann den angegebenen Pfad nicht finden)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
        at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.loadResource(XtextGeneratorResourceSetInitializer.java:51)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.lambda$initialize$0(XtextGeneratorResourceSetInitializer.java:41)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorResourceSetInitializer.initialize(XtextGeneratorResourceSetInitializer.java:43)
        at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:218)
        at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:189)
        at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:185)
        at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:139)
        at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:21)
        at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:65)
        at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
        at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:29)
        at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
        ... 10 more
Caused by: java.io.FileNotFoundException: C:\dev\eclipseworkspaces\CislMapXtext\org.xtext.example.mydsl.parent\org.xtext.example.mydsl\model\generated\MyDsl.genmodel (Das System kann den angegebenen Pfad nicht finden)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.createInputStream(FileURIHandlerImpl.java:99)
        at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
        at org.eclipse.xtext.resource.XtextResourceSet$1.createInputStream(XtextResourceSet.java:298)
        at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:532)
        at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
        at org.eclipse.xtext.resource.XtextResourceSet$1.createInputStream(XtextResourceSet.java:298)
        at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
        ... 25 more


Creating both languages in the IDE works fine if "referencedResource" is commented out.

Also building only MyDsl without MyDsl2 works fine with maven.

How can I create the project with both languages using maven?

Regards
Werner
Re: Generating a project with two languages using maven [message #1806331 is a reply to message #1805963] Tue, 07 May 2019 19:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13159
Registered: July 2009
Senior Member
are you sure you got the package / filesnames right?
you did not tell where you created MyDsl2.xtext

=> are you sure its not
name = "org.xtext.example.mydsl2.MyDsl2"


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generating a project with two languages using maven [message #1806410 is a reply to message #1806331] Wed, 08 May 2019 15:17 Go to previous messageGo to next message
Werner Müller is currently offline Werner MüllerFriend
Messages: 4
Registered: April 2019
Junior Member
MyDsl2.xtext is in the same package as MyDsl.xtext - i.e. /org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext.

I did not add or rename any other files or packages. I only changed /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 adding the second language, as shown in my post.

As I said, creating the language infrastructure with the Eclipse launch configuration works fine. The issue only comes up when using Maven. (And this is required for our nightly builds.)
Re: Generating a project with two languages using maven [message #1806411 is a reply to message #1806410] Wed, 08 May 2019 15:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13159
Registered: July 2009
Senior Member
can you please provide a reproducing sample with github/gitlab etc

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generating a project with two languages using maven [message #1806417 is a reply to message #1806411] Wed, 08 May 2019 17:36 Go to previous messageGo to next message
Werner Müller is currently offline Werner MüllerFriend
Messages: 4
Registered: April 2019
Junior Member
Here is the sample:
https://github.com/woernm/MyDslWithTwoLanguages
Re: Generating a project with two languages using maven [message #1806420 is a reply to message #1806417] Wed, 08 May 2019 18:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13159
Registered: July 2009
Senior Member
its the same a my try yesterday. it works
i am using linux.

you seem to use windows/some linux emulator if i have a look at
Caused by: java.lang.IllegalStateException: Problem parsing 'file:/C:/dev/eclipseworkspaces/CislMapXtext/org.xtext.example.mydsl.parent/org.xtext.example.mydsl/../org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext':

i am not sure if that path is correct? is it?

Downloaded from central: https://repo.maven.apache.org/maven2/org/eclipse/xtext/org.eclipse.xtext.xtext.generator/2.15.0/org.eclipse.xtext.xtext.generator-2.15.0.jar (1.1 MB at 2.1 MB/s)
0    INFO  XtextGenerator     - Initializing Xtext generator
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup addRegisterGeneratedEPackage
INFO: Adding generated EPackage 'org.eclipse.xtext.common.types.TypesPackage'
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project com.google.guava at 'archive:file:/home/dietrich/.m2/repository/com/google/guava/guava/14.0.1/guava-14.0.1.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/com.google.guava/21.0.0.v20170206-1425/com.google.guava-21.0.0.v20170206-1425.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project com.google.inject at 'archive:file:/home/dietrich/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/com.google.inject/3.0.0.v201605172100/com.google.inject-3.0.0.v201605172100.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project javax.inject at 'archive:file:/home/dietrich/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/javax.inject/1.0.0.v20091030/javax.inject-1.0.0.v20091030.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project com.ibm.icu at 'archive:file:/home/dietrich/.m2/repository/com/ibm/icu/icu4j/52.1/icu4j-52.1.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/com.ibm.icu/62.1.0.v20180727-1652/com.ibm.icu-62.1.0.v20180727-1652.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.osgi at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/platform/org.eclipse.osgi/3.12.100/org.eclipse.osgi-3.12.100.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.osgi/3.13.100.v20180827-1536/org.eclipse.osgi-3.13.100.v20180827-1536.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.apache.commons.cli at 'archive:file:/home/dietrich/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.apache.commons.cli/1.2.0.v201404270220/org.apache.commons.cli-1.2.0.v201404270220.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.apache.commons.logging at 'archive:file:/home/dietrich/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.apache.commons.logging/1.2.0.v20180409-1502/org.apache.commons.logging-1.2.0.v20180409-1502.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.equinox.common at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/platform/org.eclipse.equinox.common/3.9.0/org.eclipse.equinox.common-3.9.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.common/3.10.100.v20180827-1235/org.eclipse.equinox.common-3.10.100.v20180827-1235.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.codegen at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.codegen/2.11.0/org.eclipse.emf.codegen-2.11.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen/2.14.0.v20180706-1146/org.eclipse.emf.codegen-2.14.0.v20180706-1146.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.common at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.common/2.12.0/org.eclipse.emf.common-2.12.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.common/2.15.0.v20180723-1316/org.eclipse.emf.common-2.15.0.v20180723-1316.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.codegen.ecore at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.codegen.ecore/2.12.0/org.eclipse.emf.codegen.ecore-2.12.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen.ecore/2.15.0.v20180905-1732/org.eclipse.emf.codegen.ecore-2.15.0.v20180905-1732.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.ecore at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.ecore/2.12.0/org.eclipse.emf.ecore-2.12.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore/2.15.0.v20180722-1159/org.eclipse.emf.ecore-2.15.0.v20180722-1159.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.ecore.xmi at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.ecore.xmi/2.12.0/org.eclipse.emf.ecore.xmi-2.12.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore.xmi/2.15.0.v20180706-1146/org.eclipse.emf.ecore.xmi-2.15.0.v20180706-1146.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.mwe.core at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe.core/1.3.21.201705291010/org.eclipse.emf.mwe.core-1.3.21.201705291010.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe.core/1.3.21.201705291011/org.eclipse.emf.mwe.core-1.3.21.201705291011.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.mwe2.runtime at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe2.runtime/2.9.1.201705291010/org.eclipse.emf.mwe2.runtime-2.9.1.201705291010.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe2.runtime/2.9.1.201705291011/org.eclipse.emf.mwe2.runtime-2.9.1.201705291011.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.mwe.utils at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe.utils/1.3.21.201705291010/org.eclipse.emf.mwe.utils-1.3.21.201705291010.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe.utils/1.3.21.201705291011/org.eclipse.emf.mwe.utils-1.3.21.201705291011.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.emf.mwe2.lib at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe2.lib/2.9.1.201705291010/org.eclipse.emf.mwe2.lib-2.9.1.201705291010.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe2.lib/2.9.1.201705291011/org.eclipse.emf.mwe2.lib-2.9.1.201705291011.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.xtend.lib at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/xtend/org.eclipse.xtend.lib/2.15.0/org.eclipse.xtend.lib-2.15.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.xtend.lib/2.15.0.v20180916-1130/org.eclipse.xtend.lib-2.15.0.v20180916-1130.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.xtext.xbase.lib at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.xbase.lib/2.15.0/org.eclipse.xtext.xbase.lib-2.15.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.xbase.lib/2.15.0.v20180916-1130/org.eclipse.xtext.xbase.lib-2.15.0.v20180916-1130.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.xtend.lib.macro at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/xtend/org.eclipse.xtend.lib.macro/2.15.0/org.eclipse.xtend.lib.macro-2.15.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.xtend.lib.macro/2.15.0.v20180916-1130/org.eclipse.xtend.lib.macro-2.15.0.v20180916-1130.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.xtext at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/xtext/org.eclipse.xtext/2.15.0/org.eclipse.xtext-2.15.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.xtext/2.15.0.v20180916-0722/org.eclipse.xtext-2.15.0.v20180916-0722.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.xtext.util at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.util/2.15.0/org.eclipse.xtext.util-2.15.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.util/2.15.0.v20180916-0722/org.eclipse.xtext.util-2.15.0.v20180916-0722.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.xtext.common.types at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.common.types/2.15.0/org.eclipse.xtext.common.types-2.15.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.common.types/2.15.0.v20180916-1104/org.eclipse.xtext.common.types-2.15.0.v20180916-1104.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.objectweb.asm at 'archive:file:/home/dietrich/.m2/repository/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.objectweb.asm/6.2.1.v20180823-1831/org.objectweb.asm-6.2.1.v20180823-1831.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNING: Skipping conflicting project org.eclipse.xtext.xbase at 'archive:file:/home/dietrich/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.xbase/2.15.0/org.eclipse.xtext.xbase-2.15.0.jar!/' and using 'archive:file:/home/dietrich/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.xbase/2.15.0.v20180916-1104/org.eclipse.xtext.xbase-2.15.0.v20180916-1104.jar!/' instead.
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFO: Registering project org.xtext.example.mydsl at 'file:/home/dietrich/tmp/MyDslWithTwoLanguages/org.xtext.example.mydsl/'
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFO: Registering project org.xtext.example.mydsl.tests at 'file:/home/dietrich/tmp/MyDslWithTwoLanguages/org.xtext.example.mydsl.tests/'
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFO: Registering project org.xtext.example.mydsl.ide at 'file:/home/dietrich/tmp/MyDslWithTwoLanguages/org.xtext.example.mydsl.ide/'
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFO: Registering project org.xtext.example.mydsl.ui at 'file:/home/dietrich/tmp/MyDslWithTwoLanguages/org.xtext.example.mydsl.ui/'
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFO: Registering project org.xtext.example.mydsl.ui.tests at 'file:/home/dietrich/tmp/MyDslWithTwoLanguages/org.xtext.example.mydsl.ui.tests/'
May 08, 2019 8:32:07 PM org.eclipse.emf.mwe.utils.StandaloneSetup setResourceSet
INFO: Using resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
May 08, 2019 8:32:08 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFO: Registered GenModel 'http://www.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
May 08, 2019 8:32:08 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFO: Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
May 08, 2019 8:32:08 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFO: Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
May 08, 2019 8:32:08 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFO: Registered GenModel 'http://www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
May 08, 2019 8:32:09 PM org.eclipse.emf.mwe.utils.StandaloneSetup setResourceSet
INFO: Using resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
1612 INFO  XtextGenerator     - Generating org.xtext.example.mydsl.MyDsl
2822 INFO  EMFGeneratorFragment2 - Generating EMF model code
May 08, 2019 8:32:10 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFO: Registered GenModel 'http://www.xtext.org/example/mydsl/MyDsl' from 'platform:/resource/org.xtext.example.mydsl/model/generated/MyDsl.genmodel'
4800 INFO  XtextGenerator     - Generating org.xtext.example.mydsl.MyDsl2
5529 INFO  EMFGeneratorFragment2 - Generating EMF model code
May 08, 2019 8:32:13 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFO: Registered GenModel 'http://www.xtext.org/example/mydsl/MyDsl2' from 'platform:/resource/org.xtext.example.mydsl/model/generated/MyDsl2.genmodel'
6360 INFO  XtextGenerator     - Generating common infrastructure
6392 INFO  Workflow           - Done.




Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generating a project with two languages using maven [message #1806423 is a reply to message #1806420] Wed, 08 May 2019 19:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13159
Registered: July 2009
Senior Member
Works for me on Windows too

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generating a project with two languages using maven [message #1806480 is a reply to message #1806423] Thu, 09 May 2019 15:46 Go to previous messageGo to next message
Werner Müller is currently offline Werner MüllerFriend
Messages: 4
Registered: April 2019
Junior Member
Hm. I tried it on to PCs - one in the company and one at home. Both give the same result.
One is Windows 10 with Maven 3.3.3.
The other one is Windows 7 with Maven 3.6.1.
Both have Java 1.8 installed.

The file name you were aking about is correct. (In the log below, the root directory changed as I am using now the sample from GitHub.)

Our logs are pretty much the same up to the point where yours is saying
1612 INFO  XtextGenerator     - Generating org.xtext.example.mydsl.MyDsl


At this point, mine complains about
1248 ERROR XtextGeneratorLanguage - [XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'., XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule]


To me it looks like the generator in my case tries to compile MyDsl2 first. I even tried to reverse the sequence of the two languages in GenerateMyDsl.mwe2 - same result.

After generation I would expect to see a 'model' directory in org.xtext.example.mydsl which in fact is never created in my case. This directory gets created only, if I omit MyDsl2 from the generation and everything works fine.

Does any of that ring a bell?

[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl\pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2018-09/
[INFO] Adding repository http://download.eclipse.org/releases/2018-09
[INFO] Fetching p2.index from https://download.eclipse.org/technology/epp/packages/2018-09/
[INFO] Fetching p2.index from https://download.eclipse.org/technology/epp/packages/2018-09/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2018-09/201809191002/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2018-09/201809191002/
[INFO] Adding repository http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1
[INFO] Fetching p2.index from http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.15.0/
[INFO] Fetching p2.index from http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.15.0/
[INFO] Adding repository http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.15.0
[INFO] Adding repository http://download.eclipse.org/modeling/tmf/xtext/updates/orbit/2018-09
[INFO] Fetching p2.index from http://download.eclipse.org/tools/orbit/downloads/drops/R20180905201904/repository/
[INFO] Fetching p2.index from http://download.eclipse.org/tools/orbit/downloads/drops/R20180905201904/repository/
[INFO] Fetching p2.index from http://download.eclipse.org/tools/orbit/downloads/drops2/R20180905201904/repository/
[INFO] Fetching p2.index from http://download.eclipse.org/tools/orbit/downloads/drops2/R20180905201904/repository/
[INFO] Resolving dependencies of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl\pom.xml
[INFO] Resolving class path of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl\pom.xml
[INFO] Computing target platform for MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ide:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ide\pom.xml
[INFO] Resolving dependencies of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ide:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ide\pom.xml
[INFO] Resolving class path of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ide:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ide\pom.xml
[INFO] Computing target platform for MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ui:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ui\pom.xml
[INFO] Resolving dependencies of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ui:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ui\pom.xml
[INFO] Resolving class path of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ui:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ui\pom.xml
[INFO] Computing target platform for MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.tests:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.tests\pom.xml
[INFO] Resolving dependencies of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.tests:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.tests\pom.xml
[INFO] Resolving class path of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.tests:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.tests\pom.xml
[INFO] Computing target platform for MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ui.tests:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ui.tests\pom.xml
[INFO] Resolving dependencies of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ui.tests:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ui.tests\pom.xml
[INFO] Resolving class path of MavenProject: org.xtext.example.mydsl:org.xtext.example.mydsl.ui.tests:1.0.0-SNAPSHOT @ C:\Temp\MyDslWithTwoLanguages\org.xtext.example.mydsl.ui.tests\pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] org.xtext.example.mydsl.parent
[INFO] org.xtext.example.mydsl
[INFO] org.xtext.example.mydsl.ide
[INFO] org.xtext.example.mydsl.ui
[INFO] org.xtext.example.mydsl.target
[INFO] org.xtext.example.mydsl.tests
[INFO] org.xtext.example.mydsl.ui.tests
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building org.xtext.example.mydsl.parent 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ org.xtext.example.mydsl.parent ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building org.xtext.example.mydsl 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ org.xtext.example.mydsl ---
[INFO] 
[INFO] --- tycho-packaging-plugin:1.2.0:build-qualifier (default-build-qualifier) @ org.xtext.example.mydsl ---
[INFO] The project's OSGi version is 1.0.0.201905091526
[INFO] 
[INFO] --- tycho-packaging-plugin:1.2.0:validate-id (default-validate-id) @ org.xtext.example.mydsl ---
[INFO] 
[INFO] --- tycho-packaging-plugin:1.2.0:validate-version (default-validate-version) @ org.xtext.example.mydsl ---
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:java (mwe2Launcher) @ org.xtext.example.mydsl ---
[INFO] Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr-runtime/maven-metadata.xml
[WARNING] Could not transfer metadata org.antlr:antlr-runtime/maven-metadata.xml from/to sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
0    INFO  XtextGenerator     - Initializing Xtext generator
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup addRegisterGeneratedEPackage
INFORMATION: Adding generated EPackage 'org.eclipse.xtext.common.types.TypesPackage'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project com.google.guava at 'archive:file:/C:/Users/A5420/.m2/repository/com/google/guava/guava/14.0.1/guava-14.0.1.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/com.google.guava/21.0.0.v20170206-1425/com.google.guava-21.0.0.v20170206-1425.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project com.google.inject at 'archive:file:/C:/Users/A5420/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/com.google.inject/3.0.0.v201605172100/com.google.inject-3.0.0.v201605172100.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project javax.inject at 'archive:file:/C:/Users/A5420/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/javax.inject/1.0.0.v20091030/javax.inject-1.0.0.v20091030.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project com.ibm.icu at 'archive:file:/C:/Users/A5420/.m2/repository/com/ibm/icu/icu4j/52.1/icu4j-52.1.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/com.ibm.icu/62.1.0.v20180727-1652/com.ibm.icu-62.1.0.v20180727-1652.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.osgi at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/platform/org.eclipse.osgi/3.12.100/org.eclipse.osgi-3.12.100.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.osgi/3.13.100.v20180827-1536/org.eclipse.osgi-3.13.100.v20180827-1536.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.apache.commons.cli at 'archive:file:/C:/Users/A5420/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.apache.commons.cli/1.2.0.v201404270220/org.apache.commons.cli-1.2.0.v201404270220.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.apache.commons.logging at 'archive:file:/C:/Users/A5420/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.apache.commons.logging/1.2.0.v20180409-1502/org.apache.commons.logging-1.2.0.v20180409-1502.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.equinox.common at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/platform/org.eclipse.equinox.common/3.9.0/org.eclipse.equinox.common-3.9.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.common/3.10.100.v20180827-1235/org.eclipse.equinox.common-3.10.100.v20180827-1235.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.codegen at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.codegen/2.11.0/org.eclipse.emf.codegen-2.11.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen/2.14.0.v20180706-1146/org.eclipse.emf.codegen-2.14.0.v20180706-1146.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.common at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.common/2.12.0/org.eclipse.emf.common-2.12.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.common/2.15.0.v20180723-1316/org.eclipse.emf.common-2.15.0.v20180723-1316.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.codegen.ecore at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.codegen.ecore/2.12.0/org.eclipse.emf.codegen.ecore-2.12.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen.ecore/2.15.0.v20180905-1732/org.eclipse.emf.codegen.ecore-2.15.0.v20180905-1732.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.ecore at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.ecore/2.12.0/org.eclipse.emf.ecore-2.12.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore/2.15.0.v20180722-1159/org.eclipse.emf.ecore-2.15.0.v20180722-1159.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.ecore.xmi at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.ecore.xmi/2.12.0/org.eclipse.emf.ecore.xmi-2.12.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore.xmi/2.15.0.v20180706-1146/org.eclipse.emf.ecore.xmi-2.15.0.v20180706-1146.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.mwe.core at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe.core/1.3.21.201705291010/org.eclipse.emf.mwe.core-1.3.21.201705291010.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe.core/1.3.21.201705291011/org.eclipse.emf.mwe.core-1.3.21.201705291011.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.mwe2.runtime at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe2.runtime/2.9.1.201705291010/org.eclipse.emf.mwe2.runtime-2.9.1.201705291010.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe2.runtime/2.9.1.201705291011/org.eclipse.emf.mwe2.runtime-2.9.1.201705291011.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.mwe.utils at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe.utils/1.3.21.201705291010/org.eclipse.emf.mwe.utils-1.3.21.201705291010.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe.utils/1.3.21.201705291011/org.eclipse.emf.mwe.utils-1.3.21.201705291011.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.emf.mwe2.lib at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/emf/org.eclipse.emf.mwe2.lib/2.9.1.201705291010/org.eclipse.emf.mwe2.lib-2.9.1.201705291010.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.emf.mwe2.lib/2.9.1.201705291011/org.eclipse.emf.mwe2.lib-2.9.1.201705291011.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.xtend.lib at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/xtend/org.eclipse.xtend.lib/2.15.0/org.eclipse.xtend.lib-2.15.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.xtend.lib/2.15.0.v20180916-1130/org.eclipse.xtend.lib-2.15.0.v20180916-1130.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.xtext.xbase.lib at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.xbase.lib/2.15.0/org.eclipse.xtext.xbase.lib-2.15.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.xbase.lib/2.15.0.v20180916-1130/org.eclipse.xtext.xbase.lib-2.15.0.v20180916-1130.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.xtend.lib.macro at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/xtend/org.eclipse.xtend.lib.macro/2.15.0/org.eclipse.xtend.lib.macro-2.15.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.xtend.lib.macro/2.15.0.v20180916-1130/org.eclipse.xtend.lib.macro-2.15.0.v20180916-1130.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.xtext at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/xtext/org.eclipse.xtext/2.15.0/org.eclipse.xtext-2.15.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.xtext/2.15.0.v20180916-0722/org.eclipse.xtext-2.15.0.v20180916-0722.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.xtext.util at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.util/2.15.0/org.eclipse.xtext.util-2.15.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.util/2.15.0.v20180916-0722/org.eclipse.xtext.util-2.15.0.v20180916-0722.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.xtext.common.types at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.common.types/2.15.0/org.eclipse.xtext.common.types-2.15.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.common.types/2.15.0.v20180916-1104/org.eclipse.xtext.common.types-2.15.0.v20180916-1104.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.objectweb.asm at 'archive:file:/C:/Users/A5420/.m2/repository/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.objectweb.asm/6.2.1.v20180823-1831/org.objectweb.asm-6.2.1.v20180823-1831.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup registerMapping
WARNUNG: Skipping conflicting project org.eclipse.xtext.xbase at 'archive:file:/C:/Users/A5420/.m2/repository/org/eclipse/xtext/org.eclipse.xtext.xbase/2.15.0/org.eclipse.xtext.xbase-2.15.0.jar!/' and using 'archive:file:/C:/Users/A5420/.m2/repository/p2/osgi/bundle/org.eclipse.xtext.xbase/2.15.0.v20180916-1104/org.eclipse.xtext.xbase-2.15.0.v20180916-1104.jar!/' instead.
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFORMATION: Registering project org.xtext.example.mydsl at 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl/'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFORMATION: Registering project org.xtext.example.mydsl.tests at 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl.tests/'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFORMATION: Registering project org.xtext.example.mydsl.ide at 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl.ide/'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFORMATION: Registering project org.xtext.example.mydsl.ui at 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl.ui/'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup addProjectMapping
INFORMATION: Registering project org.xtext.example.mydsl.ui.tests at 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl.ui.tests/'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.StandaloneSetup setResourceSet
INFORMATION: Using resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFORMATION: Registered GenModel 'http://www.eclipse.org/Xtext/Xbase/XAnnotations' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFORMATION: Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xtype' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFORMATION: Registered GenModel 'http://www.eclipse.org/xtext/xbase/Xbase' from 'platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel'
Mai 09, 2019 5:27:24 PM org.eclipse.emf.mwe.utils.GenModelHelper registerGenModel
INFORMATION: Registered GenModel 'http://www.eclipse.org/xtext/common/JavaVMTypes' from 'platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel'
Mai 09, 2019 5:27:25 PM org.eclipse.emf.mwe.utils.StandaloneSetup setResourceSet
INFORMATION: Using resourceSet registry. The registered Packages will not be registered in the global EPackage.Registry.INSTANCE!
1248 ERROR XtextGeneratorLanguage - [XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'., XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule]
1248 ERROR Mwe2Launcher       - Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: Problem parsing 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl/../org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext':
XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'.
XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule
java.lang.RuntimeException: Problems running workflow org.xtext.example.mydsl.GenerateMyDsl: Problem parsing 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl/../org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext':
XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'.
XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:104)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Problem parsing 'file:/C:/Temp/MyDslWithTwoLanguages/org.xtext.example.mydsl/../org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl2.xtext':
XtextLinkingDiagnostic: null:1 Couldn't resolve reference to Grammar 'org.xtext.example.mydsl.MyDsl'.
XtextLinkingDiagnostic: null:6 Model cannot be resolved to a rule
	at org.eclipse.xtext.xtext.generator.XtextGeneratorLanguage.initialize(XtextGeneratorLanguage.java:278)
	at org.eclipse.xtext.xtext.generator.StandardLanguage.initialize(StandardLanguage.java:189)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.initialize(XtextGenerator.java:185)
	at org.eclipse.xtext.xtext.generator.XtextGenerator.checkConfigurationInternal(XtextGenerator.java:139)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:21)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:65)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:29)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
	... 10 more
Re: Generating a project with two languages using maven [message #1806484 is a reply to message #1806480] Thu, 09 May 2019 16:43 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13159
Registered: July 2009
Senior Member
you would need to debug that.
can you please create an issue and give the sample
at

github.com/eclipse/xtext-core


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Referring to source code of Java project in xText
Next Topic:Test with a cross-reference model
Goto Forum:
  


Current Time: Fri Oct 18 08:50:11 GMT 2019

Powered by FUDForum. Page generated in 0.02081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top