Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JENKINS-10831 maven submodule build fails doing mkdir on master.
Remove the shadow copy of buildOn from MavenBuild.java and move the setter to
AbstractBuild to allow MavenModuleSetBuild.java to continue to set the
build node.
(cherry picked from commit 67262e4)
  • Loading branch information
oldelvet authored and vjuranek committed Feb 2, 2012
1 parent 219b74c commit bafad70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
10 changes: 10 additions & 0 deletions core/src/main/java/hudson/model/AbstractBuild.java
Expand Up @@ -185,6 +185,16 @@ public String getBuiltOnStr() {
return builtOn;
}

/**
* Set the name of the slave that the build was performed on.
* @param builtOn
* @since 1.429
*/
public 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
Expand Down
27 changes: 0 additions & 27 deletions maven-plugin/src/main/java/hudson/maven/MavenBuild.java
Expand Up @@ -111,13 +111,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);
Expand Down Expand Up @@ -311,26 +304,6 @@ public MavenModule getParent() {// don't know why, but javac wants this
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);
}

/**
* @param builtOn
* @since 1.394
*/
public void setBuiltOnStr( String builtOn )
{
this.builtOn = builtOn;
}

/**
* Runs Maven and builds the project.
*/
Expand Down

0 comments on commit bafad70

Please sign in to comment.