Skip to content

Commit

Permalink
#1233 Merge branch 'dev_jsonplugin' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeec committed Sep 14, 2020
2 parents c8c7a92 + 705e293 commit 58f040f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cobigen/cobigen-jsonplugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jsonplugin</artifactId>
<name>CobiGen - JSON Plug-in</name>
<version>2.1.0</version>
<version>7.0.0</version>
<packaging>jar</packaging>
<description>CobiGen - JSON Plug-in</description>

Expand All @@ -20,12 +20,12 @@
<dependency>
<groupId>com.devonfw.cobigen</groupId>
<artifactId>core-api</artifactId>
<version>5.0.0</version>
<version>[7.0.0,)</version>
</dependency>
<dependency>
<groupId>com.devonfw.cobigen</groupId>
<artifactId>core-test</artifactId>
<version>5.0.0</version>
<version>[7.0.0,)</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.List;

import com.devonfw.cobigen.api.annotation.Activation;
import com.devonfw.cobigen.api.extension.GeneratorPluginActivator;
import com.devonfw.cobigen.api.extension.Merger;
import com.devonfw.cobigen.api.extension.TriggerInterpreter;
Expand All @@ -11,13 +12,20 @@
/**
* JSON Plug-in Activator to be registered in the PluginRegistry of CobiGen.
*/
@Activation(byMergeStrategy = { JSONPluginActivator.JSONMERGE, JSONPluginActivator.JSONMERGE_OVERRIDE })
public class JSONPluginActivator implements GeneratorPluginActivator {

/** JSON merge (prefer patch) */
static final String JSONMERGE_OVERRIDE = "jsonmerge_override";

/** JSON merge (prefer base) */
static final String JSONMERGE = "jsonmerge";

@Override
public List<Merger> bindMerger() {
List<Merger> merger = Lists.newLinkedList();
merger.add(new JSONMerger("jsonmerge", false));
merger.add(new JSONMerger("jsonmerge_override", true));
merger.add(new JSONMerger(JSONMERGE, false));
merger.add(new JSONMerger(JSONMERGE_OVERRIDE, true));
return merger;
}

Expand Down
2 changes: 1 addition & 1 deletion documentation/master-cobigen.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DISCLAIMER: All Cobigen plugins are compatible with the latest release of Devonf
* CobiGen - TypeScript Plug-in v2.4.4
* CobiGen - Property Plug-in v2.1.0
* CobiGen - Text Merger v2.1.0
* CobiGen - JSON Plug-in v2.1.0
* CobiGen - JSON Plug-in v7.0.0
* CobiGen - HTML Plug-in v2.1.0
* CobiGen - Open API Plug-in v2.4.0
* CobiGen - FreeMaker Template Engine v7.0.0
Expand Down

0 comments on commit 58f040f

Please sign in to comment.