Skip to content
Permalink
Browse files
Merge remote-tracking branch 'upstream/master' into JENKINS-31162
  • Loading branch information
recena committed Mar 21, 2016
2 parents 2f71dda + 7f69af5 commit 706e759f17f9aaf611e551c3182281e1984dd3e6
Showing 34 changed files with 289 additions and 384 deletions.
163 pom.xml
@@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.580.1</version>
<version>2.4</version>
</parent>

<groupId>org.jenkins-ci.main</groupId><!-- for historical reason, this plugin has a different groupId -->
@@ -43,13 +43,14 @@ THE SOFTWARE.
<url>http://wiki.jenkins-ci.org/display/JENKINS/Maven+Project+Plugin</url>

<properties>
<jenkins.version>1.580.1</jenkins.version>
<java.level>6</java.level>
<mavenInterceptorsVersion>1.7</mavenInterceptorsVersion>
<mavenVersion>3.1.0</mavenVersion>
<maven.version>${mavenVersion}</maven.version>
<aetherVersion>0.9.0.M3</aetherVersion>
<sisuInjectVersion>0.0.0.M5</sisuInjectVersion>
<wagonVersion>2.4</wagonVersion>
<findbugs-maven-plugin.version>3.0.1</findbugs-maven-plugin.version>
<!--TODO: change to true after the code cleanup-->
<findbugs.failOnError>false</findbugs.failOnError>
</properties>
@@ -79,6 +80,12 @@ THE SOFTWARE.
</dependencyManagement>

<dependencies>
<dependency> <!-- TODO pending https://github.com/jenkinsci/plugin-pom/pull/17 -->
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>javadoc</artifactId>
@@ -94,12 +101,6 @@ THE SOFTWARE.
<artifactId>junit</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jenkins-ci.main.maven</groupId>
@@ -284,16 +285,22 @@ THE SOFTWARE.
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>${wagonVersion}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.4</version>
<version>4.4.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
@@ -304,7 +311,7 @@ THE SOFTWARE.
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>${wagonVersion}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
@@ -314,28 +321,28 @@ THE SOFTWARE.
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>${wagonVersion}</version>
</dependency>
</dependency>

<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
<version>${wagonVersion}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
<version>3.0</version>
</dependency>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
<version>2.5.1</version>
</dependency>
</dependency>
<dependency>
<groupId>org.jenkins-ci.lib</groupId>
<artifactId>lib-jenkins-maven-artifact-manager</artifactId>
<version>1.2</version>
</dependency>
</dependency>
<dependency>
<groupId>org.jenkins-ci.lib</groupId>
<artifactId>lib-jenkins-maven-embedder</artifactId>
@@ -380,6 +387,10 @@ THE SOFTWARE.
<groupId>nekohtml</groupId>
<artifactId>xercesMinimal</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>

@@ -391,34 +402,45 @@ THE SOFTWARE.
</dependency>

<dependency>
<groupId>findbugs</groupId>
<artifactId>annotations</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness-tools</artifactId>
<version>2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.8.5</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.4.10</version>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.4.10</version>
<version>1.6.4</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jvnet.mock-javamail</groupId>
<artifactId>mock-javamail</artifactId>
<version>1.9</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -442,61 +464,7 @@ THE SOFTWARE.
</dependencies>

<build>
<!--
Since new versions need to overwrite old versions, it's better
not to have version number in the .hpi file name.
-->
<finalName>${project.artifactId}</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<!-- version specified in grandparent pom -->
<extensions>true</extensions>
<configuration>
<showDeprecation>true</showDeprecation>
<disabledTestInjection>true</disabledTestInjection>
</configuration>
</plugin>
<plugin>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<!-- version specified in grandparent pom -->
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>maven-localizer-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<fileMask>Messages.properties</fileMask>
<outputDirectory>target/generated-sources/localizer</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin><!-- generate licenses.xml -->
<groupId>com.cloudbees</groupId>
<artifactId>maven-license-plugin</artifactId>
<!-- version specified in grandparent pom -->
<configuration>
<generateLicenseXml>target/${project.artifactId}/WEB-INF/licenses.xml</generateLicenseXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -524,37 +492,6 @@ THE SOFTWARE.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<argLine>-XX:MaxPermSize=128m</argLine>
<systemPropertyVariables>
<buildDirectory>${project.build.directory}</buildDirectory>
<java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
<java.awt.headless>true</java.awt.headless>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs-maven-plugin.version}</version>
<configuration>
<failOnError>${findbugs.failOnError}</failOnError>
<xmlOutput>true</xmlOutput>
</configuration>
<executions>
<execution>
<id>run-findbugs</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

@@ -127,7 +127,7 @@ protected String formatArgs(List<String> args) {
* Ignores {@link #systemProps jenkins environment variables} with empty keys.
* @throws IllegalArgumentException if a {@link #systemProps jenkins environment variable} has null value
* as it blows up Maven.
* @see http://jenkins.361315.n4.nabble.com/Upgrade-to-1-424-broke-our-Maven-builds-due-to-empty-system-property-key-td3726460.html
* @see <a href="http://jenkins.361315.n4.nabble.com/Upgrade-to-1-424-broke-our-Maven-builds-due-to-empty-system-property-key-td3726460.html">Upgrade to 1.424 broke our Maven builds due to empty system property key</a>
*/
protected void registerSystemProperties() {
for (Map.Entry<String,String> e : systemProps.entrySet()) {
@@ -55,10 +55,12 @@ public interface MavenArgumentInterceptorAction extends Action {
public String getGoalsAndOptions(MavenModuleSetBuild build);

/**
* Change/add arguments to any needs, but special care has to be taken, as
* Change/add arguments to any needs.
* Special care has to be taken, as
* the list contains every argument needed for the default execution (e.g.
* <code>-f /path/to/pom.xml</code> or <code>-B</code>). <br />
* An easy example would be to add "<code>-DskipTests</code>" to skip the
* <code>-f /path/to/pom.xml</code> or <code>-B</code>).
* <p>
* An easy example would be to add "<code>-DskipTests</code>" to skip the
* test execution on request.
*
* <p>
@@ -108,7 +108,7 @@
* @param profiles
* Profiles to activate/deactivate. Can be null.
* @param systemProperties
* The system properties that the embedded Maven sees. See {@link MavenEmbedder#setSystemProperties(Properties)}.
* The system properties that the embedded Maven sees.
* @param privateRepository
* Optional private repository to use as the local repository.
* @param alternateSettings
@@ -431,7 +431,7 @@ public MavenModuleSet getParent() {
}

/**
* Gets all the child modules (that are listed in the &lt;module> element in our POM.)
* Gets all the child modules (that are listed in the {@code <module>} element in our POM).
* <p>
* This method returns null if this information is not recorded. This happens
* for compatibility reason.
@@ -465,7 +465,7 @@ public Label getAssignedLabel() {
/**
* Workspace of a {@link MavenModule} is a part of the parent's workspace.
* <p>
* That is, {@Link MavenModuleSet} builds are incompatible with any {@link MavenModule}
* That is, {@link MavenModuleSet} builds are incompatible with any {@link MavenModule}
* builds, whereas {@link MavenModule} builds are compatible with each other.
*
* @deprecated as of 1.319 in {@link AbstractProject}.
@@ -221,7 +221,7 @@ public boolean end(MavenBuild build, Launcher launcher, BuildListener listener)
* <p>
* {@link MavenReport} is an execution unit inside the Maven site plugin mojos,
* such as <tt>site:generate</tt>. These are what's configured through
* &lt;reporting> tag inside POM, although there's normally more
* {@code <reporting>} tag inside POM, although there's normally more
* {@link MavenReport}s than what's specified explicitly, due to defaulting
* and inheritance and all the other Maven processing.
*
@@ -138,7 +138,7 @@ public String getGoal() {
* Obtains the configuration value of the mojo.
*
* @param configName
* The name of the child element in the &lt;configuration> of mojo.
* The name of the child element in the {@code <configuration>} of mojo.
* @param type
* The Java class of the configuration value. While every element
* can be read as {@link String}, often different types have a different
@@ -166,7 +166,7 @@ public <T> T getConfigurationValue(String configName, Class<T> type, T defaultVa
* Obtains the configuration value of the mojo.
*
* @param configName
* The name of the child element in the &lt;configuration> of mojo.
* The name of the child element in the {@code <configuration>} of mojo.
* @param type
* The Java class of the configuration value. While every element
* can be read as {@link String}, often different types have a different
@@ -80,7 +80,7 @@ public final class MavenArtifact implements Serializable {
/**
* File name (without directory portion) of this artifact in the Hudson archive.
* Remembered explicitly because some times this doesn't follow the
* standard naming convention, due to &lt;finalName> setting in POM.
* standard naming convention, due to {@code <finalName>} setting in POM.
*
* <p>
* This name is taken directly from the name of the file as used during the build
@@ -182,7 +182,6 @@ public Artifact get() {

/**
* Creates a Maven {@link Artifact} back from the persisted data.
* @param closeable pass in a reference which will be filled with something you should close when done
*/
public CloseableArtifact toCloseableArtifact(ArtifactHandlerManager handlerManager, ArtifactFactory factory, MavenBuild build) throws IOException {
// Hack: presence of custom ArtifactHandler during builds could influence the file extension
@@ -8,12 +8,13 @@
import org.jvnet.hudson.test.HudsonTestCase;

import java.io.IOException;
import org.jvnet.hudson.test.ToolInstallations;

public class AbortedMavenBuildTest extends HudsonTestCase {
@Bug(8054)
public void testBuildWrapperSeesAbortedStatus() throws Exception {
configureDefaultMaven();
MavenModuleSet project = createMavenProject();
ToolInstallations.configureDefaultMaven();
MavenModuleSet project = jenkins.createProject(MavenModuleSet.class, "p");
TestBuildWrapper wrapper = new TestBuildWrapper();
project.getBuildWrappersList().add(wrapper);
project.getReporters().add(new AbortingReporter());

0 comments on commit 706e759

Please sign in to comment.