Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Error using maven in Eclipse
Error using maven in Eclipse [message #1815703] Tue, 08 October 2019 15:00 Go to next message
L R is currently offline L RFriend
Messages: 12
Registered: July 2019
Junior Member
I am using Xtext for a project. I am doing development in Eclipse and want to establish a continuous integration environment using maven for this project. I am attempting to walk through the documentation so that I can apply it to my project, but I am having issues. I am starting from the maven xtext example project (https://github.com/xtext/maven-xtext-example). After cloning this project, I am able to successfully build this project from the command line using the command mvn clean install. However, when I attempt to do the same command in Eclipse I get the following errors:

[INFO] Scanning for projects...
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[INFO] Computing target platform for MavenProject: my.mavenized.herolanguage:my.mavenized.herolanguage:1.0.0-SNAPSHOT @ /home/labuser/maven-xtext-example2/my.mavenized.herolanguage/pom.xml
[INFO] Resolving dependencies of MavenProject: my.mavenized.herolanguage:my.mavenized.herolanguage:1.0.0-SNAPSHOT @ /home/labuser/maven-xtext-example2/my.mavenized.herolanguage/pom.xml
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: my.mavenized.herolanguage 1.0.0.qualifier
[ERROR]   Missing requirement: my.mavenized.herolanguage 1.0.0.qualifier requires 'osgi.bundle; org.eclipse.xtext 0.0.0' but it could not be found
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: my.mavenized.herolanguage:my.mavenized.herolanguage:1.0.0-SNAPSHOT @ /home/labuser/maven-xtext-example2/my.mavenized.herolanguage/pom.xml: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException



To be more specific, within Eclipse I create a new workspace. Within this workspace I import the parent project into the workspace using the General->Existing Projects into Workspace import wizard. After importing this project, I right-click on the parent project pom.xml file select Run As -> Maven clean.

In terms of version information, I am running under Ubuntu 18.04, Eclipse dsl-2019-09 with openjdk 11. I have also tried running this under windows with a similar result.
Re: Error using maven in Eclipse [message #1815706 is a reply to message #1815703] Tue, 08 October 2019 15:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Did you have a look what the wizard creates
That example dates to pre wizard times


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Error using maven in Eclipse [message #1815707 is a reply to message #1815706] Tue, 08 October 2019 15:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Please also note there is a bug in maven 3.6.1
That breaks that example above

https://bugs.eclipse.org/bugs/show_bug.cgi?id=546463


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 08 October 2019 15:08]

Report message to a moderator

Re: Error using maven in Eclipse [message #1815712 is a reply to message #1815706] Tue, 08 October 2019 15:43 Go to previous messageGo to next message
L R is currently offline L RFriend
Messages: 12
Registered: July 2019
Junior Member
Thanks for this reply. I have had mixed luck with the wizard. In the past I had issues when running under Windows with Eclipse dsl-2019-06. Today, when I tried the wizard under Ubuntu with Eclipse dsl-2019-09 it worked just fine. The error I received under Windows is shown below. I will need to look closer to identify how these two wizard generated projects are different.

Windows Eclipse-dsl-2019-06 error:
[ERROR] Cannot resolve target definition:
[ERROR]   Software being installed: org.eclipse.xtext.sdk.feature.group 2.19.0.v20190826-0548
[ERROR]   Missing requirement: org.eclipse.xtext.sdk.feature.group 2.19.0.v20190826-0548 requires 'org.eclipse.equinox.p2.iu; org.eclipse.emf.mwe2.language.sdk.feature.group 2.11.0' but it could not be found
[ERROR] 
[ERROR] Failed to resolve target definition C:\share\example-maven-project\org.xtext.example.mydsl.parent\org.xtext.example.mydsl.target\org.xtext.example.mydsl.target.target: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException 

Re: Error using maven in Eclipse [message #1815713 is a reply to message #1815712] Tue, 08 October 2019 15:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
did you check the xtext/mwe repo versions in the .target file?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 08 October 2019 15:55]

Report message to a moderator

Re: Error using maven in Eclipse [message #1815714 is a reply to message #1815713] Tue, 08 October 2019 16:40 Go to previous message
L R is currently offline L RFriend
Messages: 12
Registered: July 2019
Junior Member
That was exactly the issue. With the dsl-2019-06 version of Eclipse, the wizard set the mwe repo to version 2.10.0. By changing this to 2.11.0 (which matches the dsl-2019-09 version) it built successfully.

org.xtext.example.mydsl.target.target updated line:
 <repository location="https://download.eclipse.org/modeling/emft/mwe/updates/releases/2.11.0/"/> 


Thanks for your insights.
Previous Topic:Mwe2Launcher - Resource does not exist
Next Topic:Proposal not added
Goto Forum:
  


Current Time: Thu Apr 18 18:45:40 GMT 2024

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

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

Back to the top