
Untitled
By: a guest on
Mar 27th, 2011 | syntax:
None | size: 1.03 KB | views:
32 | expires: Never
44 // Workaround for HUDSON-5977.. this block can be removed whenever
45 // copyartifact plugin raises its minimum Hudson version to whatever
46 // release fixes #5977 (1.379).
47 // Make a call to copy a small file, to get all class-loading to happen.
48 // When we copy the real stuff there won't be any classloader requests
49 // coming the other direction, which due to full-buffer-deadlock problem
50 // can cause slave to hang.
51 hudson.PluginWrapper pw = Hudson.getInstance().getPluginManager().getPlugin("copyartifact");
52 if (pw==null) { System.out.println("foo"); return; }
53 URL base = pw.baseResourceURL;
54 if (base != null && "file".equals(base.getProtocol())) {
55 FilePath tmp = baseTargetDir.createTempDir("copyartifact", ".dir");
56 new FilePath(new File(base.getPath())).copyRecursiveTo("HUDSON-5977/**", tmp);
57 tmp.deleteRecursive();
58 }
59 // End workaround