This is an automated email from the ASF dual-hosted git repository.
gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-fulcrum-json.git
The following commit(s) were added to refs/heads/master by this push:
new 3ba74c6 Move JSON modules to site 2.0.0, update parent, yaafi,
testcontainer to released versions (13,2.0.1,2.0.1).
3ba74c6 is described below
commit 3ba74c6e7ae4908650b245282d6ee16cb5d98d55
Author: Georg Kallidis <[email protected]>
AuthorDate: Tue Oct 15 17:07:58 2024 +0200
Move JSON modules to site 2.0.0, update parent, yaafi, testcontainer to
released versions (13,2.0.1,2.0.1).
---
NOTICE | 2 +-
api/src/site/site.xml | 28 +++-
.../apache/fulcrum/json/DummyJSONServiceImpl.java | 185 +++++++++++++++++++++
gson/pom.xml | 2 +-
gson/src/site/site.xml | 49 ++++++
gson/{xdocs => src/site/xdoc}/index.xml | 0
jackson/src/site/site.xml | 31 +++-
.../xdocs => jackson/src/site/xdoc}/index.xml | 4 +-
.../main/resources/DefaultJSONComponentConfig.xml | 43 +++++
.../src/main/resources/DefaultJSONRoleConfig.xml | 18 +-
jackson2/src/site/site.xml | 31 +++-
jackson2/{xdocs => src/site/xdoc}/index.xml | 0
pom.xml | 7 +-
src/site/site.xml | 41 ++++-
{xdocs => src/site/xdoc}/index.xml | 0
15 files changed, 405 insertions(+), 36 deletions(-)
diff --git a/NOTICE b/NOTICE
index 1224786..7460d64 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Turbine Fulcrum Json Component
-Copyright 2005-2021 The Apache Software Foundation.
+Copyright 2005-2024 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/api/src/site/site.xml b/api/src/site/site.xml
index 64bccdd..4315717 100644
--- a/api/src/site/site.xml
+++ b/api/src/site/site.xml
@@ -17,13 +17,31 @@
specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/DECORATION/1.4.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0
http://maven.apache.org/xsd/decoration-1.4.0.xsd"
- name="Fulcrum JSON API">
+<site xmlns="http://maven.apache.org/SITE/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0
https://maven.apache.org/xsd/site-2.0.0.xsd"
+ name="Apache Turbine - Fulcrum JSON API" combine.self="override">
+
+ <bannerLeft href="https://turbine.apache.org/">
+ <image src="https://turbine.apache.org/images/turbine-project.png"
alt="Apache Turbine" />
+ </bannerLeft>
+
+ <bannerRight/>
+
+ <publishDate format="dd MMMM yyyy" position="left" />
+ <version position="left" />
+
+ <!-- IMPORTANT Notice: elements like bannerLeft, publishDate, version,
links, skin and custom
+ are redundant after updating to released parent pom v14 which allows
skin inheritance again.
+ -->
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>2.0.0-M11</version>
+ </skin>
+
<body>
<menu ref="reports" inherit="top"></menu>
</body>
-</project>
+</site>
diff --git a/api/src/test/org/apache/fulcrum/json/DummyJSONServiceImpl.java
b/api/src/test/org/apache/fulcrum/json/DummyJSONServiceImpl.java
new file mode 100644
index 0000000..69e15c2
--- /dev/null
+++ b/api/src/test/org/apache/fulcrum/json/DummyJSONServiceImpl.java
@@ -0,0 +1,185 @@
+package org.apache.fulcrum.json;
+
+import java.text.DateFormat;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+
+import org.apache.avalon.framework.activity.Initializable;
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+
+public class DummyJSONServiceImpl extends AbstractLogEnabled implements
JsonService, Initializable, Configurable
+{
+
+ private HashMap<String,String> props;
+
+ @Override
+ public String ser(Object src) throws Exception
+ {
+ return src.toString();
+ }
+
+ @Override
+ public String ser(Object src, Boolean cleanCache) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> String ser(Object src, Class<T> type) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> String ser(Object src, Class<T> type, Boolean cleanCache)
throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T deSer(String src, Class<T> type) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> Collection<T> deSerCollection(String json, Object
collectionType, Class<T> elementType) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T convertWithFilter(Object src, Class<T> type, String...
filterAttrs) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> T convertWithFilter(Object src, String... filterAttrs) throws
Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String serializeOnlyFilter(Object src, String... filterAttr) throws
Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String serializeOnlyFilter(Object src, Boolean cleanFilter,
String... filterAttr) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> String serializeOnlyFilter(Object src, Class<T> filterClass,
String... filterAttr) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> String serializeOnlyFilter(Object src, Class<T> filterClass,
Boolean cleanFilter, String... filterAttr)
+ throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> String serializeAllExceptFilter(Object src, Class<T>
filterClass, Boolean cleanFilter,
+ String... filterAttr) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T> String serializeAllExceptFilter(Object src, Class<T>
filterClass, String... filterAttr) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String serializeAllExceptFilter(Object src, Boolean cleanFilter,
String... filterAttr) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String serializeAllExceptFilter(Object src, String... filterAttr)
throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public JsonService addAdapter(String name, Class target, Class mixin)
throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public JsonService addAdapter(String name, Class target, Object mixin)
throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void setDateFormat(DateFormat df)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void configure(Configuration conf) throws ConfigurationException
+ {
+ getLogger().debug("conf.getName()" + conf.getName());
+ this.props = new HashMap<>();
+
+ final Configuration props = conf.getChild("props", false);
+
+ if (props != null) {
+ Configuration[] nameVal = props.getChildren();
+ Arrays.stream( nameVal).forEach(c->
+ {
+ String key = c.getName();
+ getLogger().debug("configured key: " + key);
+ String val;
+ try {
+ val = c.getValue();
+ getLogger().debug("prop " + key + ":" + val);
+ this.props.put(key, val);
+ } catch (ConfigurationException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ }
+ }
+
+ @Override
+ public void initialize() throws Exception
+ {
+ // TODO Auto-generated method stub
+ }
+
+}
diff --git a/gson/pom.xml b/gson/pom.xml
index acabe80..46374da 100644
--- a/gson/pom.xml
+++ b/gson/pom.xml
@@ -76,7 +76,7 @@
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-yaafi</artifactId>
- <version>2.0.0</version>
+ <version>2.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/gson/src/site/site.xml b/gson/src/site/site.xml
new file mode 100644
index 0000000..7ef9aa5
--- /dev/null
+++ b/gson/src/site/site.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<site xmlns="http://maven.apache.org/SITE/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0
https://maven.apache.org/xsd/site-2.0.0.xsd"
+ name="Apache Turbine - JSON GSON Implementation" combine.self="merge">
+
+ <bannerLeft href="https://turbine.apache.org/">
+ <image src="https://turbine.apache.org/images/turbine-project.png"
alt="Apache Turbine" />
+ </bannerLeft>
+
+ <bannerRight/>
+
+ <publishDate format="dd MMMM yyyy" position="left" />
+ <version position="left" />
+
+ <!-- IMPORTANT Notice: elements like bannerLeft, publishDate, version,
links, skin and custom
+ are redundant after updating to released parent pom v14 which allows
skin inheritance again.
+ -->
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>2.0.0-M11</version>
+ </skin>
+
+<body>
+ <menu name="Overview">
+ <item name="Main" href="/index.html"/>
+ </menu>
+</body>
+
+</site>
diff --git a/gson/xdocs/index.xml b/gson/src/site/xdoc/index.xml
similarity index 100%
rename from gson/xdocs/index.xml
rename to gson/src/site/xdoc/index.xml
diff --git a/jackson/src/site/site.xml b/jackson/src/site/site.xml
index dc82071..e3c633f 100644
--- a/jackson/src/site/site.xml
+++ b/jackson/src/site/site.xml
@@ -17,12 +17,33 @@
specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/DECORATION/1.4.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0
http://maven.apache.org/xsd/decoration-1.4.0.xsd"
- name="Fulcrum JSON Jackson 1 Implementation">
+<site xmlns="http://maven.apache.org/SITE/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0
https://maven.apache.org/xsd/site-2.0.0.xsd"
+ name="Apache Turbine - Fulcrum JSON Jackson1 Service" combine.self="merge">
+
+ <bannerLeft href="https://turbine.apache.org/">
+ <image src="https://turbine.apache.org/images/turbine-project.png"
alt="Apache Turbine" />
+ </bannerLeft>
+
+ <bannerRight/>
+
+ <publishDate format="dd MMMM yyyy" position="left" />
+ <version position="left" />
+
+ <!-- IMPORTANT Notice: elements like bannerLeft, publishDate, version,
links, skin and custom
+ are redundant after updating to released parent pom v14 which allows
skin inheritance again.
+ -->
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>2.0.0-M11</version>
+ </skin>
+
<body>
+ <menu name="Overview">
+ <item name="Main" href="/index.html"/>
+ </menu>
</body>
-</project>
+</site>
diff --git a/jackson2/xdocs/index.xml b/jackson/src/site/xdoc/index.xml
similarity index 83%
copy from jackson2/xdocs/index.xml
copy to jackson/src/site/xdoc/index.xml
index ad54f2e..db5c1d5 100644
--- a/jackson2/xdocs/index.xml
+++ b/jackson/src/site/xdoc/index.xml
@@ -21,14 +21,14 @@
<document>
<properties>
- <title>JSON Component for Jackson 2 JSON processor</title>
+ <title>JSON Component for Jackson 1.x JSON processor</title>
<author email="[email protected]">Georg Kallidis</author>
</properties>
<body>
<section name="Overview">
- <p>This component is to provide a configurable and customized integration
of JSON De-/Serializer <a
href="https://github.com/FasterXML/jackson/wiki">Jackson 2 JSON Processing
APIs</a> into Avalon/Turbine.
+ <p>This component is to provide a configurable and customized integration
of JSON De-/Serializer Jackson 1.x JSON Processing APIs into Avalon/Turbine.
</p>
</section>
diff --git a/jackson2/src/main/resources/DefaultJSONComponentConfig.xml
b/jackson2/src/main/resources/DefaultJSONComponentConfig.xml
new file mode 100644
index 0000000..cc7abc7
--- /dev/null
+++ b/jackson2/src/main/resources/DefaultJSONComponentConfig.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<componentConfig>
+ <json>
+ <annotationInspectors>
+
<primary>org.apache.fulcrum.json.jackson.SimpleNameIntrospector</primary>
+
<secondary>com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector</secondary>
+ <features>
+ <feature value="false"
type="com.fasterxml.jackson.databind.SerializationFeature">FAIL_ON_EMPTY_BEANS</feature>
+ <feature value="false"
type="com.fasterxml.jackson.databind.DeserializationFeature">EAGER_DESERIALIZER_FETCH</feature>
+ <!-- do not fail of only getter is provided -->
+ <feature value="false"
type="com.fasterxml.jackson.databind.DeserializationFeature">FAIL_ON_UNKNOWN_PROPERTIES</feature>
+ <feature value="false"
type="com.fasterxml.jackson.databind.MapperFeature">ALLOW_FINAL_FIELDS_AS_MUTATORS</feature>
+ <feature value="true"
type="com.fasterxml.jackson.core.JsonParser">ALLOW_UNQUOTED_FIELD_NAMES</feature>
+ <!-- feature
value="true">com.fasterxml.jackson.databind.SerializationFeature.INDENT_OUTPUT</feature-->
+ </features>
+ </annotationInspectors>
+ <dateFormat>MM/dd/yyyy</dateFormat>
+ <escapeCharsGlobal>true</escapeCharsGlobal>
+ <!-- defaultTyping type="NON_FINAL" key="type"/--><!-- or
OBJECT_AND_NON_CONCRETE -->
+ <!-- cacheFilters>false</cacheFilters-->
+ <!-- escapeCharsClass>net.example.EscapeCharClass</escapeCharsClass
-->
+ <useJsonPath>true</useJsonPath>
+ </json>
+</componentConfig>
diff --git a/src/site/site.xml
b/jackson2/src/main/resources/DefaultJSONRoleConfig.xml
similarity index 72%
copy from src/site/site.xml
copy to jackson2/src/main/resources/DefaultJSONRoleConfig.xml
index f0ed718..25b6810 100644
--- a/src/site/site.xml
+++ b/jackson2/src/main/resources/DefaultJSONRoleConfig.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,16 +17,12 @@
specific language governing permissions and limitations
under the License.
-->
-<project name="Fulcrum JSON Component Service">
->
-
- <body>
- <menu name="Overview" inherit="top">
- <item name="Main" href="index.html"
collapse="false"/>
- </menu>
- <menu ref="modules" />
+<role-list>
- </body>
+ <role
+ name="org.apache.fulcrum.json.JsonService"
+ shorthand="json"
+ default-class="org.apache.fulcrum.json.jackson.Jackson2MapperService"/>
-</project>
+</role-list>
diff --git a/jackson2/src/site/site.xml b/jackson2/src/site/site.xml
index 0fc6646..fa72b18 100644
--- a/jackson2/src/site/site.xml
+++ b/jackson2/src/site/site.xml
@@ -17,12 +17,33 @@
specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/DECORATION/1.4.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0
http://maven.apache.org/xsd/decoration-1.4.0.xsd"
- name="Fulcrum JSON Jackson2 Implementation">
+
+<site xmlns="http://maven.apache.org/SITE/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0
https://maven.apache.org/xsd/site-2.0.0.xsd"
+ name="Apache Turbine - JSON Jackson2 Implementation" combine.self="merge">
+
+ <bannerLeft href="https://turbine.apache.org/">
+ <image src="https://turbine.apache.org/images/turbine-project.png"
alt="Apache Turbine" />
+ </bannerLeft>
+
+ <bannerRight/>
+
+ <publishDate format="dd MMMM yyyy" position="left" />
+ <version position="left" />
+
+ <!-- IMPORTANT Notice: elements like bannerLeft, publishDate, version,
links, skin and custom
+ are redundant after updating to released parent pom v14 which allows
skin inheritance again.
+ -->
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>2.0.0-M11</version>
+ </skin>
<body>
+ <menu name="Overview">
+ <item name="Main" href="/index.html"/>
+ </menu>
</body>
-</project>
+</site>
diff --git a/jackson2/xdocs/index.xml b/jackson2/src/site/xdoc/index.xml
similarity index 100%
rename from jackson2/xdocs/index.xml
rename to jackson2/src/site/xdoc/index.xml
diff --git a/pom.xml b/pom.xml
index 485a2c6..ba26275 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>turbine-parent</artifactId>
<groupId>org.apache.turbine</groupId>
- <version>13-SNAPSHOT</version>
+ <version>13</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -29,6 +29,7 @@
<artifactId>fulcrum-json-parent</artifactId>
<version>2.0.2-SNAPSHOT</version>
<packaging>pom</packaging>
+
<name>Fulcrum JSON Master Build</name>
<url>http://turbine.apache.org/fulcrum/fulcrum-json/</url>
<scm>
@@ -141,13 +142,13 @@
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-testcontainer</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-yaafi</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.1</version>
<scope>test</scope>
</dependency>
<!-- Log4j2 should be used by default, removed optional -->
diff --git a/src/site/site.xml b/src/site/site.xml
index f0ed718..426ef01 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -17,8 +17,28 @@
specific language governing permissions and limitations
under the License.
-->
-<project name="Fulcrum JSON Component Service">
->
+<site xmlns="http://maven.apache.org/SITE/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0
https://maven.apache.org/xsd/site-2.0.0.xsd"
+ name="Apache Turbine - Fulcrum JSON Component Service" combine.self="merge">
+
+ <bannerLeft href="https://turbine.apache.org/">
+ <image src="https://turbine.apache.org/images/turbine-project.png"
alt="Apache Turbine" />
+ </bannerLeft>
+
+ <bannerRight/>
+
+ <publishDate format="dd MMMM yyyy" position="left" />
+ <version position="left" />
+
+ <!-- IMPORTANT Notice: elements like bannerLeft, publishDate, version,
links, skin and custom
+ are redundant after updating to released parent pom v14 which allows
skin inheritance again.
+ -->
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>2.0.0-M11</version>
+ </skin>
+
<body>
<menu name="Overview" inherit="top">
@@ -28,5 +48,20 @@
<menu ref="modules" />
</body>
+
+ <custom>
+ <fluidoSkin>
+ <topBarEnabled>false</topBarEnabled>
+ <sideBarEnabled>true</sideBarEnabled>
+ <googleSearch>
+ <sitesearch>${project.url}</sitesearch>
+ </googleSearch>
+ <gitHub>
+ <projectId>apache/${turbine.site.path}</projectId>
+ <ribbonOrientation>right</ribbonOrientation>
+ <ribbonColor>gray</ribbonColor>
+ </gitHub>
+ </fluidoSkin>
+ </custom>
-</project>
+</site>
diff --git a/xdocs/index.xml b/src/site/xdoc/index.xml
similarity index 100%
rename from xdocs/index.xml
rename to src/site/xdoc/index.xml