Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Class missing while executing xtext-maven:generate
Class missing while executing xtext-maven:generate [message #1796071] Thu, 04 October 2018 12:53 Go to next message
Eclipse UserFriend
When I try to build my DSL project with Maven, I get the following error:

[ERROR] Failed to execute goal org.eclipse.xtext:xtext-maven-plugin:2.13.0:generate (default) on project my.project: Execution default of goal org.eclipse.xtext:xtext-maven-plugin:2.13.0:generate failed: A required class was missing while executing org.eclipse.xtext:xtext-maven-plugin:2.13.0:generate: org/apache/commons/lang/StringEscapeUtils

The class in question is used in the JvmModelInferrer. Other dependencies of the language seem to get found just fine. The build only works when I specify commons-lang:commons-lang explicitly as a dependency in the xtext-maven-plugin <plugin> tag of the pom.xml. Shouldn't this transitive dependency either be added automatically or be part of the language package?
Re: Class missing while executing xtext-maven:generate [message #1796073 is a reply to message #1796071] Thu, 04 October 2018 13:10 Go to previous messageGo to next message
Eclipse UserFriend
How do you build the .mydsl artifact and what are it's dependencies
Re: Class missing while executing xtext-maven:generate [message #1796102 is a reply to message #1796073] Fri, 05 October 2018 02:37 Go to previous messageGo to next message
Eclipse UserFriend
I assume by ".mydsl artifact", you mean the my.lang.dsl project (correct me if I'm wrong).

I build it using Maven/Tycho. Its dependencies are:

Require-Bundle: org.eclipse.xtext,
 org.eclipse.xtext.xbase,
 org.eclipse.equinox.common;bundle-version="3.5.0",
 org.eclipse.emf.ecore,
 org.eclipse.xtext.xbase.lib;bundle-version="2.13.0",
 org.antlr.runtime,
 org.eclipse.xtext.util,
 org.eclipse.xtend.lib;bundle-version="2.13.0",
 org.eclipse.emf.common,
my.other.lang.dsl;bundle-version="1.0.0",
my.other.lang.model;bundle-version="1.0.0",
my.lang.model;bundle-version="1.0.0",
 org.apache.commons.lang;bundle-version="2.6.0",
 org.eclipse.xtext.common.types,
 org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.apache.log4j;version="1.2.15"


where "my.other.lang.*" bundles belong to a base language the my.lang extends.
Re: Class missing while executing xtext-maven:generate [message #1796110 is a reply to message #1796102] Fri, 05 October 2018 05:18 Go to previous messageGo to next message
Eclipse UserFriend
but at the usage you use it as maven dependency correct?=> you have to care about transitives yourself
Re: Class missing while executing xtext-maven:generate [message #1796188 is a reply to message #1796110] Mon, 08 October 2018 03:16 Go to previous messageGo to next message
Eclipse UserFriend
Christian Dietrich wrote on Fri, 05 October 2018 09:18
you have to care about transitives yourself


That sounds like a nightmare for language bundles with many and/or deep dependencies. Is there no better way?
Re: Class missing while executing xtext-maven:generate [message #1796189 is a reply to message #1796188] Mon, 08 October 2018 03:34 Go to previous messageGo to next message
Eclipse UserFriend
what about adding the dependency to yourdsl pom?
Re: Class missing while executing xtext-maven:generate [message #1796190 is a reply to message #1796189] Mon, 08 October 2018 03:37 Go to previous messageGo to next message
Eclipse UserFriend
We have a MANIFEST-first Tycho build, so there really aren't any dependencies in the pom itself. The manifest of course does contain the dependency.
Re: Class missing while executing xtext-maven:generate [message #1796193 is a reply to message #1796190] Mon, 08 October 2018 04:12 Go to previous message
Eclipse UserFriend
hmmm maybe tycho user guys have an idea
Previous Topic:Why does my test is not working
Next Topic:XText Server Crashes with VS Code Extension, How to Debug?
Goto Forum:
  


Current Time: Tue Jun 24 07:04:17 EDT 2025

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

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

Back to the top