Skip to content

Commit

Permalink
Merge pull request jenkinsci#4242 from daniel-beck/unbundle-maven-plugin
Browse files Browse the repository at this point in the history
Unbundle Maven Plugin and Subversion Plugin
  • Loading branch information
oleg-nenashev authored Oct 5, 2019
2 parents 092757d + f1c2e85 commit 40dfc89
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ THE SOFTWARE.
<project.patchManagement.url>https://api.github.com</project.patchManagement.url>
<patch.tracker.serverId>jenkins-jira</patch.tracker.serverId>

<maven-plugin.version>2.14</maven-plugin.version>
<matrix-auth.version>2.3</matrix-auth.version>
<matrix-project.version>1.14</matrix-project.version>
<sorcerer.version>0.11</sorcerer.version>
Expand Down
2 changes: 1 addition & 1 deletion test-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ THE SOFTWARE.
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>maven-plugin</artifactId>
<version>${maven-plugin.version}</version>
<version>2.14</version>
<exclusions>
<exclusion> <!-- perhaps unnecessary as of JENKINS-35445? -->
<groupId>org.apache.httpcomponents</groupId>
Expand Down
14 changes: 9 additions & 5 deletions test/src/test/java/hudson/model/AbstractProjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import hudson.FilePath;
import hudson.Functions;
import hudson.Launcher;
import hudson.maven.MavenModuleSet;
import hudson.matrix.MatrixProject;
import hudson.scm.NullSCM;
import hudson.scm.SCM;
import hudson.scm.SCMDescriptor;
Expand Down Expand Up @@ -410,20 +410,24 @@ public void addTriggerDifferentType() throws Exception {
@Test
public void configDotXmlSubmissionToDifferentType() throws Exception {
TestPluginManager tpm = (TestPluginManager) j.jenkins.pluginManager;
tpm.installDetachedPlugin("javadoc");
tpm.installDetachedPlugin("maven-plugin");
tpm.installDetachedPlugin("structs");
tpm.installDetachedPlugin("workflow-step-api");
tpm.installDetachedPlugin("scm-api");
tpm.installDetachedPlugin("workflow-api");
tpm.installDetachedPlugin("junit");
tpm.installDetachedPlugin("matrix-project");

j.jenkins.setCrumbIssuer(null);
FreeStyleProject p = j.createFreeStyleProject();

HttpURLConnection con = postConfigDotXml(p, "<maven2-moduleset />");
HttpURLConnection con = postConfigDotXml(p, "<matrix-project />");

// this should fail with a type mismatch error
// the error message should report both what was submitted and what was expected
assertEquals(500, con.getResponseCode());
String msg = IOUtils.toString(con.getErrorStream());
System.out.println(msg);
assertThat(msg, allOf(containsString(FreeStyleProject.class.getName()), containsString(MavenModuleSet.class.getName())));
assertThat(msg, allOf(containsString(FreeStyleProject.class.getName()), containsString(MatrixProject.class.getName())));

// control. this should work
con = postConfigDotXml(p, "<project />");
Expand Down
12 changes: 0 additions & 12 deletions war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -294,18 +294,6 @@ THE SOFTWARE.
<!--
Detached plugins and their dependencies - detached plugins that used to be bundled plugins
-->
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>maven-plugin</artifactId>
<version>${maven-plugin.version}</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>subversion</artifactId>
<version>1.54</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cvs</artifactId>
Expand Down

0 comments on commit 40dfc89

Please sign in to comment.