提交 244ff567 编写于 作者: K Kohsuke Kawaguchi

Merge branch 'master' of github.com:jenkinsci/jenkins

......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
maven submodule build fails doing mkdir on master.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10831">issue 10831</a>)
<li class=bug>
CLI clients should be able to see plugin classes
<a href="http://jenkins.361315.n4.nabble.com/channel-example-and-plugin-classes-gives-ClassNotFoundException-tp3756092p3756092.html">report</a>
......@@ -76,12 +79,18 @@ Upcoming changes</a>
<li class=bug>
Project names in fingerprint records weren't updated when a project is renamed.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10330">issue 10330</a>)
<li class=rfe>
External job submision now supports &ly;displayName> and &lt;description> elements
(<a href="https://github.com/jenkinsci/jenkins/pull/215">pull 215</a>)
</ul>
</div><!--=TRUNK-END=-->
<!-- these changes are controlled by the release process. DO NOT MODIFY -->
<div id="rc" style="display:none;"><!--=BEGIN=-->
<h3><a name=v1.428>What's new in 1.428</a> <!--=DATE=--></h3>
<h3><a name=v1.429>What's new in 1.429</a> <!--=DATE=--></h3>
<!--=RC-CHANGES=-->
</div><!--=END=-->
<h3><a name=v1.428>What's new in 1.428</a> (2011/08/29)</h3>
<ul class=image>
<li class=bug>
CLI jar download was making the browser prefer a wrong file name.
......@@ -101,7 +110,6 @@ Upcoming changes</a>
(<a href="https://groups.google.com/forum/#!searchin/jenkinsci-users/timp/jenkinsci-users/YThhsdGBVwM/7_7GMYIYiRIJ">report</a>)
</ul>
</div><!--=END=-->
<h3><a name=v1.427>What's new in 1.427</a> (2011/08/19)</h3>
<ul class=image>
<li class='major bug'>
......
......@@ -669,21 +669,6 @@ THE SOFTWARE.
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.kohsuke.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<!-- version specified in grandparent pom -->
<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
......@@ -185,6 +185,17 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
return builtOn;
}
/**
* Allows subtypes to set the value of {@link #builtOn}.
* This is used for those implementations where an {@link AbstractBuild} is made 'built' without
* actually running its {@link #run()} method.
*
* @since 1.429
*/
protected void setBuiltOnStr( String builtOn ) {
this.builtOn = builtOn;
}
/**
* Gets the nearest ancestor {@link AbstractBuild} that belongs to
* {@linkplain AbstractProject#getRootProject() the root project of getProject()} that
......
......@@ -1761,6 +1761,9 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
FilePath ws = b!=null ? b.getWorkspace() : null;
if (ws!=null && getScm().processWorkspaceBeforeDeletion(this, ws, b.getBuiltOn())) {
ws.deleteRecursive();
for (WorkspaceListener wl : WorkspaceListener.all()) {
wl.afterDelete(this);
}
return new HttpRedirect(".");
} else {
// If we get here, that means the SCM blocked the workspace deletion.
......
......@@ -130,11 +130,20 @@ public class ExternalRun extends Run<ExternalJob,ExternalRun> {
Result r = Integer.parseInt(elementText(p))==0?Result.SUCCESS:Result.FAILURE;
p.nextTag(); // get to <duration> (optional)
if(p.getEventType()== START_ELEMENT
&& p.getLocalName().equals("duration")) {
duration[0] = Long.parseLong(elementText(p));
}
do {
p.nextTag();
if(p.getEventType()== START_ELEMENT){
if(p.getLocalName().equals("duration")) {
duration[0] = Long.parseLong(elementText(p));
}
else if(p.getLocalName().equals("displayName")) {
setDisplayName(p.getElementText());
}
else if(p.getLocalName().equals("description")) {
setDescription(p.getElementText());
}
}
} while(!(p.getEventType() == END_ELEMENT && p.getLocalName().equals("run")));
return r;
}
......
package hudson.model;
import hudson.ExtensionList;
import hudson.ExtensionPoint;
public abstract class WorkspaceListener implements ExtensionPoint {
/**
* Called after a workspace is deleted successfully.
* @param project
*/
public void afterDelete(AbstractProject project) {
}
/**
* All registered {@link WorkspaceListener}s.
*/
public static ExtensionList<WorkspaceListener> all() {
return Hudson.getInstance().getExtensionList(WorkspaceListener.class);
}
}
jenkins (1.428) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
-- Kohsuke Kawaguchi <kk@kohsuke.org> Mon, 29 Aug 2011 10:22:33 -0700
jenkins (1.427) unstable; urgency=low
* See http://jenkins-ci.org/changelog for more details.
......
......@@ -42,8 +42,10 @@ case "$1" in
fi
# directories needed for jenkins
# we don't do -R because it can take a long time on big installation
chown jenkins:adm /var/lib/jenkins /var/log/jenkins
chmod 750 /var/lib/jenkins /var/log/jenkins
# we don't do "chmod 750" so that the user can choose the pemission for g and o on their own
chmod u+rwx /var/lib/jenkins /var/log/jenkins
# make sure jenkins can delete everything in /var/run/jenkins to re-explode war
chown -R jenkins:adm /var/run/jenkins
......
......@@ -322,6 +322,13 @@ THE SOFTWARE.
<version>1.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>findbugs</groupId>
<artifactId>annotations</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
......
......@@ -150,6 +150,7 @@ public abstract class AbstractMavenProcessFactory
private static final long serialVersionUID = 1L;
static final class AcceptorImpl implements Acceptor, Serializable {
private static final long serialVersionUID = -2226788819948521018L;
private transient final ServerSocket serverSocket;
private transient Socket socket;
......@@ -184,6 +185,8 @@ public abstract class AbstractMavenProcessFactory
}
private static final class GetCharset implements Callable<String,IOException> {
private static final long serialVersionUID = 3459269768733083577L;
public String call() throws IOException {
return System.getProperty("file.encoding");
}
......@@ -309,6 +312,8 @@ public abstract class AbstractMavenProcessFactory
protected static final class GetRemotingJar implements Callable<String,IOException> {
private static final long serialVersionUID = 6022357183425911351L;
public String call() throws IOException {
return Which.jarFile(hudson.remoting.Launcher.class).getPath();
}
......
......@@ -53,6 +53,7 @@ import org.kohsuke.stapler.Stapler;
* @author Kohsuke Kawaguchi
*/
public final class ExecutedMojo implements Serializable {
private static final long serialVersionUID = -3048316415397586490L;
/**
* Plugin group ID.
*/
......@@ -149,7 +150,7 @@ public final class ExecutedMojo implements Serializable {
*
* TODO: better if XStream has a declarative way of marking fields as "target for intern".
*/
ExecutedMojo readResolve() {
protected Object readResolve() {
return new ExecutedMojo(intern(groupId),intern(artifactId),intern(version),intern(goal),intern(executionId),duration,intern(digest));
}
......
......@@ -95,13 +95,6 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
* @since 1.98.
*/
private List<ExecutedMojo> executedMojos;
/**
* Name of the slave this project was built on.
* Null or "" if built by the master. (null happens when we read old record that didn't have this information.)
* @since 1.394
*/
private String builtOn;
public MavenBuild(MavenModule job) throws IOException {
super(job);
......@@ -293,26 +286,12 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
return super.getParent();
}
/**
* @see hudson.model.AbstractBuild#getBuiltOn()
* @since 1.394
*/
public Node getBuiltOn() {
if(builtOn==null || builtOn.equals(""))
return Jenkins.getInstance();
else
return Jenkins.getInstance().getNode(builtOn);
// allow MavenModuleSetBuild to set this.
@Override
protected void setBuiltOnStr(String builtOn) {
super.setBuiltOnStr(builtOn);
}
/**
* @param builtOn
* @since 1.394
*/
public void setBuiltOnStr( String builtOn )
{
this.builtOn = builtOn;
}
/**
* Runs Maven and builds the project.
*/
......
......@@ -27,7 +27,6 @@ package hudson.maven;
import static hudson.model.Result.FAILURE;
import hudson.AbortException;
import hudson.EnvVars;
import hudson.ExtensionList;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.Launcher;
......@@ -39,7 +38,6 @@ import hudson.maven.reporters.MavenMailer;
import hudson.maven.settings.GlobalMavenSettingsProvider;
import hudson.maven.settings.MavenSettingsProvider;
import hudson.maven.settings.SettingsProviderUtils;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.Build;
......@@ -68,7 +66,6 @@ import hudson.util.IOUtils;
import hudson.util.MaskingClassLoader;
import hudson.util.StreamTaskListener;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InterruptedIOException;
......@@ -88,7 +85,6 @@ import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.BuildFailureException;
......@@ -101,7 +97,6 @@ import org.apache.maven.monitor.event.EventDispatcher;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingException;
import org.codehaus.plexus.util.PathTool;
import org.jenkinsci.lib.configprovider.ConfigProvider;
import org.jenkinsci.lib.configprovider.model.Config;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
......
......@@ -52,6 +52,8 @@ 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
*/
......@@ -90,7 +92,7 @@ public class MavenUtil {
Properties systemProperties = null;
String privateRepository = null;
AbstractProject project = build.getProject();
AbstractProject<?,?> project = build.getProject();
if (project instanceof ProjectWithMaven) {
m = ((ProjectWithMaven) project).inferMavenInstallation().forNode(Jenkins.getInstance(),listener);
......@@ -136,6 +138,7 @@ public class MavenUtil {
* Creates a fresh {@link MavenEmbedder} instance.
*
*/
@SuppressWarnings("RV_RETURN_VALUE_IGNORED_BAD_PRACTICE")
public static MavenEmbedder createEmbedder(MavenEmbedderRequest mavenEmbedderRequest) throws MavenEmbedderException, IOException {
......
......@@ -138,7 +138,7 @@ public final class ModuleDependency implements Serializable {
/**
* Upon reading from the disk, intern strings.
*/
public ModuleDependency readResolve() {
protected Object readResolve() {
return new ModuleDependency(groupId,artifactId,version,plugin);
}
......
......@@ -105,24 +105,24 @@ THE SOFTWARE.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.8.0</version>
</dependency>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
</dependency>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
......@@ -234,7 +234,7 @@ THE SOFTWARE.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
......@@ -407,7 +407,7 @@ THE SOFTWARE.
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
......@@ -508,6 +508,21 @@ THE SOFTWARE.
</execution>
</executions>
</plugin>-->
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册