only deactivate plugins with cycle dependencies instead of failing to launch Jenkins

This commit is contained in:
imod committed 2012-02-19 18:29:53 +01:00
1 parent d0c9ee6588
commit aad6e4c66c
3 files changed
+68 -3

No files matched your search

+13 -1
View File
@@ -125,6 +125,8 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
* The snapshot of <tt>disableFile.exists()</tt> as of the start up.
*/
private final boolean active;
private boolean hasCycleDependency = false;
private final List<Dependency> dependencies;
private final List<Dependency> optionalDependencies;
@@ -276,6 +278,8 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
return null;
}
@Override
public String toString() {
@@ -379,9 +383,17 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
* Returns true if this plugin is enabled for this session.
*/
public boolean isActive() {
return active;
return active && !hasCycleDependency();
}
public boolean hasCycleDependency(){
return hasCycleDependency;
}
public void setHasCycleDependency(boolean hasCycle){
hasCycleDependency = hasCycle;
}
public boolean isBundled() {
return isBundled;
}