You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2013/07/23 06:51:38 UTC
[2/7] git commit: Fixed Jenkins Scheduler to use the correct plugin
resources path.
Fixed Jenkins Scheduler to use the correct plugin resources path.
Review: https://reviews.apache.org/r/12786
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/468ab993
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/468ab993
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/468ab993
Branch: refs/heads/master
Commit: 468ab993a547ab72c411adc0ce6716ea8b5c1e46
Parents: 3309e51
Author: Vinod Kone <vi...@twitter.com>
Authored: Fri Jul 19 17:29:15 2013 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Mon Jul 22 21:50:44 2013 -0700
----------------------------------------------------------------------
.../org/jenkinsci/plugins/mesos/JenkinsScheduler.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/468ab993/jenkins/src/main/java/org/jenkinsci/plugins/mesos/JenkinsScheduler.java
----------------------------------------------------------------------
diff --git a/jenkins/src/main/java/org/jenkinsci/plugins/mesos/JenkinsScheduler.java b/jenkins/src/main/java/org/jenkinsci/plugins/mesos/JenkinsScheduler.java
index b6892c0..ce33d57 100644
--- a/jenkins/src/main/java/org/jenkinsci/plugins/mesos/JenkinsScheduler.java
+++ b/jenkins/src/main/java/org/jenkinsci/plugins/mesos/JenkinsScheduler.java
@@ -1,5 +1,7 @@
package org.jenkinsci.plugins.mesos;
+import java.net.URL;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
@@ -66,12 +68,12 @@ public class JenkinsScheduler implements Scheduler {
// TODO(vinod): Instead of loading the library here, it would
// be great if the plugin can dynamically set the MESOS_NATIVE_LIBRARY
// environment variable or java.library.path system property.
- final String PLUGIN_DIR =
- Jenkins.getInstance().getRootDir().getPath() + "/plugins/mesos";
+ final URL resourceURL =
+ Jenkins.getInstance().getPlugin("mesos").getWrapper().baseResourceURL;
- String MESOS_NATIVE_LIBRARY = PLUGIN_DIR + "/libmesos.so";
+ String MESOS_NATIVE_LIBRARY = resourceURL.getPath() + "libmesos.so";
if (System.getProperty("os.name").indexOf("Mac") >= 0) {
- MESOS_NATIVE_LIBRARY = PLUGIN_DIR + "/libmesos.dylib";
+ MESOS_NATIVE_LIBRARY = resourceURL.getPath() + "libmesos.dylib";
}
MesosNativeLibrary.load(MESOS_NATIVE_LIBRARY);