Cannot set the JDK compliance level in polishing transformation [message #1843834] |
Fri, 20 August 2021 04:02 |
|
On Epsilon 2.2 and 2.3 I have a minimal eugenia generator workflow as per
https://www.eclipse.org/epsilon/doc/articles/eugenia-ant/
<project name="project" default="default">
<target name="default">
<epsilon.eugenia src="common/entity.emf" firstStep="clean" lastStep="genmodel"/>
</target>
</project>
It has a polishing transform, that aims to set the JDK compliance level:
Ecore2GenModel.eol
var genModel = GenModel!GenModel.all().first();
genModel.complianceLevel = "11.0";
It fails with the stack below, pointing to classloader management. This is presumably due to the resolution being done inside the ant task.
I have not found a way to access the enum or its literals and hence cannot find a workaround.
build.xml:5: class java.lang.String cannot be cast to class org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel (java.lang.String is in module java.base of loader 'bootstrap'; org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @71567e73)
|
|
|
|
Powered by
FUDForum. Page generated in 0.03073 seconds