Skip to content

Commit

Permalink
Merge branch 'dev_propertyplugin' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeec committed Sep 14, 2020
2 parents f95dc1f + 8b8b19d commit 32e4136
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cobigen/cobigen-propertyplugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>propertyplugin</artifactId>
<packaging>jar</packaging>
<version>2.1.0</version>
<version>7.0.0</version>
<name>CobiGen - Property File Plug-In</name>
<description>CobiGen - Property File Plug-In</description>

Expand All @@ -20,14 +20,14 @@
<dependency>
<groupId>com.devonfw.cobigen</groupId>
<artifactId>core-api</artifactId>
<version>5.0.0</version>
<version>[7.0.0,)</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>com.devonfw.cobigen</groupId>
<artifactId>core-test</artifactId>
<version>5.0.0</version>
<version>[7.0.0,)</version>
<scope>test</scope>
</dependency>
<dependency>
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 @@ -10,13 +11,21 @@
/**
* Plug-in activator to be registered in CobiGen's PluginRegistry
*/
@Activation(byMergeStrategy = { PropertyMergerPluginActivator.PROPERTYMERGE,
PropertyMergerPluginActivator.PROPERTYMERGE_OVERRIDE })
public class PropertyMergerPluginActivator implements GeneratorPluginActivator {

/** Property File Merge Strategy (prefer patch) */
static final String PROPERTYMERGE_OVERRIDE = "propertymerge_override";

/** Property File Merge Strategy (prefer base) */
static final String PROPERTYMERGE = "propertymerge";

@Override
public List<Merger> bindMerger() {
List<Merger> merger = Lists.newLinkedList();
merger.add(new PropertyMerger("propertymerge", false));
merger.add(new PropertyMerger("propertymerge_override", true));
merger.add(new PropertyMerger(PROPERTYMERGE, false));
merger.add(new PropertyMerger(PROPERTYMERGE_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 @@ -21,7 +21,7 @@ DISCLAIMER: All Cobigen plugins are compatible with the latest release of Devonf
* CobiGen - Java Plug-in v7.0.0
* CobiGen - XML Plug-in v7.0.0
* CobiGen - TypeScript Plug-in v7.0.0
* CobiGen - Property Plug-in v2.1.0
* CobiGen - Property Plug-in v7.0.0
* CobiGen - Text Merger v2.1.0
* CobiGen - JSON Plug-in v7.0.0
* CobiGen - HTML Plug-in v7.0.0
Expand Down

0 comments on commit 32e4136

Please sign in to comment.