Skip to content

Commit 58f040f

Browse files
committed
#1233 Merge branch 'dev_jsonplugin' into master
2 parents c8c7a92 + 705e293 commit 58f040f

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

cobigen/cobigen-jsonplugin/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<artifactId>jsonplugin</artifactId>
44
<name>CobiGen - JSON Plug-in</name>
5-
<version>2.1.0</version>
5+
<version>7.0.0</version>
66
<packaging>jar</packaging>
77
<description>CobiGen - JSON Plug-in</description>
88

@@ -20,12 +20,12 @@
2020
<dependency>
2121
<groupId>com.devonfw.cobigen</groupId>
2222
<artifactId>core-api</artifactId>
23-
<version>5.0.0</version>
23+
<version>[7.0.0,)</version>
2424
</dependency>
2525
<dependency>
2626
<groupId>com.devonfw.cobigen</groupId>
2727
<artifactId>core-test</artifactId>
28-
<version>5.0.0</version>
28+
<version>[7.0.0,)</version>
2929
<scope>test</scope>
3030
</dependency>
3131
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->

cobigen/cobigen-jsonplugin/src/main/java/com/devonfw/cobigen/jsonplugin/JSONPluginActivator.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.List;
44

5+
import com.devonfw.cobigen.api.annotation.Activation;
56
import com.devonfw.cobigen.api.extension.GeneratorPluginActivator;
67
import com.devonfw.cobigen.api.extension.Merger;
78
import com.devonfw.cobigen.api.extension.TriggerInterpreter;
@@ -11,13 +12,20 @@
1112
/**
1213
* JSON Plug-in Activator to be registered in the PluginRegistry of CobiGen.
1314
*/
15+
@Activation(byMergeStrategy = { JSONPluginActivator.JSONMERGE, JSONPluginActivator.JSONMERGE_OVERRIDE })
1416
public class JSONPluginActivator implements GeneratorPluginActivator {
1517

18+
/** JSON merge (prefer patch) */
19+
static final String JSONMERGE_OVERRIDE = "jsonmerge_override";
20+
21+
/** JSON merge (prefer base) */
22+
static final String JSONMERGE = "jsonmerge";
23+
1624
@Override
1725
public List<Merger> bindMerger() {
1826
List<Merger> merger = Lists.newLinkedList();
19-
merger.add(new JSONMerger("jsonmerge", false));
20-
merger.add(new JSONMerger("jsonmerge_override", true));
27+
merger.add(new JSONMerger(JSONMERGE, false));
28+
merger.add(new JSONMerger(JSONMERGE_OVERRIDE, true));
2129
return merger;
2230
}
2331

documentation/master-cobigen.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DISCLAIMER: All Cobigen plugins are compatible with the latest release of Devonf
2323
* CobiGen - TypeScript Plug-in v2.4.4
2424
* CobiGen - Property Plug-in v2.1.0
2525
* CobiGen - Text Merger v2.1.0
26-
* CobiGen - JSON Plug-in v2.1.0
26+
* CobiGen - JSON Plug-in v7.0.0
2727
* CobiGen - HTML Plug-in v2.1.0
2828
* CobiGen - Open API Plug-in v2.4.0
2929
* CobiGen - FreeMaker Template Engine v7.0.0

0 commit comments

Comments
 (0)