() {
diff --git a/src/main/resources/index.jelly b/src/main/resources/index.jelly
new file mode 100644
index 00000000..6df0d67a
--- /dev/null
+++ b/src/main/resources/index.jelly
@@ -0,0 +1,4 @@
+
+
+ This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build.
+
diff --git a/src/spotbugs/excludesFilter.xml b/src/spotbugs/excludesFilter.xml
new file mode 100644
index 00000000..c5d62ce6
--- /dev/null
+++ b/src/spotbugs/excludesFilter.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/java/hudson/plugins/parameterizedtrigger/CapturedEnvironmentActionTest.java b/src/test/java/hudson/plugins/parameterizedtrigger/CapturedEnvironmentActionTest.java
index 4af36c3b..121f9354 100644
--- a/src/test/java/hudson/plugins/parameterizedtrigger/CapturedEnvironmentActionTest.java
+++ b/src/test/java/hudson/plugins/parameterizedtrigger/CapturedEnvironmentActionTest.java
@@ -2,6 +2,7 @@
import hudson.ExtensionList;
import hudson.FilePath;
+import hudson.Functions;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
@@ -9,6 +10,7 @@
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
+import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
@@ -38,6 +40,7 @@ public class CapturedEnvironmentActionTest {
@Test
@Issue("SECURITY-2185") //@LocalData
public void onLoad() throws Throwable {
+ Assume.assumeFalse("test can not run on windows", Functions.isWindows());
j.then(r -> {
final URL url = CapturedEnvironmentActionTest.class.getResource("/hudson/plugins/parameterizedtrigger/CapturedEnvironmentActionTest/onLoad");
if (url == null) {
diff --git a/src/test/java/hudson/plugins/parameterizedtrigger/test/BuildTriggerTest.java b/src/test/java/hudson/plugins/parameterizedtrigger/test/BuildTriggerTest.java
index 9871c851..8aa49ae0 100644
--- a/src/test/java/hudson/plugins/parameterizedtrigger/test/BuildTriggerTest.java
+++ b/src/test/java/hudson/plugins/parameterizedtrigger/test/BuildTriggerTest.java
@@ -31,10 +31,8 @@
import java.util.Collections;
import java.util.List;
-import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.Assert.*;
-import org.awaitility.Awaitility;
import org.junit.Rule;
import org.junit.Test;
import hudson.tasks.Builder;
@@ -69,8 +67,15 @@ public void testParentProjectTrigger() throws Exception {
BuildTrigger triggerBuilder = new BuildTrigger(new BuildTriggerConfig("downstream", ResultCondition.SUCCESS, false, null, params, false));
upstream.getPublishersList().add(triggerBuilder);
+ /*
+ * To avoid a period when upstream already finished, but async rebuilding graph {@link Jenkins#rebuildDependencyGraphAsync()}
+ * could still be in progress or even not start.
+ * Let's rebuild graph manually just in case to avoid flakiness.
+ */
+ r.jenkins.rebuildDependencyGraph();
+
r.buildAndAssertSuccess(upstream);
- Awaitility.await().pollInterval(1, SECONDS).atMost(10, SECONDS).until(() -> downstream.getLastBuild() != null);
+ r.waitUntilNoActivity();
String project = downstream.getLastBuild().getCause(Cause.UpstreamCause.class).getUpstreamProject();
assertEquals("Build should be triggered by matrix project.", "upstream", project);
diff --git a/src/test/java/hudson/plugins/parameterizedtrigger/test/ParameterizedTriggerPermissionTest.java b/src/test/java/hudson/plugins/parameterizedtrigger/test/ParameterizedTriggerPermissionTest.java
index f4010ef8..694e7f4e 100644
--- a/src/test/java/hudson/plugins/parameterizedtrigger/test/ParameterizedTriggerPermissionTest.java
+++ b/src/test/java/hudson/plugins/parameterizedtrigger/test/ParameterizedTriggerPermissionTest.java
@@ -50,8 +50,8 @@
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
+import edu.umd.cs.findbugs.annotations.CheckForNull;
+import edu.umd.cs.findbugs.annotations.NonNull;
import jenkins.model.Jenkins;
import jenkins.security.QueueItemAuthenticator;
import jenkins.security.QueueItemAuthenticatorConfiguration;
@@ -139,9 +139,9 @@ public void shouldBeUnableToTriggerWithoutPermissions(boolean useBuildStep) thro
Cause.UpstreamCause cause = lastBuild.getCause(Cause.UpstreamCause.class);
assertNotNull("No upstream cause in subproject2", lastBuild);
}
-
- @Nonnull
- private FreeStyleProject createProjectWithPermissions(@Nonnull String projectName, @Nonnull String userName,
+
+ @NonNull
+ private FreeStyleProject createProjectWithPermissions(@NonNull String projectName, @NonNull String userName,
@CheckForNull List permissions) throws Exception {
final TreeSet userSet = new TreeSet<>(Arrays.asList(userName));
diff --git a/src/test/java/hudson/plugins/parameterizedtrigger/test/SubversionRevisionBuildTriggerConfigTest.java b/src/test/java/hudson/plugins/parameterizedtrigger/test/SubversionRevisionBuildTriggerConfigTest.java
deleted file mode 100644
index 2162aa52..00000000
--- a/src/test/java/hudson/plugins/parameterizedtrigger/test/SubversionRevisionBuildTriggerConfigTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package hudson.plugins.parameterizedtrigger.test;
-
-import hudson.model.Cause.UserIdCause;
-import hudson.model.FreeStyleBuild;
-import hudson.model.FreeStyleProject;
-import hudson.model.Queue;
-import hudson.plugins.parameterizedtrigger.BuildTrigger;
-import hudson.plugins.parameterizedtrigger.BuildTriggerConfig;
-import hudson.plugins.parameterizedtrigger.ResultCondition;
-import hudson.plugins.parameterizedtrigger.SubversionRevisionBuildParameters;
-import hudson.scm.SubversionSCM;
-import hudson.scm.SubversionTagAction;
-
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.jvnet.hudson.test.JenkinsRule;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertEquals;
-
-public class SubversionRevisionBuildTriggerConfigTest {
-
- @Rule
- public JenkinsRule r = new JenkinsRule();
-
- @Test @Ignore("https://groups.google.com/d/msg/jenkinsci-dev/8tLnOhHitKI/dCPJ53_wGAAJ")
- public void testRevisionParameter() throws Exception {
- FreeStyleProject p1 = r.createFreeStyleProject();
- FreeStyleProject p2 = r.createFreeStyleProject();
- p2.setQuietPeriod(1);
-
- p1.setScm(new SubversionSCM(
- "https://svn.jenkins-ci.org/trunk/hudson/test-projects/trivial-ant@13000"));
-
- p2.setScm(new SubversionSCM(
- "https://svn.jenkins-ci.org/trunk/hudson/test-projects/trivial-ant"));
-
- p1.getPublishersList().add(
- new BuildTrigger(new BuildTriggerConfig(p2.getName(), ResultCondition.SUCCESS,
- new SubversionRevisionBuildParameters())));
- r.jenkins.rebuildDependencyGraph();
-
- FreeStyleBuild b1 = p1.scheduleBuild2(0, new UserIdCause()).get();
- Queue.Item q = r.jenkins.getQueue().getItem(p2);
- assertNotNull("p2 should be in queue (quiet period): " + JenkinsRule.getLog(b1), q);
- q.getFuture().get();
-
- FreeStyleBuild b2 = p2.getLastBuild();
-
- assertEquals(b1.getAction(SubversionTagAction.class).getTags().keySet()
- .iterator().next().revision,
- b2.getAction(SubversionTagAction.class).getTags().keySet()
- .iterator().next().revision);
-
- }
-}