Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 27th, 2011  |  syntax: None  |  size: 1.03 KB  |  views: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  44         // Workaround for HUDSON-5977.. this block can be removed whenever
  2.  45         // copyartifact plugin raises its minimum Hudson version to whatever
  3.  46         // release fixes #5977 (1.379).
  4.  47         // Make a call to copy a small file, to get all class-loading to happen.
  5.  48         // When we copy the real stuff there won't be any classloader requests
  6.  49         // coming the other direction, which due to full-buffer-deadlock problem
  7.  50         // can cause slave to hang.
  8.  51         hudson.PluginWrapper pw = Hudson.getInstance().getPluginManager().getPlugin("copyartifact");
  9.  52         if (pw==null) { System.out.println("foo"); return; }
  10.  53         URL base = pw.baseResourceURL;
  11.  54         if (base != null && "file".equals(base.getProtocol())) {
  12.  55             FilePath tmp = baseTargetDir.createTempDir("copyartifact", ".dir");
  13.  56             new FilePath(new File(base.getPath())).copyRecursiveTo("HUDSON-5977/**", tmp);
  14.  57             tmp.deleteRecursive();
  15.  58         }
  16.  59         // End workaround
clone this paste RAW Paste Data