Skip to content

Commit

Permalink
Revert "WIP: Add functionality marge for build extensions section (#36)…
Browse files Browse the repository at this point in the history
…" (#53)

This reverts commit cb4810a.
  • Loading branch information
Fameing authored Apr 10, 2024
1 parent cb4810a commit 1517131
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 108 deletions.
9 changes: 0 additions & 9 deletions examples/mixin-maven-plugin/mixin-example/mixin1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
<message>HELLO DEFAULT MESSAGE FROM MIXIN</message>
</properties>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.extensions</groupId>
<artifactId>maven-build-cache-extension</artifactId>
<version>1.0.1</version>
</extension>
</extensions>


<pluginManagement>
<plugins>
<!-- This is a simple execution of antrun during initialize phase to echo a message from a property.
Expand Down
2 changes: 1 addition & 1 deletion examples/mixin-maven-plugin/mixin-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<name>${project.groupId}:${project.artifactId}</name>

<properties>
<version.com.playtika.maven.plugins>1.0.0-SNAPSHOT</version.com.playtika.maven.plugins>
<version.com.playtika.maven.plugins>1.0.1</version.com.playtika.maven.plugins>
</properties>
<modules>
<module>mixin1</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class Mixin {
private Boolean mergeScm;
private Boolean mergeRepositories;
private Boolean mergePluginRepositories;
private Boolean mergeBuildExtensions;
private Boolean recurse;
private Boolean activateProfiles;
private Mixins mixins;
Expand Down Expand Up @@ -114,10 +113,6 @@ public boolean isMergePluginRepositories() {
return mergePluginRepositories != null ? mergePluginRepositories : mixins.isMergePluginRepositories();
}

public boolean isMergeBuildExtensions() {
return mergeBuildExtensions != null ? mergeBuildExtensions : mixins.isMergeBuildExtensions();
}

public void setMergePluginRepositories(Boolean mergePluginRepositories) {
this.mergePluginRepositories = mergePluginRepositories;
}
Expand Down Expand Up @@ -173,13 +168,11 @@ public void merge(Model mixinModel, MavenProject mavenProject, MavenSession mave
if (isMergePluginRepositories()) {
mixinModelMerger.mergePluginRepositories(mavenProject.getModel(), mixinModel);
}
if (isMergeBuildExtensions()) {
mixinModelMerger.mergeBuildExtensions(mavenProject.getModel(), mixinModel);
}
}

@Override
public String toString() {
return getKey();
}

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.playtika.maven.plugins;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.maven.model.Build;
import org.apache.maven.model.DistributionManagement;
import org.apache.maven.model.Model;
Expand All @@ -17,6 +13,10 @@
import org.apache.maven.model.merge.MavenModelMerger;
import org.codehaus.plexus.component.annotations.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* MixinModelMerger
* Enables pluginManagement and properties import from different pom files. Uses protected methods of MavenModelMerger, and therefore inherits from it
Expand Down Expand Up @@ -187,10 +187,4 @@ public void mergePluginRepositories(Model targetModel, Model sourceModel) {
super.mergeModelBase_PluginRepositories(targetModel, sourceModel, false, context);
}

public void mergeBuildExtensions(Model targetModel, Model sourceModel) {
Map<Object, Object> context = new HashMap<Object, Object>();
Build targetBuild = targetModel.getBuild();
Build sourceBuild = sourceModel.getBuild();
super.mergeBuild_Extensions(targetBuild, sourceBuild, false, context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class Mixins {
private List<Mixin> mixins = new ArrayList<Mixin>();
private boolean mergePlugins = true;
private boolean mergePluginManagement = true;
private boolean mergeBuildExtensions = true;
private boolean mergeProperties = true;
private boolean mergeReporting = true;
private boolean mergeDistributionManagement = true;
Expand Down Expand Up @@ -112,10 +111,6 @@ public boolean isMergePluginRepositories() {
return mergePluginRepositories;
}

public boolean isMergeBuildExtensions() {
return mergeBuildExtensions;
}

public void setMergePluginRepositories(boolean mergePluginRepositories) {
this.mergePluginRepositories = mergePluginRepositories;
}
Expand Down

This file was deleted.

0 comments on commit 1517131

Please sign in to comment.