From 1567e459e90e609ff3d3205d71096092a11606a4 Mon Sep 17 00:00:00 2001 From: "Textor Andreas (BCI/ESW17)" Date: Tue, 24 Oct 2023 11:21:09 +0200 Subject: [PATCH 1/3] Fix Velocity deprecated properties warnings --- .../AspectModelDocumentationGenerator.java | 45 ++++++++++--------- .../aspectmodel/generator/TemplateEngine.java | 2 +- .../StaticMetaModelJavaArtifactGenerator.java | 13 +++--- .../EnumerationJavaArtifactGenerator.java | 19 ++++---- ...StructureElementJavaArtifactGenerator.java | 5 ++- 5 files changed, 45 insertions(+), 39 deletions(-) diff --git a/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGenerator.java b/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGenerator.java index f126f9da4..8e0cf8056 100644 --- a/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGenerator.java +++ b/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGenerator.java @@ -30,13 +30,8 @@ import java.util.function.Predicate; import org.eclipse.esmf.aspectmodel.generator.AbstractGenerator; -import org.eclipse.esmf.aspectmodel.generator.I18nLanguageBundle; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.io.CharStreams; - import org.eclipse.esmf.aspectmodel.generator.AspectModelHelper; +import org.eclipse.esmf.aspectmodel.generator.I18nLanguageBundle; import org.eclipse.esmf.aspectmodel.generator.LanguageCollector; import org.eclipse.esmf.aspectmodel.generator.TemplateEngine; import org.eclipse.esmf.aspectmodel.generator.diagram.AspectModelDiagramGenerator; @@ -46,6 +41,11 @@ import org.eclipse.esmf.metamodel.Scalar; import org.eclipse.esmf.metamodel.visitor.AspectStreamTraversalVisitor; +import com.google.common.io.CharStreams; +import org.apache.velocity.runtime.RuntimeConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * Asciidoc generator for a aspect model. */ @@ -93,27 +93,30 @@ public AspectModelDocumentationGenerator( final String language, final AspectCon * (e.g., "FooAspect_en") via the callback function. The caller needs to provide an {@link OutputStream} * for the respective artifact, e.g. a suitable FileOutputStream. * - * @param nameMapper The callback function that maps documentation artifact names to OutputStreams + * @param nameMapper The callback function that maps documentation artifact names to OutputStreams * @param generationOptions Additional optional options that control the document generation. See {@link - * HtmlGenerationOption} for the usable keys. + * HtmlGenerationOption} for the usable keys. * @throws IOException when serialization or deserialization fails */ - public void generate( final Function nameMapper, final Map generationOptions ) throws IOException { + public void generate( final Function nameMapper, final Map generationOptions ) + throws IOException { final BufferingNameMapper bufferingMapper = new BufferingNameMapper(); generateHtmlDocu( bufferingMapper, Format.NONE ); generateInternal( nameMapper, generationOptions, bufferingMapper ); } /** - * Generates HTML documentation for Aspect Models. This version generates the document only for the language explicitly requested by the user. + * Generates HTML documentation for Aspect Models. This version generates the document only for the language explicitly requested by the + * user. * - * @param nameMapper The callback function that maps documentation artifact names to OutputStreams + * @param nameMapper The callback function that maps documentation artifact names to OutputStreams * @param generationOptions Additional optional options that control the document generation. See {@link - * HtmlGenerationOption} for the usable keys. - * @param language The language for which a document should be generated + * HtmlGenerationOption} for the usable keys. + * @param language The language for which a document should be generated * @throws IOException when serialization or deserialization fails */ - public void generate( final Function nameMapper, final Map generationOptions, final Locale language ) + public void generate( final Function nameMapper, final Map generationOptions, + final Locale language ) throws IOException { final BufferingNameMapper bufferingMapper = new BufferingNameMapper(); generateHtmlDocu( bufferingMapper, Format.NONE, language ); @@ -126,12 +129,13 @@ public void generate( final Function nameMapper, final Map * (e.g., "FooAspect_en") via the callback function. The caller needs to provide an {@link OutputStream} * for the respective artifact, e.g. a suitable FileOutputStream. * - * @param nameMapper The callback function that maps documentation artifact names to OutputStreams + * @param nameMapper The callback function that maps documentation artifact names to OutputStreams * @param generationOptions Additional optional options that control the document generation. See {@link - * HtmlGenerationOption} for the usable keys. + * HtmlGenerationOption} for the usable keys. * @throws IOException when serialization or deserialization fails */ - private void generateInternal( final Function nameMapper, final Map generationOptions, + private void generateInternal( final Function nameMapper, + final Map generationOptions, final BufferingNameMapper bufferingMapper ) throws IOException { for ( final Map.Entry entry : bufferingMapper.artifacts.entrySet() ) { final String artifactName = entry.getKey(); @@ -177,9 +181,9 @@ private void generateHtmlDocu( final Function nameMapper, configuration.put( "aspectModelHelper", new AspectModelHelper( context.aspect().getMetaModelVersion() ) ); final Properties engineConfiguration = new Properties(); - engineConfiguration.put( "file.resource.loader.path", ".," + DOCU_TEMPLATE_ROOT_DIR + "/html" ); + engineConfiguration.put( RuntimeConstants.FILE_RESOURCE_LOADER_PATH, ".," + DOCU_TEMPLATE_ROOT_DIR + "/html" ); engineConfiguration.put( "event_handler.reference_insertion.class", "org.apache.velocity.app.event.implement.EscapeHtmlReference" ); - engineConfiguration.put( "velocimacro.library", + engineConfiguration.put( RuntimeConstants.VM_LIBRARY, DOCU_TEMPLATE_ROOT_DIR + "/html/characteristic-documentation-lib.vm," + DOCU_TEMPLATE_ROOT_DIR + "/html/constraint-documentation-lib.vm," + DOCU_TEMPLATE_ROOT_DIR + "/html/diagram-documentation-lib.vm," + @@ -188,7 +192,8 @@ private void generateHtmlDocu( final Function nameMapper, DOCU_TEMPLATE_ROOT_DIR + "/html/property-documentation-lib.vm," + DOCU_TEMPLATE_ROOT_DIR + "/html/common-documentation-lib.vm" ); - final Predicate byLanguage = locale -> selectedLanguage == null || locale.getLanguage().equals( selectedLanguage.getLanguage() ); + final Predicate byLanguage = locale -> selectedLanguage == null || locale.getLanguage() + .equals( selectedLanguage.getLanguage() ); languages.stream().filter( byLanguage ).forEach( language -> { logMissingTranslations( context.aspect(), language ); diff --git a/core/esmf-aspect-model-generator/src/main/java/org/eclipse/esmf/aspectmodel/generator/TemplateEngine.java b/core/esmf-aspect-model-generator/src/main/java/org/eclipse/esmf/aspectmodel/generator/TemplateEngine.java index 8dfbecfd4..87382463a 100644 --- a/core/esmf-aspect-model-generator/src/main/java/org/eclipse/esmf/aspectmodel/generator/TemplateEngine.java +++ b/core/esmf-aspect-model-generator/src/main/java/org/eclipse/esmf/aspectmodel/generator/TemplateEngine.java @@ -44,7 +44,7 @@ public class TemplateEngine implements UnaryOperator { public TemplateEngine( final Map context, final Properties engineConfiguration ) { this( new VelocityEngine(), context ); engine.setProperty( RuntimeConstants.RESOURCE_LOADERS, "classpath, file" ); - engine.setProperty( "classpath.resource.loader.class", ClasspathResourceLoader.class.getName() ); + engine.setProperty( "resource.loader.classpath.class", ClasspathResourceLoader.class.getName() ); engine.setProperties( engineConfiguration ); engine.init(); } diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/metamodel/StaticMetaModelJavaArtifactGenerator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/metamodel/StaticMetaModelJavaArtifactGenerator.java index 83114e85d..1d68c5432 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/metamodel/StaticMetaModelJavaArtifactGenerator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/metamodel/StaticMetaModelJavaArtifactGenerator.java @@ -26,9 +26,6 @@ import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.DatatypeFactory; -import org.apache.commons.text.StringEscapeUtils; -import org.apache.jena.rdf.model.ResourceFactory; -import org.apache.jena.vocabulary.XSD; import org.eclipse.esmf.aspectmodel.generator.ArtifactGenerator; import org.eclipse.esmf.aspectmodel.generator.TemplateEngine; import org.eclipse.esmf.aspectmodel.java.AspectModelJavaUtil; @@ -104,10 +101,14 @@ import org.eclipse.esmf.staticmetamodel.constraint.StaticConstraintContainerProperty; import org.eclipse.esmf.staticmetamodel.constraint.StaticConstraintProperty; import org.eclipse.esmf.staticmetamodel.constraint.StaticConstraintUnitProperty; -import org.jboss.forge.roaster.Roaster; import com.google.common.base.CharMatcher; import com.google.common.collect.ImmutableMap; +import org.apache.commons.text.StringEscapeUtils; +import org.apache.jena.rdf.model.ResourceFactory; +import org.apache.jena.vocabulary.XSD; +import org.apache.velocity.runtime.RuntimeConstants; +import org.jboss.forge.roaster.Roaster; /** * A {@link ArtifactGenerator} that generates static meta classes @@ -223,8 +224,8 @@ public JavaArtifact apply( final E element, final JavaCodeGenerationConfig confi final Properties engineConfiguration = new Properties(); if ( config.executeLibraryMacros() ) { - engineConfiguration.put( "velocimacro.library", config.templateLibFile().getName() ); - engineConfiguration.put( "file.resource.loader.path", config.templateLibFile().getParent() ); + engineConfiguration.put( RuntimeConstants.VM_LIBRARY, config.templateLibFile().getName() ); + engineConfiguration.put( RuntimeConstants.FILE_RESOURCE_LOADER_PATH, config.templateLibFile().getParent() ); } final String generatedSource = new TemplateEngine( context, engineConfiguration ).apply( "java-static-class" ); diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/EnumerationJavaArtifactGenerator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/EnumerationJavaArtifactGenerator.java index aeef9f189..62bb72bcf 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/EnumerationJavaArtifactGenerator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/EnumerationJavaArtifactGenerator.java @@ -25,20 +25,19 @@ import org.eclipse.esmf.aspectmodel.java.ImportTracker; import org.eclipse.esmf.aspectmodel.java.JavaArtifact; import org.eclipse.esmf.aspectmodel.java.JavaCodeGenerationConfig; +import org.eclipse.esmf.aspectmodel.java.exception.CodeGenerationException; import org.eclipse.esmf.aspectmodel.java.exception.EnumAttributeNotFoundException; -import org.jboss.forge.roaster.Roaster; +import org.eclipse.esmf.characteristic.Enumeration; +import org.eclipse.esmf.characteristic.State; +import org.eclipse.esmf.metamodel.Entity; +import org.eclipse.esmf.metamodel.Scalar; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.collect.ImmutableMap; - -import org.eclipse.esmf.aspectmodel.java.exception.CodeGenerationException; - -import org.eclipse.esmf.metamodel.Entity; -import org.eclipse.esmf.characteristic.Enumeration; -import org.eclipse.esmf.metamodel.Scalar; -import org.eclipse.esmf.characteristic.State; +import org.apache.velocity.runtime.RuntimeConstants; +import org.jboss.forge.roaster.Roaster; /** * A {@link ArtifactGenerator} that generates Java Pojo code @@ -73,8 +72,8 @@ public JavaArtifact apply( final E element, final JavaCodeGenerationConfig confi try { final Properties engineConfiguration = new Properties(); if ( config.executeLibraryMacros() ) { - engineConfiguration.put( "velocimacro.library", config.templateLibFile().getName() ); - engineConfiguration.put( "file.resource.loader.path", config.templateLibFile().getParent() ); + engineConfiguration.put( RuntimeConstants.VM_LIBRARY, config.templateLibFile().getName() ); + engineConfiguration.put( RuntimeConstants.FILE_RESOURCE_LOADER_PATH, config.templateLibFile().getParent() ); } final String generatedSource = new TemplateEngine( context, engineConfiguration ).apply( "java-enumeration" ); diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java index 5899ab6d4..ed84d64f6 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java @@ -55,6 +55,7 @@ import org.apache.jena.rdf.model.ResourceFactory; import org.apache.jena.vocabulary.XSD; import org.apache.velocity.app.FieldMethodizer; +import org.apache.velocity.runtime.RuntimeConstants; import org.jboss.forge.roaster.Roaster; /** @@ -126,8 +127,8 @@ public JavaArtifact apply( final E element, final JavaCodeGenerationConfig confi final Properties engineConfiguration = new Properties(); if ( config.executeLibraryMacros() ) { - engineConfiguration.put( "velocimacro.library", config.templateLibFile().getName() ); - engineConfiguration.put( "file.resource.loader.path", config.templateLibFile().getParent() ); + engineConfiguration.put( RuntimeConstants.VM_LIBRARY, config.templateLibFile().getName() ); + engineConfiguration.put( RuntimeConstants.FILE_RESOURCE_LOADER_PATH, config.templateLibFile().getParent() ); } final String generatedSource = new TemplateEngine( context, engineConfiguration ).apply( "java-pojo" ); From 0adf7d8d32e5452a76c2696fce3246b7ba0d9b80 Mon Sep 17 00:00:00 2001 From: "Textor Andreas (BCI/ESW17)" Date: Tue, 24 Oct 2023 11:23:47 +0200 Subject: [PATCH 2/3] Remove writing unnecessary HTML files from docu generation tests --- ...AspectModelDocumentationGeneratorTest.java | 35 ++++++++----------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java index 0977e096e..e69bd8a94 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java @@ -16,10 +16,7 @@ import static org.assertj.core.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileWriter; import java.io.IOException; import java.io.PrintStream; import java.nio.charset.StandardCharsets; @@ -53,13 +50,8 @@ public void testGeneration( final TestAspect testAspect ) { @ParameterizedTest @MethodSource( "allVersions" ) public void testAspectWithEntityCollection( final KnownVersion metaModelVersion ) throws Throwable { - final File target = new File( "target", "AspectWithEntityCollection.html" ); final String htmlResult = generateHtmlDocumentation( TestAspect.ASPECT_WITH_ENTITY_COLLECTION, metaModelVersion ); - try ( final BufferedWriter writer = new BufferedWriter( new FileWriter( target ) ) ) { - writer.write( htmlResult ); - writer.flush(); - } assertThat( htmlResult ).isNotEmpty(); assertThat( htmlResult ).contains( "

Aspect Model Test Aspect

" ); assertThat( htmlResult ).contains( @@ -71,13 +63,8 @@ public void testAspectWithEntityCollection( final KnownVersion metaModelVersion @ParameterizedTest @MethodSource( "allVersions" ) public void testAspectWithCollectionOfSimpleType( final KnownVersion metaModelVersion ) throws Throwable { - final File target = new File( "target", "AspectWithCollectionOfSimpleType.html" ); final String htmlResult = generateHtmlDocumentation( TestAspect.ASPECT_WITH_COLLECTION_OF_SIMPLE_TYPE, metaModelVersion ); - try ( final BufferedWriter writer = new BufferedWriter( new FileWriter( target ) ) ) { - writer.write( htmlResult ); - writer.flush(); - } assertThat( htmlResult ).isNotEmpty(); assertThat( htmlResult ).contains( "

Aspect Model AspectWithCollectionOfSimpleType

" ); assertThat( htmlResult ).contains( @@ -154,9 +141,11 @@ public void testDocumentationIsNotEmptyForModelWithoutLanguageTags( final KnownV public void testAspectWithAbstractSingleEntityExpectSuccess( final KnownVersion metaModelVersion ) throws IOException { final String documentation = generateHtmlDocumentation( TestAspect.ASPECT_WITH_ABSTRACT_SINGLE_ENTITY, metaModelVersion ); assertThat( documentation ).contains( - "

testProperty

" ); + "

testProperty" ); assertThat( documentation ).contains( - "

abstractTestProperty
" ); + "
abstractTestProperty" + + "
" ); assertThat( documentation ).contains( "
entityProperty
" ); } @@ -168,7 +157,8 @@ public void testAspectWithAbstractEntityExpectSuccess( final KnownVersion metaMo assertThat( documentation ).contains( "

Test Property

" ); assertThat( documentation ).contains( - "
abstractTestProperty
" ); + "
abstractTestProperty" + + "
" ); assertThat( documentation ).contains( "
Entity Property
" ); } @@ -178,9 +168,11 @@ public void testAspectWithAbstractEntityExpectSuccess( final KnownVersion metaMo public void testAspectWithCollectionWithAbstractEntityExpectSuccess( final KnownVersion metaModelVersion ) throws IOException { final String documentation = generateHtmlDocumentation( TestAspect.ASPECT_WITH_COLLECTION_WITH_ABSTRACT_ENTITY, metaModelVersion ); assertThat( documentation ).contains( - "

testProperty

" ); + "

testProperty

" ); assertThat( documentation ).contains( - "
abstractTestProperty
" ); + "
abstractTestProperty" + + "
" ); assertThat( documentation ).contains( "
entityProperty
" ); } @@ -199,11 +191,12 @@ public void testAspectWithQuantifiableWithoutUnit( final KnownVersion metaModelV public void testAspectWithConstraintWithSeeAttribute( final KnownVersion metaModelVersion ) throws IOException { final String documentation = generateHtmlDocumentation( TestAspect.ASPECT_WITH_CONSTRAINT_WITH_SEE_ATTRIBUTE, metaModelVersion ); assertThat( documentation ).contains( - "

testPropertyTwo

" ); + "

testPropertyTwo

" ); assertThat( documentation ).contains( - "
Trait
" ); + "
Trait
" ); assertThat( documentation ).contains( - "
  • http://example.com/me2
  • " ); + "
  • http://example.com/me2
  • " ); } private String generateHtmlDocumentation( final TestAspect model, final KnownVersion testedVersion ) throws IOException { From 6bc00d64982fc302227db721bdea66bc85ae529e Mon Sep 17 00:00:00 2001 From: "Textor Andreas (BCI/ESW17)" Date: Tue, 24 Oct 2023 11:24:43 +0200 Subject: [PATCH 3/3] Fix rendering of example values in generated HTML Fixes #323 --- .../html/property-documentation-lib.vm | 4 ++-- .../AspectModelDocumentationGeneratorTest.java | 9 +++++---- .../samm-cli/reflect-config.json | 18 ++++++++++++++++++ .../java/org/eclipse/esmf/SammCliTest.java | 2 ++ 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/core/esmf-aspect-model-document-generators/src/main/resources/docu/templates/html/property-documentation-lib.vm b/core/esmf-aspect-model-document-generators/src/main/resources/docu/templates/html/property-documentation-lib.vm index fd1917ff3..d9a401c3d 100644 --- a/core/esmf-aspect-model-document-generators/src/main/resources/docu/templates/html/property-documentation-lib.vm +++ b/core/esmf-aspect-model-document-generators/src/main/resources/docu/templates/html/property-documentation-lib.vm @@ -43,7 +43,7 @@ #end - #if( !$property.isAbstract() && $property.getCharacteristic().get() ) + #if( !$property.isAbstract() && $property.getCharacteristic().isPresent() )
    $i18n.getText( "docu.label.characteristic" )
    @@ -52,7 +52,7 @@
    #end - #if( $property.getExampleValue() ) + #if( $property.getExampleValue().isPresent() )
    $i18n.getText( "docu.label.example" )
    $property.getExampleValue().get().getValue()
    diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java index e69bd8a94..b310755f4 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/docu/AspectModelDocumentationGeneratorTest.java @@ -13,7 +13,8 @@ package org.eclipse.esmf.aspectmodel.generator.docu; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatCode; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import java.io.ByteArrayOutputStream; @@ -37,13 +38,13 @@ public class AspectModelDocumentationGeneratorTest extends MetaModelVersions { @ParameterizedTest - @EnumSource( value = TestAspect.class, mode = EnumSource.Mode.EXCLUDE, - names = { "MODEL_WITH_CYCLES" // contains cycles, the calculation of used languages would run into an infinite loop - } ) + @EnumSource( value = TestAspect.class ) public void testGeneration( final TestAspect testAspect ) { assertThatCode( () -> { final String html = generateHtmlDocumentation( testAspect, KnownVersion.getLatest() ); assertThat( html ).doesNotContain( "UnnamedCharacteristic" ); + // No unresolved template variables + assertThat( html ).doesNotContainPattern( "$[a-zA-Z]" ); } ).doesNotThrowAnyException(); } diff --git a/tools/samm-cli/src/main/resources/META-INF/native-image/org.eclipse.esmf/samm-cli/reflect-config.json b/tools/samm-cli/src/main/resources/META-INF/native-image/org.eclipse.esmf/samm-cli/reflect-config.json index ed68959ca..57356acca 100644 --- a/tools/samm-cli/src/main/resources/META-INF/native-image/org.eclipse.esmf/samm-cli/reflect-config.json +++ b/tools/samm-cli/src/main/resources/META-INF/native-image/org.eclipse.esmf/samm-cli/reflect-config.json @@ -1,4 +1,22 @@ [ +{ + "name": "org.eclipse.esmf.metamodel.impl.DefaultScalarValue", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name": "org.eclipse.esmf.metamodel.impl.DefaultProperty", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"org.eclipse.esmf.metamodel.loader.DefaultPropertyWrapper", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, { "name":"sun.awt.X11.XToolkit", "allDeclaredFields":true, diff --git a/tools/samm-cli/src/test/java/org/eclipse/esmf/SammCliTest.java b/tools/samm-cli/src/test/java/org/eclipse/esmf/SammCliTest.java index cad0ace60..e71819b60 100644 --- a/tools/samm-cli/src/test/java/org/eclipse/esmf/SammCliTest.java +++ b/tools/samm-cli/src/test/java/org/eclipse/esmf/SammCliTest.java @@ -303,6 +303,7 @@ public void testAspectToHtmlWithGivenLanguageToFile() { public void testAspectToHtmlToStdout() { final ExecutionResult result = sammCli.runAndExpectSuccess( "--disable-color", "aspect", defaultInputFile, "to", "html" ); assertThat( result.stdout() ).contains( "