Prevents us from leaving behind a temp dir with cyclic symlinks, which breaks JGit’s clean function.
That in turn can cause test builds to break:
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/783/console
Cleaning workspace
FATAL: Could not delete file …/workspace/core/jenkins_main_trunk/core/target/hudson5309354136960541268tmp/c/symlink/c/symlink/c/symlink/…/c/foo.xml
org.eclipse.jgit.api.errors.JGitInternalException: Could not delete file …/workspace/core/jenkins_main_trunk/core/target/hudson5309354136960541268tmp/c/symlink/c/symlink/c/symlink/…/c/foo.xml
at org.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:137)
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.clean(JGitAPIImpl.java:305)
at hudson.plugins.git.GitAPI.clean(GitAPI.java:248)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1213)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2236)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Could not delete file …/workspace/core/jenkins_main_trunk/core/target/hudson5309354136960541268tmp/c/symlink/c/symlink/c/symlink/…/c/foo.xml
at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:142)
at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
…
at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
at org.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:132)
... 14 more
~/.m2/repository/org/jvnet/hudson/main/test/multimod/moduleA/1.0-SNAPSHOT/moduleA-1.0-SNAPSHOT.jar was missing; need install goal.
Better to set a local repo so we do not pollute the real repo, and to avoid interaction between tests.
This reverts commit 36049b6528.
3f0fff9 failed to make Run.java compilable; and this commit introduced a rawtypes warning in ArtifactManager.
Provisionally switching back to originally type signatures which at least were accepted by the compiler, if not optimal.
DirectoryBrowserSupport is a bit of weirdo, in that its a very intelligent HttpResponse object that creates a whole hierarchy. But most of the time, complex structures are created by a series of POJOs referencing each other. Defining a signature to return HttpResponse prevents this common design pattern.
In contrast, as I wrote in the revised javadoc, one can force a certain HttpResponse during the object traversal by throwing an HttpResponse.
So this new signature can accommodate both cases, so I recommend this over the original signature
Most such plugins just need to store or load individual artifacts, and could easily be made to accept an InputStream, and this is easy to support in various implementations, so do that.
A few really expect to get a java.io.File directory that they can play with, but these are the exceptions.
Such plugins will just not work when used on builds with nondefault storage, unless they are rewritten.