msrb pushed to maven-hpi-plugin (master). "Do not resolve test-dep plugins"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Apr 1 13:01:11 UTC 2015
>From 304fc88be7f32a5aa3d3f81793504b2f5cc37b85 Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Wed, 1 Apr 2015 14:47:15 +0200
Subject: Do not resolve test-dep plugins
diff --git a/add-ability-to-skip-test-dep-resolution.patch b/add-ability-to-skip-test-dep-resolution.patch
new file mode 100644
index 0000000..8acbbaa
--- /dev/null
+++ b/add-ability-to-skip-test-dep-resolution.patch
@@ -0,0 +1,32 @@
+diff --git a/src/main/java/org/jenkinsci/maven/plugins/hpi/TestDependencyMojo.java b/src/main/java/org/jenkinsci/maven/plugins/hpi/TestDependencyMojo.java
+index 6627f70..54fc492 100644
+--- a/src/main/java/org/jenkinsci/maven/plugins/hpi/TestDependencyMojo.java
++++ b/src/main/java/org/jenkinsci/maven/plugins/hpi/TestDependencyMojo.java
+@@ -6,6 +6,7 @@ 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 org.apache.maven.plugins.annotations.ResolutionScope;
+ import org.apache.maven.project.MavenProject;
+
+@@ -22,7 +23,19 @@ import java.util.Set;
+ */
+ @Mojo(name="resolve-test-dependencies", requiresDependencyResolution = ResolutionScope.TEST)
+ public class TestDependencyMojo extends AbstractHpiMojo {
++
++ /**
++ * If true, the test-dependency plugins resolution will be skipped.
++ */
++ @Parameter(property = "maven-hpi-plugin.disabledTestDepPluginsResolution", defaultValue = "false")
++ private boolean disabledTestDepPluginsResolution;
++
+ public void execute() throws MojoExecutionException, MojoFailureException {
++
++ if (!disabledTestDepPluginsResolution) {
++ return;
++ }
++
+ File testDir = new File(project.getBuild().getTestOutputDirectory(),"test-dependencies");
+ testDir.mkdirs();
+
diff --git a/maven-hpi-plugin.spec b/maven-hpi-plugin.spec
index f000594..6dc9da7 100644
--- a/maven-hpi-plugin.spec
+++ b/maven-hpi-plugin.spec
@@ -1,6 +1,6 @@
Name: maven-hpi-plugin
Version: 1.112
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Maven plugin to build Jenkins plugins
# Project is licensed under ASL 2.0, but following
@@ -23,6 +23,9 @@ Patch0: 0001-Update-maven-archiver-to-2.5.patch
# Bundled class from org.jenkins-ci:version-number
Patch1: 0001-Unbundle-org.jenkins-ci-version-number.patch
Patch2: correctly-identify-core-plugins.patch
+# skip resolution of test-dependency plugins
+# TODO: should be upstreamable after some polishing
+Patch3: add-ability-to-skip-test-dep-resolution.patch
BuildArch: noarch
@@ -73,6 +76,7 @@ rm ./src/main/java/org/jenkinsci/maven/plugins/hpi/VersionNumber.java
%patch1 -p1 -F2
%patch2 -p1
+%patch3 -p1
# Fix groupId for ant-apache-regexp
%pom_xpath_replace "pom:dependency[pom:artifactId[text()='ant-apache-regexp']]/pom:groupId" \
@@ -115,6 +119,9 @@ rm src/main/java/org/jenkinsci/maven/plugins/hpi/CreateMojo.java
%changelog
+* Wed Apr 01 2015 Michal Srb <msrb at redhat.com> - 1.112-2
+- Do not resolve test-dep plugins
+
* Wed Feb 04 2015 Michal Srb <msrb at redhat.com> - 1.112-1
- Update to upstream version 1.112
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/maven-hpi-plugin.git/commit/?h=master&id=304fc88be7f32a5aa3d3f81793504b2f5cc37b85
More information about the scm-commits
mailing list