|
|
Re: Genmodel code generation via Maven build [message #1862841 is a reply to message #1862838] |
Mon, 01 January 2024 14:01 |
Max Kratz Messages: 2 Registered: December 2023 |
Junior Member |
|
|
Thank you for your fast reply.
I tried to build the GEF project by checking out the repository's code and using Maven to run the build headlessly. Unfortunately, I'm unable to build the GEF project with Maven.
Under `CONTRIBUTING.md`, the documentation states that Java 11 must be used. However, if I use a Java 11 installation, Maven complains about class files compiled with a higher version. After some unsuccessful tries, I had a look at the Jenkins configuration file and observed that Jenkins uses JDK17 instead of Java 11. I switched my test environment to JDK17 but now I get an error when I try to build the main project:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.4:compile (default-compile) on project org.eclipse.gef.common: useJDK = BREE configured, but no toolchain of type 'jdk' with id 'JavaSE-1.8' found. See https://maven.apache.org/guides/mini/guide-using-toolchains.html -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf org.eclipse.gef.plugins:org.eclipse.gef.common
However, I compared the provided pom.xml file you mentioned and I noticed that I had at least two dependencies missing:
[...]
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.common.types</artifactId>
<version>${xtext-version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.xtext.generator</artifactId>
<version>${xtext-version}</version>
</dependency>
[...]
I added them to my small example repo (https://github.com/maxkratz/maven-ecore-modeling-example/commit/a79d1d5f59db821155fbda36b7e2b2d1dbdedc77) and now the Maven build process runs successfully.
Thank you very much!
|
|
|
Re: Genmodel code generation via Maven build [message #1862842 is a reply to message #1862841] |
Mon, 01 January 2024 15:01 |
Ed Merks Messages: 33212 Registered: July 2009 |
Senior Member |
|
|
FYI, for anyone else looking at this post in the future, I have this in my <home>/.m2/toolschains.xml<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<id>JavaSE-1.8</id>
<version>1.8</version>
<vendor>sun</vendor>
</provides>
<configuration>
<jdkHome>C:/Program Files/Java/jdk1.8.0_261</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<id>JavaSE-11</id>
<version>11</version>
<vendor>sun</vendor>
</provides>
<configuration>
<jdkHome>C:/Program Files/Java/jdk-11.0.13+8</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<id>JavaSE-17</id>
<version>17</version>
<vendor>adoptium</vendor>
</provides>
<configuration>
<jdkHome>C:/Program Files/Java/jdk-17.0.5+8</jdkHome>
</configuration>
</toolchain>
</toolchains>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.05192 seconds