Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Using the Xtend Compiler plugin for Gradle in a closed environement
Using the Xtend Compiler plugin for Gradle in a closed environement [message #1796135] Fri, 05 October 2018 18:42 Go to next message
Michael Voigt is currently offline Michael VoigtFriend
Messages: 3
Registered: October 2018
Junior Member
Hi guys,

We want to use the "xtext-gradle-plugin" to compile our xtend classes. In general this works well as described in xtext.github.io/xtext-gradle-plugin/xtend.html.

However in our company we have a requirement that all bundles/dependencies/plugins must not be loaded from the internet/jcenter/mavenCenter directly but must come from our internal repository (JFrog Artifactory). So we did upload the "xtext-gradle-plugin" to our internal repository and loading it from there works fine. Unfortunately there are two issues within the plugin itself that we're having problems with.

1) The files in our repository follow a different naming schema and therefore the LIB_PATTERN does not match anything: github.com/xtext/xtext-gradle-plugin/blob/9a0a1dafc415aacc62c763cee9c8bf82f9e285f9/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextExtension.xtend#L44
The plugin is expecting something like "org.eclipse.xtext-2.12.0.jar" but the jar in our repo is named "xtext-2.13.0-xtext2130.jar
=> it would be nice if the plugin was "a bit smarter" to find XText libs or if we could specify the pattern within our gradle script

2) We did work around 1) by specifying "xtext.version" but then the build fails b/c a hardcoded dependency to 'org.eclipse.xtend:org.eclipse.xtend.core:version' is added: github.com/xtext/xtext-gradle-plugin/blob/f4fb031452ef815c41dec85ee02760bec25e6b0b/xtext-gradle-plugin/src/main/java/org/xtext/gradle/XtendLanguageBasePlugin.xtend#L71
This dependency cannot be resolved in our repo b/c again the naming/GAV schema is different: the same jar can be found in our repo by "org.eclipse.xtend:xtend-lib"
=> it would be nice if the plugin could determine if the dependency is already defined in our buildscript (by whatever name/GAV) or if we could specify the dependency name within our gradle script. We did work around this by using a local ivy repo and automatically copying the xtend-lib.jar into it (using the proper name/GAV). But that solution is not very easy to maintain and might break in the future.

So I wonder if there are better ways to solve these problems?

Or is there a chance that these issues might tackled in one of the upcoming releases of "xtext-gradle-plugin"?

Kind Regards
Michael
PS: please prefix the URLs in the text with "https://" as I was not allowed to post links since this is my first post...
Re: Using the Xtend Compiler plugin for Gradle in a closed environement [message #1796422 is a reply to message #1796135] Fri, 12 October 2018 16:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
i dont know any better way.
feel free to open a github issue in the repo for discussion
if you dont provide a pr the likelyhood for a fix is near to zero
(we dont have the manpower to work on exotic usecases)

what about forking the plugin in your environment and deploy the fork to your jfrog?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Using the Xtend Compiler plugin for Gradle in a closed environement [message #1797259 is a reply to message #1796422] Mon, 29 October 2018 10:18 Go to previous message
Michael Voigt is currently offline Michael VoigtFriend
Messages: 3
Registered: October 2018
Junior Member
Thanks for the quick response. I guess forking is not really an option for us b/c that would require someone to maintain it and rebuild whenever there is a new release of the plugin available. However, I'll try to get one of our Build Engineers to work on a PR for the issue: https://github.com/xtext/xtext-gradle-plugin/issues/130.

Regards
Michael

[Updated on: Mon, 29 October 2018 10:20]

Report message to a moderator

Previous Topic:I need to invoke full_build or incremental build using project.build() function in new thread
Next Topic:Generated Gradle fails
Goto Forum:
  


Current Time: Fri Apr 19 11:56:58 GMT 2024

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

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

Back to the top