Skip to content

Commit

Permalink
Reverting an inessential part of the fix of JENKINS-16301 since it br…
Browse files Browse the repository at this point in the history
…oke some Maven builds. Apparently the Maven 2 process factory fails to adequately insulate the Maven process from Jenkins library dependencies; if you specify a build extension that can override dependencies used by Jenkins core classes! A real fix would involve changing class loader delegation, since presumably similar bugs could still occur.
  • Loading branch information
jglick committed Oct 4, 2013
1 parent 75ffe8e commit 1342c5f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/src/test/java/hudson/maven/MavenBuildTest.java
Expand Up @@ -8,17 +8,16 @@
import hudson.tasks.Maven.MavenInstallation;
import hudson.tasks.test.AbstractTestResultAction;
import hudson.tasks.test.AggregatedTestResultAction;
import hudson.tasks.test.TestResultProjectAction;

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;

import org.jvnet.hudson.test.Bug;
import org.jvnet.hudson.test.Email;
import org.jvnet.hudson.test.ExtractResourceSCM;
import org.jvnet.hudson.test.HudsonTestCase;
import org.jvnet.hudson.test.SingleFileSCM;

/**
* @author Kohsuke Kawaguchi
Expand Down Expand Up @@ -177,7 +176,20 @@ public void testMavenFailsafePluginTestResultsAreRecorded() throws Exception {
AbstractTestResultAction<?> testResultAction = moduleBuild.getTestResultAction();
assertNotNull(testResultAction);
assertEquals(1, testResultAction.getTotalCount());
}
}

@Bug(18178)
public void testExtensionsConflictingWithCore() throws Exception {
MavenModuleSet m = createMavenProject();
m.setMaven(configureDefaultMaven().getName());
m.setScm(new SingleFileSCM("pom.xml",
"<project><modelVersion>4.0.0</modelVersion>" +
"<groupId>g</groupId><artifactId>a</artifactId><version>0</version>" +
"<build><extensions>" +
"<extension><groupId>org.springframework.build.aws</groupId><artifactId>org.springframework.build.aws.maven</artifactId><version>3.0.0.RELEASE</version></extension>" +
"</extensions></build></project>"));
buildAndAssertSuccess(m);
}

private static class TestReporter extends MavenReporter {
private static final long serialVersionUID = 1L;
Expand Down

0 comments on commit 1342c5f

Please sign in to comment.