Bug 491873 - Problems in gradle build configuration generated by the Xtext project wizard
Summary: Problems in gradle build configuration generated by the Xtext project wizard
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Releng (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-17 16:58 EDT by Lorenzo Bettini CLA
Modified: 2016-05-02 13:28 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Bettini CLA 2016-04-17 16:58:24 EDT
There's a strange problem in the gradle build configurations generated by the Xtext project wizard: if you give your project a name that starts with org.eclipse.xtext... the gradle build fails when it comes to the .ide project with this error:

:org.eclipse.xtext.example.mydsl:processResources
:org.eclipse.xtext.example.mydsl:classes
:org.eclipse.xtext.example.mydsl:jar
:org.eclipse.xtext.example.mydsl.ide:generateXtext
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration 'detachedConfiguration2'.
> Could not find org.eclipse.xtend:org.eclipse.xtend.core:1.0.0-SNAPSHOT.
  Searched in the following locations:
      https://jcenter.bintray.com/org/eclipse/xtend/org.eclipse.xtend.core/1.0.0-SNAPSHOT/maven-metadata.xml
      https://jcenter.bintray.com/org/eclipse/xtend/org.eclipse.xtend.core/1.0.0-SNAPSHOT/org.eclipse.xtend.core-1.0.0-SNAPSHOT.pom
      https://jcenter.bintray.com/org/eclipse/xtend/org.eclipse.xtend.core/1.0.0-SNAPSHOT/org.eclipse.xtend.core-1.0.0-SNAPSHOT.jar
  Required by:
      org.eclipse.xtext.example.mydsl:org.eclipse.xtext.example.mydsl.ide:1.0.0-SNAPSHOT

it really looks like it tries to resolve the xtend.core dependency using the same version of the project (1.0.0-SNAPSHOT).

This never happens if you give your project a name that does NOT start with org.eclipse.xtext, e.g., org.xtext is fine.

This happens both with Xtext 2.9.2 and Xtext 2.10 nightly, and it was tested in Linux and Mac.
Comment 1 Stefan Oehme CLA 2016-05-02 13:28:21 EDT
Indeed, the xtext-gradle plugin does not like it when there is something called org.eclipse.xtext.* that in fact is not Xtext :) We could make the matching more strict (only matching certain well-known Xtext jars). If you're interested in contributing, the relevant line is here:

https://github.com/xtext/xtext-gradle-plugin/blob/master/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextExtension.xtend#L44