diff --git a/core/src/main/java/hudson/util/HttpResponses.java b/core/src/main/java/hudson/util/HttpResponses.java new file mode 100644 index 0000000000000000000000000000000000000000..16755adc4c981e40e711407aca06cb778dc77fe6 --- /dev/null +++ b/core/src/main/java/hudson/util/HttpResponses.java @@ -0,0 +1,43 @@ +/* + * The MIT License + * + * Copyright (c) 2011, CloudBees, Inc. + * + * 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.util; + +import org.kohsuke.stapler.HttpResponse; + +import java.io.File; +import java.io.IOException; + +/** + * Various {@link HttpResponse} implementations. + * + *

+ * This class extends from Stapler so that we can move implementations from here to Stapler periodically. + * + * @author Kohsuke Kawaguchi + */ +public class HttpResponses extends org.kohsuke.stapler.HttpResponses { + public static HttpResponse staticResource(File f) throws IOException { + return staticResource(f.toURI().toURL()); + } +} diff --git a/maven-plugin/src/main/java/hudson/maven/MavenBuild.java b/maven-plugin/src/main/java/hudson/maven/MavenBuild.java index 1b9eb438934c1bfff0de17540727e557eb64bb5a..4ea982a79f8c68d96053d9c6b5f41292c3571837 100644 --- a/maven-plugin/src/main/java/hudson/maven/MavenBuild.java +++ b/maven-plugin/src/main/java/hudson/maven/MavenBuild.java @@ -25,7 +25,6 @@ package hudson.maven; import hudson.FilePath; import hudson.EnvVars; -import hudson.maven.reporters.MavenArtifact; import hudson.maven.reporters.MavenArtifactRecord; import hudson.maven.reporters.SurefireArchiver; import hudson.slaves.WorkspaceList; @@ -184,6 +183,14 @@ public class MavenBuild extends AbstractMavenBuild { return true; } + /** + * Information about artifacts produced by Maven. + */ + @Exported + public MavenArtifactRecord getMavenArtifacts() { + return getAction(MavenArtifactRecord.class); + } + /** * Exposes {@code MAVEN_OPTS} to forked processes. * diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java index afef8d617ff9a88ea993196ce40b47b2430f168e..7872f0704f38b5eb197cdccfc69ae1127529988c 100755 --- a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java +++ b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java @@ -374,6 +374,14 @@ public class MavenModuleSetBuild extends AbstractMavenBuild + + + +

Artifact Information

+

+ Information about Maven artifacts produced by this are exposed + in a machine readable form. This allows programmatic retrieval of the artifacts. +

+ \ No newline at end of file