mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 20:15:22 +00:00
only deactivate plugins with cycle dependencies instead of failing to launch Jenkins
This commit is contained in:
1 parent
d0c9ee6588
commit
aad6e4c66c
3 files changed
+68
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user