Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Missing ecore file with standalone generation
Missing ecore file with standalone generation [message #1087659] Fri, 16 August 2013 00:14 Go to next message
Matt Bertolini is currently offline Matt BertoliniFriend
Messages: 10
Registered: August 2013
Junior Member
I have a standard xtext project in eclipse. I am using Eclipse 4.3 and Xtext 2.4.2. When I generate the language infrastructure inside of Eclipse it works great and get my generated code including a .genmodel file and a .ecore file. When I use the standalone package and generate the language infrastructure via Maven I don't get the .ecore file and the generation fails with errors? I am using 2.4.2 of the standalone jar. I followed a fairly well known example found on GitHub with the single change of upgrading the Xtext version to 2.4.2. How can I get this .ecore file to generate so the build passes? Thanks in advance.
Re: Missing ecore file with standalone generation [message #1088062 is a reply to message #1087659] Fri, 16 August 2013 14:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi

I looks like you mix up some things. On the one hand there is the
maven plugin for Xtend (is that what you mean with standalone ?) To
generate the Xtext language (and the score derived from it) you need
run the workflow via maven this is done via the fornax plugin see
https://github.com/aphethean/xtext-maven-examples

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing ecore file with standalone generation [message #1088067 is a reply to message #1088062] Fri, 16 August 2013 14:34 Go to previous messageGo to next message
Matt Bertolini is currently offline Matt BertoliniFriend
Messages: 10
Registered: August 2013
Junior Member
I am indeed using that GitHub example with the fornax plugin. That is where the .ecore file is not being generated. The file is generated when I generate through eclipse.
Re: Missing ecore file with standalone generation [message #1088070 is a reply to message #1088067] Fri, 16 August 2013 14:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Are there any errors in the log?

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing ecore file with standalone generation [message #1088114 is a reply to message #1088070] Fri, 16 August 2013 15:49 Go to previous messageGo to next message
Matt Bertolini is currently offline Matt BertoliniFriend
Messages: 10
Registered: August 2013
Junior Member
I have attached the full error output from maven to the post since I can't put it inline because it has links and I am a new member.

It seems to boil down to this:

Caused by: java.util.MissingResourceException: The string resource '_UI_OK_diagnostic_0' could not be located
Re: Missing ecore file with standalone generation [message #1088196 is a reply to message #1088114] Fri, 16 August 2013 18:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i cannot reproduce this. dropping the following pom the domain model example created with the wizard works for me

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.eclipse.xtext.example</groupId>
	<artifactId>org.eclipse.xtext.example.domainmodel</artifactId>
	<version>2.4.0-SNAPSHOT</version>
	<packaging>eclipse-plugin</packaging>

	<repositories>
		<!-- Repository to resolve the Eclipse Tycho dependencies -->
		<repository>
			<id>p2.eclipse.kepler</id>
			<url>http://download.eclipse.org/releases/kepler</url>
			<layout>p2</layout>
		</repository>
	</repositories>

	<pluginRepositories>
		<!-- Repository to resolve fornax-oaw-m2-plugin -->
		<pluginRepository>
			<id>fornax.plugin.repository</id>
			<name>Fornax Plugin Repository</name>
			<url>http://www.fornax-platform.org/m2/repository</url>
		</pluginRepository>
	</pluginRepositories>

	<build>
		<resources>
			<resource>
				<directory>src</directory>
				<includes>
					<include>**/*.xtext</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src-gen</source>
								<source>src</source>
								<source>xtend-gen</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<extensions>true</extensions>
				<version>0.18.0</version>
			</plugin>
			<plugin>
				<groupId>org.eclipse.xtend</groupId>
				<artifactId>xtend-maven-plugin</artifactId>
				<version>2.4.2</version>
			</plugin>
			<plugin>
				<groupId>org.fornax.toolsupport</groupId>
				<artifactId>fornax-oaw-m2-plugin</artifactId>
				<version>3.4.0</version>
				<configuration>
					<workflowEngine>mwe2</workflowEngine>
					<workflowDescriptor>src/org/eclipse/xtext/example/domainmodel/GenerateDomainmodelLanguage.mwe2</workflowDescriptor>
				</configuration>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>run-workflow</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing ecore file with standalone generation [message #1088202 is a reply to message #1088196] Fri, 16 August 2013 18:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
sorry,

this was the wrong one (without xtend)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.eclipse.xtext.example</groupId>
	<artifactId>org.eclipse.xtext.example.domainmodel</artifactId>
	<version>2.4.0-SNAPSHOT</version>
	<packaging>eclipse-plugin</packaging>

	<repositories>
		<!-- Repository to resolve the Eclipse Tycho dependencies -->
		<repository>
			<id>p2.eclipse.kepler</id>
			<url>http://download.eclipse.org/releases/kepler</url>
			<layout>p2</layout>
		</repository>
	</repositories>

	<pluginRepositories>
		<!-- Repository to resolve fornax-oaw-m2-plugin -->
		<pluginRepository>
			<id>fornax.plugin.repository</id>
			<name>Fornax Plugin Repository</name>
			<url>http://www.fornax-platform.org/m2/repository</url>
		</pluginRepository>
	</pluginRepositories>

	<build>
		<resources>
			<resource>
				<directory>src</directory>
				<includes>
					<include>**/*.xtext</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<configuration>
					<filesets>
						<fileset>
							<directory>${basedir}/xtend-gen</directory>
							<includes>
								<include>**</include>
							</includes>
						</fileset>
						<fileset>
							<directory>${basedir}/src-gen</directory>
							<includes>
								<include>**</include>
							</includes>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src-gen</source>
								<source>src</source>
								<source>xtend-gen</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<extensions>true</extensions>
				<version>0.18.0</version>
			</plugin>
			<plugin>
				<groupId>org.fornax.toolsupport</groupId>
				<artifactId>fornax-oaw-m2-plugin</artifactId>
				<version>3.4.0</version>
				<configuration>
					<workflowEngine>mwe2</workflowEngine>
					<workflowDescriptor>src/org/eclipse/xtext/example/domainmodel/GenerateDomainmodelLanguage.mwe2</workflowDescriptor>
				</configuration>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>run-workflow</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.xtend</groupId>
				<artifactId>xtend-maven-plugin</artifactId>
				<version>2.4.2</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<!-- need to prefix by basedir to generate to currently built module -->
							<outputDirectory>${basedir}/xtend-gen</outputDirectory>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<!-- these dependencies are contributed in Eclipse by the "Xtend Library" 
						classpath container -->
					<dependency>
						<groupId>org.eclipse.xtend</groupId>
						<artifactId>org.eclipse.xtend.lib</artifactId>
						<version>2.4.2</version>
						<type>pom</type>
					</dependency>
				</dependencies>
			</plugin>

		</plugins>
	</build>

</project>


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing ecore file with standalone generation [message #1088321 is a reply to message #1088202] Fri, 16 August 2013 23:07 Go to previous message
Matt Bertolini is currently offline Matt BertoliniFriend
Messages: 10
Registered: August 2013
Junior Member
Thanks. I have modified my POM file based on your example and it is now generating. Much appreciated.
Previous Topic:Scoping for dot/path expressions
Next Topic:Null Context in quickfix
Goto Forum:
  


Current Time: Fri Apr 26 14:19:17 GMT 2024

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

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

Back to the top