Skip to content

Commit

Permalink
Fixed source build model for merge extensions (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fameing authored May 13, 2024
1 parent 805a0d5 commit b546403
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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 @@ -32,6 +32,6 @@
How to test :
1. build all mixin
2. locate to mixin-consumer
3. Run: mvn -Dmixin-maven-plugin.version=1.0.4 help:effective-pom -U
3. Run: mvn -Dmixin-maven-plugin.version=1.0.5 help:effective-pom -U
-->
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
* MixinModelMerger
Expand Down Expand Up @@ -189,8 +190,13 @@ public void mergePluginRepositories(Model targetModel, Model sourceModel) {

public void mergeBuildExtensions(Model targetModel, Model sourceModel) {
Map<Object, Object> context = new HashMap<Object, Object>();
Build targetBuild = targetModel.getBuild();

Build sourceBuild = sourceModel.getBuild();
if (Objects.isNull(sourceBuild)) {
return;
}

Build targetBuild = targetModel.getBuild();
super.mergeBuild_Extensions(targetBuild, sourceBuild, false, context);
}
}

0 comments on commit b546403

Please sign in to comment.