From 61897229b4aa3347b9a34722b6a7d8bf45fe88c4 Mon Sep 17 00:00:00 2001 From: Igor Yova Date: Thu, 26 Oct 2023 14:29:49 +0300 Subject: [PATCH] Cleanup project and fix version plugin dependency (#29) --- .../mixin-maven-plugin/mixin-example/pom.xml | 2 +- mixin-maven-plugin/pom.xml | 22 ----------- .../maven/plugins/ArtifactFetcher.java | 4 +- .../playtika/maven/plugins/FakeMixinMojo.java | 28 -------------- .../maven/plugins/MixinModelMerger.java | 4 +- pom.xml | 37 +++++++++++++------ 6 files changed, 30 insertions(+), 67 deletions(-) delete mode 100644 mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/FakeMixinMojo.java diff --git a/examples/mixin-maven-plugin/mixin-example/pom.xml b/examples/mixin-maven-plugin/mixin-example/pom.xml index 59ab088..26e0046 100755 --- a/examples/mixin-maven-plugin/mixin-example/pom.xml +++ b/examples/mixin-maven-plugin/mixin-example/pom.xml @@ -7,7 +7,7 @@ ${project.groupId}:${project.artifactId} - 1.0.0-SNAPSHOT + 1.0.1 mixin1 diff --git a/mixin-maven-plugin/pom.xml b/mixin-maven-plugin/pom.xml index e1f2b64..730e886 100644 --- a/mixin-maven-plugin/pom.xml +++ b/mixin-maven-plugin/pom.xml @@ -20,13 +20,11 @@ org.apache.maven maven-core - ${maven-core.version} provided org.codehaus.plexus plexus-utils - ${plexus-utils.version} org.junit.jupiter @@ -50,7 +48,6 @@ org.codehaus.plexus plexus-component-metadata - ${plexus-component-metadata.version} generate-metadata @@ -89,25 +86,6 @@ org.codehaus.plexus plexus-component-metadata - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-maven - - enforce - - - - - 3.0 - - - - - - diff --git a/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/ArtifactFetcher.java b/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/ArtifactFetcher.java index b2130cc..f90ceb9 100644 --- a/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/ArtifactFetcher.java +++ b/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/ArtifactFetcher.java @@ -5,7 +5,7 @@ import org.apache.maven.execution.MavenSession; public interface ArtifactFetcher { - public Artifact createArtifact(String groupId, String artifactId, String type, String classifier, String version); + Artifact createArtifact(String groupId, String artifactId, String type, String classifier, String version); - public void resolve(Artifact artifact, MavenSession mavenSession) throws ArtifactResolutionException; + void resolve(Artifact artifact, MavenSession mavenSession) throws ArtifactResolutionException; } diff --git a/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/FakeMixinMojo.java b/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/FakeMixinMojo.java deleted file mode 100644 index e159d51..0000000 --- a/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/FakeMixinMojo.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.playtika.maven.plugins; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; - -import java.util.ArrayList; -import java.util.List; - -/** - * This mojo is a fake mojo just for having the mixins configuration available in IDEs such as intelliJ - * - * @author odavid - */ -@Mojo(name = "fake-mixin-mojo", threadSafe = true) -public class FakeMixinMojo extends AbstractMojo { - - @Parameter - private List mixins = new ArrayList(); - - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - //DO NOTHING... - } - -} diff --git a/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/MixinModelMerger.java b/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/MixinModelMerger.java index 73cb741..bc46e1c 100755 --- a/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/MixinModelMerger.java +++ b/mixin-maven-plugin/src/main/java/com/playtika/maven/plugins/MixinModelMerger.java @@ -127,8 +127,8 @@ public void mergeDistributionManagement(Model target, Model source) { /** * Fully merges pluginContainers with their plugins, their executions and their configuration * - * @param targetPlugin - * @param sourcePlugin + * @param targetContainer + * @param sourceContainer * @param context */ private void mergePluginContainers(PluginContainer targetContainer, PluginContainer sourceContainer, Map context, boolean addTargetPlugin) { diff --git a/pom.xml b/pom.xml index a66b803..86779da 100644 --- a/pom.xml +++ b/pom.xml @@ -136,20 +136,9 @@ - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - org.apache.maven.plugins maven-source-plugin - ${maven-source-plugin.version} attach-sources @@ -162,7 +151,6 @@ org.apache.maven.plugins maven-javadoc-plugin - ${maven-javadoc-plugin.version} attach-sources @@ -204,6 +192,31 @@ + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + org.codehaus.plexus + plexus-component-metadata + ${plexus-component-metadata.version} + org.apache.maven.plugins maven-enforcer-plugin