Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Xtext 2.9 maven + generate artifacts(cannot generate xtext artifacts for hello world projects)
Xtext 2.9 maven + generate artifacts [message #1723290] Sat, 13 February 2016 11:22 Go to next message
Eclipse UserFriend
No Message Body
Re: Xtext 2.9 maven + generate artifacts [message #1723291 is a reply to message #1723290] Sat, 13 February 2016 11:32 Go to previous messageGo to next message
Eclipse UserFriend
Hello

I observed strange problem. In new version of Xtext 2.9.

--- I've created simple hello world project. Using maven as build system and using standard maven file layouts
--- try to generate xtext artifacts, For this I click corresponded options in menu that displayed for MyDsl.xtext file.

Then I observed message like Please put bundle org.eclipse.emf.mwe2.launch on project's classpath




Wthat is the reason of this problem
Re: Xtext 2.9 maven + generate artifacts [message #1723292 is a reply to message #1723291] Sat, 13 February 2016 11:35 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

i cannot reproduce that

- using xtext 2.9.1

did you try to clean your local maven repo, and then recreate and run the workflow
Re: Xtext 2.9 maven + generate artifacts [message #1723294 is a reply to message #1723292] Sat, 13 February 2016 11:48 Go to previous messageGo to next message
Eclipse UserFriend
p.s. here is the output of a mvn dependeny:tree on the mydsl project

[INFO] org.xtext.example.mydsl1:org.xtext.example.mydsl1:jar:1.0.0-SNAPSHOT
[INFO] +- org.eclipse.xtext:org.eclipse.xtext.junit4:jar:2.9.1:test
[INFO] | \- junit:junit:jar:4.8.1:test
[INFO] +- org.eclipse.xtext:org.eclipse.xtext.xbase.junit:jar:2.9.1:test
[INFO] +- org.eclipse.xtext:org.eclipse.xtext:jar:2.9.1:compile
[INFO] | +- org.eclipse.xtext:org.eclipse.xtext.util:jar:2.9.1:compile (version selected from constraint [2.9.1,2.9.1])
[INFO] | +- org.eclipse.xtend:org.eclipse.xtend.lib:jar:2.9.1:compile (version selected from constraint [2.9.1,2.9.1])
[INFO] | | \- org.eclipse.xtend:org.eclipse.xtend.lib.macro:jar:2.9.1:compile
[INFO] | +- com.google.guava:guava:jar:14.0.1:compile (version selected from constraint [10.0.1,14.0.1])
[INFO] | +- com.google.inject:guice:jar:3.0:compile
[INFO] | | +- javax.inject:javax.inject:jar:1:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.eclipse.emf:org.eclipse.emf.ecore:jar:2.11.1-v20150805-0538:compile (version selected from constraint (2.8,3.0))
[INFO] | +- org.eclipse.emf:org.eclipse.emf.common:jar:2.11.0-v20150805-0538:compile (version selected from constraint (2.8,3.0))
[INFO] | +- org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.11.1-v20150805-0538:compile (version selected from constraint (2.8,3.0))
[INFO] | +- log4j:log4j:jar:1.2.16:compile
[INFO] | +- org.antlr:antlr-runtime:jar:3.2:compile (version selected from constraint [3.2,3.2])
[INFO] | \- org.eclipse.equinox:org.eclipse.equinox.common:jar:3.6.0:compile
[INFO] +- org.eclipse.xtext:org.eclipse.xtext.xbase:jar:2.9.1:compile
[INFO] | +- org.eclipse.xtext:org.eclipse.xtext.xbase.lib:jar:2.9.1:compile (version selected from constraint [2.9.1,2.9.1])
[INFO] | \- org.eclipse.xtext:org.eclipse.xtext.common.types:jar:2.9.1:compile (version selected from constraint [2.9.1,2.9.1])
[INFO] | +- org.eclipse.emf:org.eclipse.emf.codegen:jar:2.11.0-v20150806-0404:runtime (version selected from constraint (2.8,3.0))
[INFO] | \- org.ow2.asm:asm-commons:jar:5.0.1:compile
[INFO] | \- org.ow2.asm:asm-tree:jar:5.0.1:compile
[INFO] | \- org.ow2.asm:asm:jar:5.0.1:compile
[INFO] +- org.eclipse.xtext:org.eclipse.xtext.xtext:jar:2.9.1:compile
[INFO] | +- org.eclipse.xtext:org.eclipse.xtext.generator:jar:2.9.1:compile (version selected from constraint [2.9.1,2.9.1])
[INFO] | +- org.eclipse.xtext:org.eclipse.xtext.ecore:jar:2.9.1:compile (version selected from constraint [2.9.1,2.9.1])
[INFO] | +- org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.11.0-v20150806-0404:compile (version selected from constraint (2.8,3.0))
[INFO] | +- org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:2.8.3:compile
[INFO] | +- org.eclipse.emf:org.eclipse.emf.mwe2.lib:jar:2.8.3:compile
[INFO] | +- org.eclipse.emf:org.eclipse.emf.mwe2.language:jar:2.8.3:compile
[INFO] | +- org.eclipse.emf:org.eclipse.emf.mwe2.launch:jar:2.8.3:compile
[INFO] | +- org.eclipse.emf:org.eclipse.emf.mwe.core:jar:1.3.13:compile
[INFO] | +- org.eclipse.emf:org.eclipse.emf.mwe.utils:jar:1.3.13:compile
[INFO] | +- org.eclipse.xpand:org.eclipse.xpand:jar:2.0.0:compile
[INFO] | +- org.eclipse.xpand:org.eclipse.xtend:jar:2.0.0:compile
[INFO] | +- org.eclipse.xpand:org.eclipse.xtend.typesystem.emf:jar:2.0.0:compile
[INFO] | +- com.ibm.icu:icu4j:jar:52.1:compile
[INFO] | +- commons-cli:commons-cli:jar:1.2:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | \- org.eclipse.xtext:xtext-antlr-generator:jar:2.1.1:compile
[INFO] | \- org.xtext:antlr-generator:jar:3.2.1:compile
[INFO] \- org.eclipse.xtext:org.eclipse.xtext.xtext.generator:jar:2.9.1:compile
Re: Xtext 2.9 maven + generate artifacts [message #1723295 is a reply to message #1723291] Sat, 13 February 2016 11:55 Go to previous messageGo to next message
Eclipse UserFriend
Hi

I think this is entirely normal. I'm sure I've seen it with Xtext < 2.9
(I still have to use 2.8.4) and non-Maven usage.

org.eclipse.emf.mwe2.launch is needed if you have the default
configuration in which the MWE2 build script is launched for the same
project as the generated Xtext Java files. It's more effort, but I
recommend separating all the build support into a separate plugin and
avoid the unnecessary dependencies/run-time bloat.

Regards

Ed Willink


On 13/02/2016 16:32, Alex Gor wrote:
> Hello
> I observed strange problem. In new version of Xtext 2.9.
>
> --- I've created simple hello world project. Using maven as build
> system and using standard maven file layouts
> --- try to generate xtext artifacts, For this I click corresponded
> options in menu that displayed for MyDsl.xtext file.
>
> Then I observed message like Please put bundle
> org.eclipse.emf.mwe2.launch on project's classpath
>
>
>
>
> Wthat is the reason of this problem
Re: Xtext 2.9 maven + generate artifacts [message #1723377 is a reply to message #1723295] Mon, 15 February 2016 04:36 Go to previous messageGo to next message
Eclipse UserFriend
I've update my instance of eclipse to 2.9.1 version. Problem is observed on updated version. I tried to build project using maven command (I ran mvn clean package command.) line and caught the following exception
0    [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] INFO  text.xtext.generator.XtextGenerator  - Initializing Xtext generator
191  [org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main()] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - org/eclipse/emf/codegen/jet/JETException
java.lang.NoClassDefFoundError: org/eclipse/emf/codegen/jet/JETException

The full stacktrace in attachement.

Thanks
Alexander
  • Attachment: log
    (Size: 8.04KB, Downloaded 121 times)

[Updated on: Mon, 15 February 2016 04:40] by Moderator

Re: Xtext 2.9 maven + generate artifacts [message #1723378 is a reply to message #1723377] Mon, 15 February 2016 04:42 Go to previous messageGo to next message
Eclipse UserFriend
which opptions did you choose in the dialog?
this exception is in org.eclipse.emf:org.eclipse.emf.codegen
can you share a project that reproduces the problem?
Re: Xtext 2.9 maven + generate artifacts [message #1723381 is a reply to message #1723378] Mon, 15 February 2016 04:58 Go to previous messageGo to next message
Eclipse UserFriend
p.s.

this error happens if you execute a maven only project (no tycho)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485129
the bug will be fixed in 2.9.2+

as a workaround you may use

		<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/main/java/org/xtext/example/mydsl3/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.codegen</artifactId>
						<version>(2.10,2.12)</version>
					</dependency>
				</dependencies>
			</plugin>
Re: Xtext 2.9 maven + generate artifacts [message #1723388 is a reply to message #1723381] Mon, 15 February 2016 05:54 Go to previous message
Eclipse UserFriend
Thanks for explanation
Using work around above I was able to provide maven build

[Updated on: Mon, 15 February 2016 06:37] by Moderator

Previous Topic:book still uptodate?
Next Topic:executable jar for xtext 2.9.x with maven
Goto Forum:
  


Current Time: Tue May 13 08:25:07 EDT 2025

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

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

Back to the top