From 5ddc73e4cf625f1ed20221785c643e83a74ea789 Mon Sep 17 00:00:00 2001 From: Jad El-khoury Date: Wed, 4 Oct 2023 00:18:37 +0200 Subject: [PATCH] Generate for JDK 17 or 11, depending on whether Lyo Version 6.x.x or below is chosen. --- CHANGELOG.md | 3 ++- .../oslc4j/codegenerator/config/generatePomXml.mtl | 14 +++++++++++--- .../description/ToolChainModel.odesign | 8 ++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcf2dc0e..c8fc7f7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,11 @@ - Introducing a user setting that allows one to view Shapes or Vocabularies terms in the Specification models. - Creating a common library that defines the relation between domains and vocab. - Introducing User Preferences through a Windows->Preferences page. Specifically, the current settings allow user to choose whether Domain Specifications should show Vocabulary or Shape terms. +- Generate for JDK 17 or 11, depending on whether Lyo Version 6.x.x or below is chosen. ### Changed -- generate the necessary maven dependencies for domain models that (a) are imported into the adaptor model yet (b) the adaptor is configured to not generate code from imported models. In such scenario, the maven dependency for the domain is necessary. +- generate the necessary maven dependencies for domain models that (a) are imported into the adaptor model yet (b) the adaptor is configured to not generate code from imported models. In such scenario, the maven dependency for the domain is necessary. - `LYO_BASE` is replaced with `LYO_BASEURL`. To override the Base URL of the adaptor, use the `baseurl` property. This release makes the use of this property consistent and check the `LYO_BASEURL` environment variable instead of `LYO_BASE`. - Upgraded the frontend libraries from Bootstrap v4.0.0-beta to v4.2.1. diff --git a/org.eclipse.lyo.oslc4j.codegenerator/src/org/eclipse/lyo/oslc4j/codegenerator/config/generatePomXml.mtl b/org.eclipse.lyo.oslc4j.codegenerator/src/org/eclipse/lyo/oslc4j/codegenerator/config/generatePomXml.mtl index 700811e9..5afe86e8 100644 --- a/org.eclipse.lyo.oslc4j.codegenerator/src/org/eclipse/lyo/oslc4j/codegenerator/config/generatePomXml.mtl +++ b/org.eclipse.lyo.oslc4j.codegenerator/src/org/eclipse/lyo/oslc4j/codegenerator/config/generatePomXml.mtl @@ -24,6 +24,14 @@ [import org::eclipse::lyo::oslc4j::codegenerator::services::domainSpecificationServices/] [import org::eclipse::lyo::oslc4j::codegenerator::services::vocabularyServices/] +[query public javaVersion(lyoVersion: String) : String = +(if (lyoVersion.first(1).toInteger() > 5) then + '17' +else + '11' +endif) +/] + [template private projectHeader(name : String, mavenProjectConfiguration : MavenProjectConfiguration, serverImplementation : Boolean)] 4.0.0