提交 09cfe3bd 编写于 作者: B Baptiste Mathus 提交者: GitHub

Merge pull request #2802 from batmat/JENKINS-42709

[JENKINS-27624][JENKINS-42709] Bump Jenkins baseline to Java 8 minimum
......@@ -38,8 +38,8 @@ for(i = 0; i < buildTypes.size(); i++) {
timeout(time: 180, unit: 'MINUTES') {
// See below for what this method does - we're passing an arbitrary environment
// variable to it so that JAVA_OPTS and MAVEN_OPTS are set correctly.
withMavenEnv(["JAVA_OPTS=-Xmx1536m -Xms512m -XX:MaxPermSize=1024m",
"MAVEN_OPTS=-Xmx1536m -Xms512m -XX:MaxPermSize=1024m"]) {
withMavenEnv(["JAVA_OPTS=-Xmx1536m -Xms512m",
"MAVEN_OPTS=-Xmx1536m -Xms512m"]) {
// Actually run Maven!
// The -Dmaven.repo.local=${pwd()}/.repository means that Maven will create a
// .repository directory at the root of the build (which it gets from the
......
......@@ -771,7 +771,7 @@ THE SOFTWARE.
<configuration>
<forkCount>0.5C</forkCount>
<reuseForks>true</reuseForks>
<argLine>-XX:MaxPermSize=128m -noverify</argLine> <!-- some versions of JDK7/8 causes VerifyError during mock tests: http://code.google.com/p/powermock/issues/detail?id=504 -->
<argLine>-noverify</argLine> <!-- some versions of JDK7/8 causes VerifyError during mock tests: http://code.google.com/p/powermock/issues/detail?id=504 -->
<trimStackTrace>false</trimStackTrace> <!-- SUREFIRE-1226 workaround -->
</configuration>
</plugin>
......
......@@ -56,7 +56,6 @@ public class Cobertura {
}
sysproperty(key:"net.sourceforge.cobertura.datafile",value:ser)
sysproperty(key:"hudson.ClassicPluginStrategy.useAntClassLoader",value:"true")
jvmarg(value:"-XX:MaxPermSize=128m")
}
}
......
......@@ -791,7 +791,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
}
public RunList getBuilds() {
return RunList.fromJobs(Jenkins.getInstance().allItems(Job.class)).node(getNode());
return RunList.fromJobs((Iterable)Jenkins.getInstance().allItems(Job.class)).node(getNode());
}
/**
......
......@@ -655,7 +655,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr
@SuppressWarnings("unchecked")
@WithBridgeMethods(List.class)
public @Nonnull RunList getBuilds() {
return RunList.fromJobs(Jenkins.getInstance().allItems(Job.class)).filter(new Predicate<Run<?,?>>() {
return RunList.fromJobs((Iterable)Jenkins.getInstance().allItems(Job.class)).filter(new Predicate<Run<?,?>>() {
@Override public boolean apply(Run<?,?> r) {
return r instanceof AbstractBuild && relatedTo((AbstractBuild<?,?>) r);
}
......
......@@ -96,7 +96,7 @@ THE SOFTWARE.
<findbugs.failOnError>true</findbugs.failOnError>
<test-annotations.version>1.2</test-annotations.version>
<java.level>7</java.level>
<java.level>8</java.level>
<changelog.url>https://jenkins.io/changelog</changelog.url>
</properties>
......@@ -482,7 +482,7 @@ THE SOFTWARE.
<plugin>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector</artifactId>
<version>1.13</version>
<version>1.15</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
......@@ -673,7 +673,7 @@ THE SOFTWARE.
<configuration>
<rules>
<requireJavaVersion>
<version>1.7.0</version>
<version>1.8.0</version>
</requireJavaVersion>
<requireMavenVersion>
<version>3.0</version>
......
......@@ -213,7 +213,7 @@ THE SOFTWARE.
<artifactId>maven-surefire-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<argLine>${jacocoSurefireArgs} -Dfile.encoding=UTF-8 -Xmx1g -XX:MaxPermSize=128m</argLine>
<argLine>${jacocoSurefireArgs} -Dfile.encoding=UTF-8 -Xmx1g</argLine>
<systemPropertyVariables>
<!-- use AntClassLoader that supports predictable file handle release -->
<hudson.ClassicPluginStrategy.useAntClassLoader>true</hudson.ClassicPluginStrategy.useAntClassLoader>
......
......@@ -6,8 +6,10 @@ import static org.junit.Assert.assertNull;
import java.io.IOException;
import hudson.EnvVars;
import hudson.matrix.MatrixBuild;
import hudson.matrix.MatrixProject;
import hudson.maven.MavenModuleSet;
import hudson.maven.MavenModuleSetBuild;
import hudson.tasks.Maven.MavenInstallation;
import hudson.util.StreamTaskListener;
......@@ -69,24 +71,23 @@ public class GetEnvironmentOutsideBuildTest extends HudsonTestCase {
public void testMaven() throws Exception {
MavenModuleSet m = createSimpleMavenProject();
assertGetEnvironmentCallOutsideBuildWorks(m);
final MavenModuleSetBuild build = buildAndAssertSuccess(m);
assertGetEnvironmentWorks(build);
}
public void testFreestyle() throws Exception {
FreeStyleProject project = createFreeStyleProject();
assertGetEnvironmentCallOutsideBuildWorks(project);
final FreeStyleBuild build = buildAndAssertSuccess(project);
assertGetEnvironmentWorks(build);
}
public void testMatrix() throws Exception {
MatrixProject createMatrixProject = jenkins.createProject(MatrixProject.class, "mp");
assertGetEnvironmentCallOutsideBuildWorks(createMatrixProject);
}
@SuppressWarnings({"rawtypes", "unchecked"})
private void assertGetEnvironmentCallOutsideBuildWorks(AbstractProject job) throws Exception {
AbstractBuild build = buildAndAssertSuccess(job);
final MatrixBuild build = buildAndAssertSuccess(createMatrixProject);
assertGetEnvironmentWorks(build);
}
......
......@@ -17,7 +17,7 @@ public class JenkinsJVMRealTest {
public static JenkinsRule j = new JenkinsRule();
@Test
public void isJenkinsJVM() throws Exception {
public void isJenkinsJVM() throws Throwable {
assertThat(new IsJenkinsJVM().call(), is(true));
DumbSlave slave = j.createOnlineSlave();
assertThat(slave.getChannel().call(new IsJenkinsJVM()), is(false));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册