提交 351845ce 编写于 作者: K kohsuke

create a symlink from MavenModuleSetBuild to MavenBuild in the file system


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7623 71c3de6d-444a-0410-be80-ed276b4c234a
上级 ae3df3c4
......@@ -4,6 +4,7 @@ import hudson.AbortException;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.Launcher;
import hudson.Util;
import hudson.maven.MavenBuild.ProxyImpl2;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
......@@ -16,6 +17,7 @@ import hudson.model.Result;
import hudson.remoting.Channel;
import hudson.remoting.VirtualChannel;
import hudson.util.ArgumentListBuilder;
import hudson.util.StreamTaskListener;
import org.apache.maven.BuildFailureException;
import org.apache.maven.embedder.MavenEmbedderException;
import org.apache.maven.execution.MavenSession;
......@@ -240,8 +242,16 @@ public final class MavenModuleSetBuild extends AbstractBuild<MavenModuleSet,Mave
getProject().updateTransientActions();
}
}
// symlink to this module build
String moduleFsName = newBuild.getProject().getModuleName().toFileSystemName();
Util.createSymlink(getRootDir(),
"../../modules/"+ moduleFsName +"/builds/"+newBuild.getId() /*ugly!*/,
moduleFsName, new StreamTaskListener());
} catch (IOException e) {
LOGGER.log(Level.WARNING,"Failed to update "+this,e);
} catch (InterruptedException e) {
LOGGER.log(Level.WARNING,"Failed to update "+this,e);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册