Comments (14)
sry i have no idea on that. this has to be investigated. unfortunately the classpath regarding model/ is different in gradle and eclipse. maybe a issue with buildship.
in buildship model/* is added to the jar and this makes it part of the classpath.
i guess someone who knows gradle should have a look
from xtext-extras.
Exactly the same problem here: org.eclipse.xtext.xtext.URIsInEcoreFilesTest
from xtext-extras.
@oehme do you have an idea how that could be solved?
from xtext-extras.
I don't know gradle, but if it behaves like tycho-surefire-plugin then it executes the tests in an OSGI environment (without the UI) and this would make platform URIs work
from xtext-extras.
no, these uris actually work. the problem is that the classpath uri does not work cause model/* is not on classpath in eclipse. same for org/..../Xtext.ecore/genmodel.
these files are jared like
jar {
from('.') {
include 'org/**', 'modeling32.png'
}
}
or
jar {
from ('.') {
include 'about*.*', 'plugin.xml', 'schema/**', 'model/**'
}
metaInf {
from 'META-INF'
}
}
from xtext-extras.
but these tests used to work before the repo splitting, didn't they? I guess because at that time they were Eclipse plug-in projects (PDE nature). Could that be?
Or probably setting 'model' as a source folder would do the trick, because then their contents would be copied to the bin folder?
from xtext-extras.
I did not look at the old state. I don't know why this is done this way / why the files are not in a src folder
from xtext-extras.
For setting model as source folder the places that look for model/xxxx.ecore/genmodel would have to be changed
from xtext-extras.
This is indeed caused by switching off the plugin nature. The model
folder was added to the output of the project through a declaration in build.properties.
You cannot make model
a source folder because of how platform resource URIs work: They require the resource to have the same relative path inside the workspace project and the final jar file.
The only solution I can think of is to add the project root folder as a source folder with a single include for model
. For now you'd have to check in that customization in your .classpath file. With Gradle 3.0/Buildship 1.0.18 (both out soon), you'll be able to automate this customization.
from xtext-extras.
and what about simply adding the plugin nature back? It will be used only when opening the project in Eclipse and it should not disturb anything else, I guess.
from xtext-extras.
I see no problem with that. I was only offering the alternative if for some reason you really don't want the plugin nature :)
from xtext-extras.
Oh another obvious solution I missed: Use classpath URIs and put the model in src/main/resources
.
from xtext-extras.
ill try to fix this using a custom urlclassloader
from xtext-extras.
Fixed in 2.13
from xtext-extras.
Related Issues (20)
- Try-With-Resource broken with Java 8 HOT 5
- Completely Deprecate old Generator + Fragments HOT 1
- Java Source Lang causes NPE HOT 8
- XcoreEcoreTest fails with Xtext 2.20
- xtext-extras compilation fails HOT 7
- Late JvmMember initialization not working HOT 7
- Type parameter in methods from generic interfaces are not translated correctly HOT 4
- Wrong scoping with inferred inner classes
- Inconsistent handling of synthetic fragment for missing obj HOT 19
- AbstractClassMirror.findMember(EObject, String) fails when inner class is used in signature of member before HOT 6
- StandaloneBuilder should provide more information in case of problems HOT 1
- testMemberCount_16 fails with java 17 (and maybe also 16) HOT 1
- Avoid empty lines with two spaces between members HOT 17
- Since Java 15: Unable to reference Java types in the same project HOT 11
- Xbase languages do not correctly track imported names HOT 3
- Support incremental builds via the StandaloneBuilder HOT 3
- XbaseCompiler should be more resilient against broken code
- StandaloneBuilderTest flaky/does not work on Linux HOT 5
- StandaloneBuilder leads to test error in xtext-eclipse with tycho 2x.
- Move to Maven/Tycho for projects and build infrastructure HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xtext-extras.