Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext 2.12 what emf version are used(What version of emf I need to use for xtext 2.12.0)
Xtext 2.12 what emf version are used [message #1765582] Mon, 12 June 2017 15:03 Go to next message
kozhaev Vladimir is currently offline kozhaev VladimirFriend
Messages: 60
Registered: July 2009
Member
Hi all

I need to upgrade version of xtext from 2.10 to 2.12. Also there are emf version 2.8.3

	<groupId>org.eclipse.emf</groupId>
						<artifactId>org.eclipse.emf.mwe2.launch</artifactId>
						<version>2.8.3</version>
					</dependency>


And when I try to process mvn install I have following error

Quote:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (mwe2Launcher) on project com.idc.xtext.ap
ps: Execution mwe2Launcher of goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java failed: Plugin org.codehaus.mojo:exec-
maven-plugin:1.6.0 or one of its dependencies could not be resolved: Failed to collect dependencies for org.codehaus.moj
o:exec-maven-plugin:jar:1.6.0 (): Could not resolve version conflict among [org.codehaus.mojo:exec-maven-plugin:jar:1.6.
0 -> org.eclipse.emf:org.eclipse.emf.mwe2.launch:jar:2.8.3 -> org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:[2.8.3,2.
8.3], org.codehaus.mojo:exec-maven-plugin:jar:1.6.0 -> org.eclipse.emf:org.eclipse.emf.mwe2.launch:jar:2.8.3 -> org.ecli
pse.emf:org.eclipse.emf.mwe2.language:jar:[2.8.3,2.8.3] -> org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:[2.8.3,2.8.3
], org.codehaus.mojo:exec-maven-plugin:jar:1.6.0 -> org.eclipse.xtext:org.eclipse.xtext.xtext.generator:jar:2.12.0 -> or
g.eclipse.emf:org.eclipse.emf.mwe.utils:jar:1.3.20.201605261059 -> org.eclipse.emf:org.eclipse.emf.mwe.core:jar:[1.3.20.
201605261059,1.3.20.201605261059] -> org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:[2.9.0.201605261059,2.9.0.20160526
1059], org.codehaus.mojo:exec-maven-plugin:jar:1.6.0 -> org.eclipse.xtext:org.eclipse.xtext.xtext.generator:jar:2.12.0 -
> org.eclipse.emf:org.eclipse.emf.mwe2.lib:jar:2.9.0.201605261059 -> org.eclipse.emf:org.eclipse.emf.mwe2.runtime:jar:[2
.9.0.201605261059,2.9.0.201605261059]] -> [Help 1]


So, my questions are:
1. What version of emf I need to use in the project(I can't found it on goodle)?
2. What maven repo I need to add?

Regards,
Vladimir
Re: Xtext 2.12 what emf version are used [message #1765587 is a reply to message #1765582] Mon, 12 June 2017 15:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11390
Registered: July 2009
Senior Member
Did you try to use version 2.9.1 of mwe2

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 what emf version are used [message #1765722 is a reply to message #1765587] Tue, 13 June 2017 20:56 Go to previous messageGo to next message
kozhaev Vladimir is currently offline kozhaev VladimirFriend
Messages: 60
Registered: July 2009
Member
I have done it with 2.9.0 but have another problem during the mvn install processing

Quote:
[ERROR]
ERROR: AppsIdeSetup.xtend - C:\Users\Voffka\Documents\projects\dsl_finance\trunk10\idc\xtext\com.idc.xtext.apps.parent\
com.idc.xtext.apps.ide\src\com\idc\xtext\ide\AppsIdeSetup.xtend
17: Type mismatch: cannot convert from AppsIdeModule to Module



There is my code

/*
 * generated by Xtext 2.12.0
 */
package com.idc.xtext.ide


/**
 * Use this class to register ide components.
 */
class AppsIdeModule extends AbstractAppsIdeModule {
}

/*
 * generated by Xtext 2.12.0
 */
package com.idc.xtext.ide

import com.google.inject.Guice
import com.idc.xtext.AppsRuntimeModule
import com.idc.xtext.AppsStandaloneSetup
import org.eclipse.xtext.util.Modules2
import org.eclipse.xtext.generator.IGenerator2

/**
 * Initialization support for running Xtext languages as language servers.
 */
class AppsIdeSetup extends AppsStandaloneSetup {

	override createInjector() {
		Guice.createInjector(Modules2.mixin(new AppsRuntimeModule, new AppsIdeModule))
	}
	
}


Where I'm wrong?
Re: Xtext 2.12 what emf version are used [message #1765862 is a reply to message #1765722] Wed, 14 June 2017 04:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11390
Registered: July 2009
Senior Member
Have no idea.
Maybe different versions of guice on classspath?
Can you create a small reproducing example


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 what emf version are used [message #1765948 is a reply to message #1765862] Wed, 14 June 2017 14:44 Go to previous messageGo to next message
kozhaev Vladimir is currently offline kozhaev VladimirFriend
Messages: 60
Registered: July 2009
Member
Well, it's something difficult

There is my parent pom.xml

<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>com.idc.xtext.apps</groupId>
	<version>1.0.0-SNAPSHOT</version>
	<artifactId>com.idc.xtext.apps.parent</artifactId>
	<packaging>pom</packaging>

	<properties>
		<tycho-version>1.0.0</tycho-version>
		<xtextVersion>2.12.0</xtextVersion>
		<project.build.sourceEncoding>windows-1251</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>
	<modules>
		<module>com.idc.xtext.apps</module>
		<module>com.idc.xtext.apps.ide</module>
		<module>com.idc.xtext.apps.ui</module>
		<!--module>com.idc.xtext.apps.ui.tests</module-->
		<module>com.idc.xtext.apps.target</module>
		<!--module>com.idc.xtext.apps.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>com.idc.xtext.apps</groupId>
							<artifactId>com.idc.xtext.apps.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>testCompile</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>3.0.0</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.codehaus.mojo</groupId>
										<artifactId>build-helper-maven-plugin</artifactId>
										<versionRange>3.0.0</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>1.0.0</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>1.0.0</versionRange>
										<goals>
											<goal>build-qualifier</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>
					</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/>
</project>


This is my pom.xml for first folder

<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>com.idc.xtext.apps</groupId>
		<artifactId>com.idc.xtext.apps.parent</artifactId>
		<version>1.0.0-SNAPSHOT</version>
	</parent>
	<artifactId>com.idc.xtext.apps</artifactId>
	<packaging>eclipse-plugin</packaging>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.6.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/com/idc/xtext/GenerateApps.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.0.201605261059</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>
				</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}/../com.idc.xtext.apps/src-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps/xtend-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.tests/src-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.tests/xtend-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.ide/src-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.ide/xtend-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.ui/src-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.ui/xtend-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.ui.tests/src-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/../com.idc.xtext.apps.ui.tests/xtend-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.5.0</versionRange>
										<goals>
											<goal>java</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>


This is pom.xml for the ide version

<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>com.idc.xtext.apps</groupId>
		<artifactId>com.idc.xtext.apps.parent</artifactId>
		<version>1.0.0-SNAPSHOT</version>
	</parent>
	<artifactId>com.idc.xtext.apps.ide</artifactId>
	<packaging>eclipse-plugin</packaging>

	<build>
		<plugins>
			<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>src-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
						<fileset>
							<directory>xtend-gen/</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>


Can you see something wrong in this files?
Re: Xtext 2.12 what emf version are used [message #1765950 is a reply to message #1765948] Wed, 14 June 2017 14:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11390
Registered: July 2009
Senior Member
no,

can you mavenify a greeting example and share the complete stuff


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext 2.12 what emf version are used [message #1766340 is a reply to message #1765950] Tue, 20 June 2017 11:38 Go to previous message
kozhaev Vladimir is currently offline kozhaev VladimirFriend
Messages: 60
Registered: July 2009
Member
Problem was in the "target" files. We need to add appropriate versions of xtext and emf
Previous Topic:XBase: Overloading '.' operations
Next Topic:Get All Objects of Type in Global Scope? Easy Way?
Goto Forum:
  


Current Time: Fri Nov 24 01:59:43 GMT 2017

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

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