mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
push a bit of job in this branch to run all tests in ci server: too long locally
This commit is contained in:
1 parent
0b91480b85
commit
a8ae4cbc33
6 files changed
+24
-131
No files matched your search
+6
-19
@@ -41,11 +41,11 @@ THE SOFTWARE.
|
||||
<url>http://wiki.jenkins-ci.org/display/JENKINS/Maven+Project+Plugin</url>
|
||||
|
||||
<properties>
|
||||
<mavenInterceptorsVersion>1.3</mavenInterceptorsVersion>
|
||||
<mavenInterceptorsVersion>1.4-SNAPSHOT</mavenInterceptorsVersion>
|
||||
<mavenVersion>3.1.0</mavenVersion>
|
||||
<maven.version>${mavenVersion}</maven.version>
|
||||
<aetherVersion>0.9.0.M2</aetherVersion>
|
||||
<sisuInjectVersion>2.3.0</sisuInjectVersion>
|
||||
<sisuInjectVersion>0.0.0.M2a</sisuInjectVersion>
|
||||
<wagonVersion>2.4</wagonVersion>
|
||||
</properties>
|
||||
|
||||
@@ -176,11 +176,11 @@ THE SOFTWARE.
|
||||
<artifactId>plexus-container-default</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.sonatype.sisu</groupId>
|
||||
<artifactId>sisu-inject-plexus</artifactId>
|
||||
<groupId>org.eclipse.sisu</groupId>
|
||||
<artifactId>org.eclipse.sisu.plexus</artifactId>
|
||||
<version>${sisuInjectVersion}</version>
|
||||
</dependency>
|
||||
|
||||
@@ -200,19 +200,6 @@ THE SOFTWARE.
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.sonatype.sisu</groupId>
|
||||
<artifactId>sisu-inject-bean</artifactId>
|
||||
<version>${sisuInjectVersion}</version>
|
||||
<exclusions>
|
||||
<!-- prevent inclusion of one with classfifier no_aop -->
|
||||
<exclusion>
|
||||
<groupId>org.sonatype.sisu</groupId>
|
||||
<artifactId>sisu-guice</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- JENKINS-10819 : This wagon is safer and more configurable to provide http(s) support -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Tom Huybrechts
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
package hudson.maven;
|
||||
|
||||
import hudson.model.TaskListener;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.apache.maven.cli.MavenLoggerManager;
|
||||
import org.codehaus.plexus.logging.Logger;
|
||||
import org.codehaus.plexus.logging.console.ConsoleLogger;
|
||||
|
||||
/**
|
||||
* {@link MavenEmbedderLogger} implementation that
|
||||
* sends output to {@link TaskListener}.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
// TODO this is gone in 3.1.0, replaced by SLF4J
|
||||
public final class EmbedderLoggerImpl extends MavenLoggerManager {
|
||||
private final PrintStream logger;
|
||||
|
||||
public EmbedderLoggerImpl(TaskListener listener, int threshold) {
|
||||
super(new ConsoleLogger( threshold, "hudson-logger" ));
|
||||
logger = listener.getLogger();
|
||||
}
|
||||
|
||||
private void print(String message, Throwable throwable, int threshold, String prefix) {
|
||||
if (getThreshold() <= threshold) {
|
||||
StringTokenizer tokens = new StringTokenizer(message,"\n");
|
||||
while(tokens.hasMoreTokens()) {
|
||||
logger.print(prefix);
|
||||
logger.println(tokens.nextToken());
|
||||
}
|
||||
|
||||
if (throwable!=null)
|
||||
throwable.printStackTrace(logger);
|
||||
}
|
||||
}
|
||||
|
||||
public void debug(String message, Throwable throwable) {
|
||||
print(message, throwable, Logger.LEVEL_DEBUG, "[DEBUG] ");
|
||||
}
|
||||
|
||||
public void info(String message, Throwable throwable) {
|
||||
print(message, throwable, Logger.LEVEL_INFO, "[INFO ] ");
|
||||
}
|
||||
|
||||
public void warn(String message, Throwable throwable) {
|
||||
print(message, throwable, Logger.LEVEL_WARN, "[WARN ] ");
|
||||
}
|
||||
|
||||
public void error(String message, Throwable throwable) {
|
||||
print(message, throwable, Logger.LEVEL_ERROR, "[ERROR] ");
|
||||
}
|
||||
|
||||
public void fatalError(String message, Throwable throwable) {
|
||||
print(message, throwable, Logger.LEVEL_FATAL, "[FATAL] ");
|
||||
}
|
||||
}
|
||||
@@ -25,13 +25,12 @@ package hudson.maven;
|
||||
|
||||
import hudson.maven.MavenBuild.ProxyImpl2;
|
||||
import hudson.maven.reporters.TestFailureDetector;
|
||||
import hudson.maven.util.ExecutionEventLogger;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.model.Result;
|
||||
import hudson.remoting.Channel;
|
||||
import hudson.remoting.DelegatingCallable;
|
||||
import hudson.util.IOException2;
|
||||
import org.apache.maven.cli.PrintStreamLogger;
|
||||
import org.apache.maven.cli.event.ExecutionEventLogger;
|
||||
import org.apache.maven.execution.AbstractExecutionListener;
|
||||
import org.apache.maven.execution.ExecutionEvent;
|
||||
import org.apache.maven.execution.ExecutionListener;
|
||||
@@ -41,6 +40,7 @@ import org.apache.maven.project.MavenProject;
|
||||
import org.jvnet.hudson.maven3.agent.Maven3Main;
|
||||
import org.jvnet.hudson.maven3.launcher.Maven3Launcher;
|
||||
import org.jvnet.hudson.maven3.listeners.HudsonMavenExecutionResult;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
@@ -173,6 +173,8 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
|
||||
private final AbstractMavenBuilder maven3Builder;
|
||||
|
||||
private AtomicBoolean hasTestFailures = new AtomicBoolean();
|
||||
|
||||
private org.slf4j.Logger logger = LoggerFactory.getLogger( MavenExecutionListener.class );
|
||||
|
||||
/**
|
||||
* Number of total nanoseconds {@link Maven3Builder} spent.
|
||||
@@ -198,16 +200,9 @@ public class Maven3Builder extends AbstractMavenBuilder implements DelegatingCal
|
||||
}
|
||||
this.reporters = new ConcurrentHashMap<ModuleName, List<MavenReporter>>(maven3Builder.reporters);
|
||||
|
||||
// TODO: we should think about reusing the code in org.apache.maven.cli.DefaultMavenExecutionRequestBuilder#logging?
|
||||
|
||||
// E.g. there's also the option to redirect logging to a file which is handled there, but not here.
|
||||
// TODO replace with SLF4J
|
||||
PrintStreamLogger logger = new PrintStreamLogger( maven3Builder.listener.getLogger() );
|
||||
if (maven3Builder.isDebug()) {
|
||||
logger.setThreshold(PrintStreamLogger.LEVEL_DEBUG);
|
||||
} else if (maven3Builder.isQuiet()) {
|
||||
logger.setThreshold(PrintStreamLogger.LEVEL_ERROR);
|
||||
}
|
||||
|
||||
|
||||
this.eventLogger = new ExecutionEventLogger( logger );
|
||||
}
|
||||
|
||||
|
||||
@@ -23,23 +23,26 @@
|
||||
*/
|
||||
package hudson.maven;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressWarnings;
|
||||
import hudson.AbortException;
|
||||
import hudson.FilePath;
|
||||
import hudson.Util;
|
||||
import hudson.model.AbstractBuild;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.util.MaskingClassLoader;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.mvn.SettingsProvider;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.tasks.Maven.MavenInstallation;
|
||||
import hudson.tasks.Maven.ProjectWithMaven;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.mvn.SettingsProvider;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.maven.artifact.versioning.ComparableVersion;
|
||||
import org.apache.maven.cli.logging.Slf4jLoggerManager;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.project.ProjectBuildingException;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -49,14 +52,6 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.maven.artifact.versioning.ComparableVersion;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.project.ProjectBuildingException;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressWarnings;
|
||||
|
||||
/**
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
@@ -191,10 +186,8 @@ public class MavenUtil {
|
||||
}
|
||||
mavenRequest.setTransferListener( mer.getTransferListener() );
|
||||
}
|
||||
EmbedderLoggerImpl logger =
|
||||
new EmbedderLoggerImpl( mer.getListener(), debugMavenEmbedder ? org.codehaus.plexus.logging.Logger.LEVEL_DEBUG
|
||||
: org.codehaus.plexus.logging.Logger.LEVEL_INFO );
|
||||
mavenRequest.setMavenLoggerManager( logger );
|
||||
|
||||
mavenRequest.setMavenLoggerManager( new Slf4jLoggerManager() );
|
||||
|
||||
ClassLoader mavenEmbedderClassLoader = mer.getClassLoader();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.codehaus.plexus.logging.Logger;
|
||||
*
|
||||
* @author Benjamin Bentmann
|
||||
*/
|
||||
// Note: copied from package org.apache.maven.cli with just one minor adaption for Maven3MojoNote
|
||||
// Note: copied from package org.apache.maven.cli with just one minor adaption for Maven3Mojo
|
||||
public class ExecutionEventLogger
|
||||
extends AbstractExecutionListener
|
||||
{
|
||||
|
||||
@@ -95,7 +95,7 @@ THE SOFTWARE.
|
||||
<project.patchManagement.url>https://api.github.com</project.patchManagement.url>
|
||||
<patch.tracker.serverId>jenkins-jira</patch.tracker.serverId>
|
||||
|
||||
<slf4jVersion>1.6.2</slf4jVersion> <!-- < 1.6.x version didn't specify the license (MIT) -->
|
||||
<slf4jVersion>1.7.4</slf4jVersion> <!-- < 1.6.x version didn't specify the license (MIT) -->
|
||||
<netbeans.compile.on.save>none</netbeans.compile.on.save> <!-- we rely on Maven source generation -->
|
||||
<animal.sniffer.skip>${skipTests}</animal.sniffer.skip>
|
||||
</properties>
|
||||
|
||||
Reference in new issue
Block a user