File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\maven-plugin\src\main\java\hudson\maven\local_repo\PerExecutorLocalRepositoryLocator.java.html

1 package hudson.maven.local_repo;
2
3 import hudson.Extension;
4 import hudson.FilePath;
5 import hudson.maven.AbstractMavenBuild;
6 import hudson.model.Executor;
7 import org.kohsuke.stapler.DataBoundConstructor;
8
9 /**
10 * @author Kohsuke Kawaguchi
11 */
12 public class PerExecutorLocalRepositoryLocator extends LocalRepositoryLocator {
13 @DataBoundConstructor
14 public PerExecutorLocalRepositoryLocator() {}
15
16 @Override
17 public FilePath locate(AbstractMavenBuild build) {
18 return build.getBuiltOn().getRootPath().child("maven-repositories/"+ Executor.currentExecutor().getNumber());
19 }
20
21 @Extension
22 public static class DescriptorImpl extends LocalRepositoryLocatorDescriptor {
23 @Override
24 public String getDisplayName() {
25 return "Local to the executor";
26 }
27 }
28 }
29