This is an automated email from the ASF dual-hosted git repository.

sgoeschl pushed a commit to branch FREEMARKER-172
in repository https://gitbox.apache.org/repos/asf/freemarker-generator.git

commit e818ab3d3df95368b085e560af855c4b802f104d
Author: Siegfried Goeschl <[email protected]>
AuthorDate: Fri Feb 5 19:28:18 2021 +0100

    FREEMARKER-172 [freemarker-generator] Cleanup of changes
---
 freemarker-generator-cli/CHANGELOG.md                   | 17 ++++++++++-------
 .../generator/cli/config/ConfigurationSupplier.java     |  4 ++--
 .../freemarker/generator/cli/task/FreeMarkerTask.java   |  2 +-
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/freemarker-generator-cli/CHANGELOG.md 
b/freemarker-generator-cli/CHANGELOG.md
index 6565367..757caf0 100644
--- a/freemarker-generator-cli/CHANGELOG.md
+++ b/freemarker-generator-cli/CHANGELOG.md
@@ -5,9 +5,9 @@ All notable changes to this project will be documented in this 
file. We try to a
 ## 0.1.0-SNAPSHOT
 
 ### Added
-* Parse list of `DataSources` for the various tools
+* Parse a list of `DataSources` for the various tools
+* [FREEMARKER-161] Allow multiple transformations on the CLI
 * [FREEMARKER-163] Integrate Java Faker library for test data generation
-* [FREEMARKER-148] Make usage of "DataSources" more "Freemarker" like
 * [FREEMARKER-149] Support multiple template transformations on the command 
line
 * [FREEMARKER-144] Proof Of Concept for providing DataFrames
 * [FREEMARKER-142] Support Transformation Of Directories
@@ -17,30 +17,31 @@ All notable changes to this project will be documented in 
this file. We try to a
 * [FREEMARKER-129] Support `DataSource` exclude pattern in addition to include 
pattern
 * [FREEMARKER-129] User-defined parameters are passed as `-Pkey=value` instead 
of using system properties
 * [FREEMARKER-129] Migrate `freemarker-cli` into `freemarker-generator` 
project (see 
[https://github.com/sgoeschl/freemarker-cli](https://github.com/sgoeschl/freemarker-cli))
+* [FREEMARKER-129] Provide a `toString()` method for all tools
 
 ### Changed
-* [FREEMARKER-161] Allow multiple transformations on the CLI
-* [FREEMARKER-155] Migrate the FTL code to terser dotter form 
+* [FREEMARKER-148] Make usage of "DataSources" more "Freemarker" like
+* [FREEMARKER-155] Migrate the FTL code to terser dotter form
 * [FREEMARKER-153] Packaged templates are now prefixed with 
`freemarker-generator`, e.g. `freemarker-generator/info.ftl`
 * [FREEMARKER-153] Renamed `--basedir` command line option to `--template-dir`
 * [FREEMARKER-153] Renamed `freemarker-cli` to `freemarker-generator`
-* Removing `DataSources.first` and use `dataSources.get(0)` instead
 * [FREEMARKER-146] Cleanly separate example templates and data from 
user-supplied content
 * `DataSource` use `uri` instead of `location`
 * [FREEMARKER-138] freemarker-generator: Rename `Datasource` to `DataSource`
 * [FREEMARKER-136] Fix broken `site:stage` build
 * [FREEMARKER-134] Rename `Document` to `Datasource` which also changes 
`--document` to `--datasource`
 * [FREEMARKER-129] Use `freemarker.configuration.setting` in 
`freemarker-cli.properties` to configure FreeMarker
-* [FREEMARKER-129] Provide a `toString()` method for all tools
 * [FREEMARKER-129] Use version "0.X.Y" to cater for API changes according to 
[Semantic Versioning](https://semver.org)
 
 ### Fixed
+* [FREEMARKER-156] The Maven plugin unit tests failed randomly
 * [FREEMARKER-153] Configuration files are bootstrapped from "app.home" system 
property 
 * [FREEMARKER-151] Ensure that build and and examples are running on Windows
 * [FREEMARKER-147] Complete Maven site documentation
 * [FREEMARKER-127] Site build fails with missing 
"org/apache/maven/doxia/siterenderer/DocumentContent"
 
 ### Internal
+* [FREEMARKER-172] Refactor DataSourceFactory
 * [FREEMARKER-164] Use default unsafe FreeMarker configuration
 * [FREEMARKER-153] FreeMarker Generator release preparations
 * [FREEMARKER-168] Upgrade dependencies of freemarker-generator
@@ -62,7 +63,9 @@ All notable changes to this project will be documented in 
this file. We try to a
 [FREEMARKER-151]: https://issues.apache.org/jira/browse/FREEMARKER-151
 [FREEMARKER-153]: https://issues.apache.org/jira/browse/FREEMARKER-153
 [FREEMARKER-155]: https://issues.apache.org/jira/browse/FREEMARKER-155
+[FREEMARKER-156]: https://issues.apache.org/jira/browse/FREEMARKER-156
 [FREEMARKER-161]: https://issues.apache.org/jira/browse/FREEMARKER-161
 [FREEMARKER-163]: https://issues.apache.org/jira/browse/FREEMARKER-163
 [FREEMARKER-164]: https://issues.apache.org/jira/browse/FREEMARKER-164
-[FREEMARKER-168]: https://issues.apache.org/jira/browse/FREEMARKER-168
\ No newline at end of file
+[FREEMARKER-168]: https://issues.apache.org/jira/browse/FREEMARKER-168
+[FREEMARKER-172]: https://issues.apache.org/jira/browse/FREEMARKER-172
diff --git 
a/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/config/ConfigurationSupplier.java
 
b/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/config/ConfigurationSupplier.java
index 9c165a3..d936970 100644
--- 
a/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/config/ConfigurationSupplier.java
+++ 
b/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/config/ConfigurationSupplier.java
@@ -55,8 +55,8 @@ public class ConfigurationSupplier implements 
Supplier<Configuration> {
             // apply all "freemarker.configuration.setting" values
             configuration.setSettings(freeMarkerConfigurationSettings());
 
-            // TODO sgoeschl 2021-02-05 Probably not needed at all
-            // configuration.setObjectWrapper(new 
"dataSources"(FREEMARKER_VERSION));
+            // TODO sgoeschl 2021-02-05 Probably not needed at all since we 
use the map of data source
+            configuration.setObjectWrapper(new 
GeneratorObjectWrapper(FREEMARKER_VERSION));
 
             // override current configuration with caller-provided settings
             
configuration.setDefaultEncoding(settings.getTemplateEncoding().name());
diff --git 
a/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/task/FreeMarkerTask.java
 
b/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/task/FreeMarkerTask.java
index d202786..1fe6f57 100644
--- 
a/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/task/FreeMarkerTask.java
+++ 
b/freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/task/FreeMarkerTask.java
@@ -116,7 +116,7 @@ public class FreeMarkerTask implements Callable<Integer> {
     private static Map<String, Object> toTemplateDataModel(DataSources 
dataSources, Map<String, Object>... maps) {
         final Map<String, Object> result = new HashMap<>();
         Arrays.stream(maps).forEach(result::putAll);
-        result.put(Model.DATASOURCES, dataSources.toMap());
+        result.put(Model.DATASOURCES, dataSources);
         return result;
     }
 

Reply via email to