From 11d05e5341ed24550ec9bbe954825fab57fa9762 Mon Sep 17 00:00:00 2001 From: Lahiru Madushanka Date: Tue, 1 Oct 2024 11:46:29 +0530 Subject: [PATCH] Skip unit test plugin in build-artifacts pom Skip unit test plugin in build-artifacts pom fixes wso2/integration-studio/issues/1341 --- .../integrationstudio/esb/core/utils/SynapseUtils.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/esb-tools/plugins/org.wso2.integrationstudio.esb.core/src/org/wso2/integrationstudio/esb/core/utils/SynapseUtils.java b/components/esb-tools/plugins/org.wso2.integrationstudio.esb.core/src/org/wso2/integrationstudio/esb/core/utils/SynapseUtils.java index 68d0ae2fd..fca129964 100755 --- a/components/esb-tools/plugins/org.wso2.integrationstudio.esb.core/src/org/wso2/integrationstudio/esb/core/utils/SynapseUtils.java +++ b/components/esb-tools/plugins/org.wso2.integrationstudio.esb.core/src/org/wso2/integrationstudio/esb/core/utils/SynapseUtils.java @@ -29,6 +29,7 @@ import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; +import org.apache.maven.model.PluginExecution; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; @@ -168,6 +169,15 @@ public static void createBuildArtifactsModulePom(IProject project, IFolder build Model model = mavenProject.getModel(); model.setParent(parent); + + // skip unit test plugin + Plugin unitTestPlugin = MavenUtils.createPluginEntry(mavenProject, "org.wso2.maven", + "synapse-unit-test-maven-plugin", "5.2.42", false); + PluginExecution pluginExecution = new PluginExecution(); + pluginExecution.setPhase("null"); + pluginExecution.setId("synapse-unit-test"); + unitTestPlugin.addExecution(pluginExecution); + MavenUtils.saveMavenProject(mavenProject, mavenProjectPomLocation); mavenParentProject.getModules().add(SynapseConstants.BUILD_ARTIFACTS_FOLDER);