mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-09 10:06:13 +00:00
Sort imports (#5732)
This commit is contained in:
1 parent
2cf5a80da0
commit
632033d6ad
1284 files changed
+6318
-7600
No files matched your search
@@ -23,14 +23,16 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import static java.util.logging.Level.FINE;
|
||||
import static java.util.logging.Level.parse;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.cli.client.Messages;
|
||||
import jakarta.websocket.ClientEndpointConfig;
|
||||
import jakarta.websocket.Endpoint;
|
||||
import jakarta.websocket.EndpointConfig;
|
||||
import jakarta.websocket.Session;
|
||||
import java.io.DataInputStream;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -52,12 +54,11 @@ import java.util.Properties;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import static java.util.logging.Level.FINE;
|
||||
import static java.util.logging.Level.parse;
|
||||
import jakarta.websocket.ClientEndpointConfig;
|
||||
import jakarta.websocket.Endpoint;
|
||||
import jakarta.websocket.EndpointConfig;
|
||||
import jakarta.websocket.Session;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.glassfish.tyrus.client.ClientManager;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package hudson.cli;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package hudson.cli;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package hudson.cli;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
/**
|
||||
* @author Kohsuke Kawaguchi
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
package hudson.cli;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.Closeable;
|
||||
import java.io.DataInputStream;
|
||||
@@ -36,8 +37,6 @@ import java.nio.channels.ClosedChannelException;
|
||||
import java.nio.channels.ReadPendingException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.io.input.BoundedInputStream;
|
||||
import org.apache.commons.io.input.CountingInputStream;
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import static java.util.logging.Level.FINE;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static java.util.logging.Level.FINE;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.Console;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -44,7 +44,6 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import org.apache.sshd.common.config.keys.FilePasswordProvider;
|
||||
import org.apache.sshd.common.util.io.resource.PathResource;
|
||||
import org.apache.sshd.common.util.security.SecurityUtils;
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
|
||||
package hudson.cli;
|
||||
|
||||
import static java.util.logging.Level.FINE;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.util.QuotedStringTokenizer;
|
||||
import java.io.IOException;
|
||||
import java.net.SocketAddress;
|
||||
@@ -36,7 +39,6 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import static java.util.logging.Level.FINE;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.sshd.client.SshClient;
|
||||
import org.apache.sshd.client.channel.ClientChannel;
|
||||
@@ -51,8 +53,6 @@ import org.apache.sshd.common.util.io.NoCloseInputStream;
|
||||
import org.apache.sshd.common.util.io.NoCloseOutputStream;
|
||||
import org.apache.sshd.common.util.security.SecurityUtils;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
|
||||
/**
|
||||
* Implements SSH connection mode of {@link CLI}.
|
||||
* In a separate class to avoid any class loading of {@code sshd-core} when not using {@code -ssh} mode.
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
// ========================================================================
|
||||
package hudson.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** StringTokenizer with Quoting support.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package hudson.cli;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.parallel.Execution;
|
||||
import org.junit.jupiter.api.parallel.ExecutionMode;
|
||||
@@ -7,11 +11,6 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
@Execution(ExecutionMode.CONCURRENT)
|
||||
public class HexDumpTest {
|
||||
|
||||
|
||||
@@ -24,16 +24,14 @@
|
||||
|
||||
package hudson.cli;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PipedInputStream;
|
||||
import java.io.PipedOutputStream;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class PlainCLIProtocolTest {
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package hudson.cli;
|
||||
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.Execution;
|
||||
import org.junit.jupiter.api.parallel.ExecutionMode;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -11,9 +10,9 @@ import java.security.GeneralSecurityException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.KeyPair;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.Execution;
|
||||
import org.junit.jupiter.api.parallel.ExecutionMode;
|
||||
|
||||
/**
|
||||
keys were generated with ssh-keygen from OpenSSH_7.9p1, LibreSSL 2.7.3
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
*/
|
||||
package hudson.util;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.model.ManagementLink;
|
||||
import hudson.security.Permission;
|
||||
import java.net.URL;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.jenkinsci.Symbol;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.MarkupText.SubText;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Common part between {@link MarkupText} and {@link MarkupText.SubText}.
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.model.Saveable;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import static org.apache.commons.io.FilenameUtils.getBaseName;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.Plugin.DummyImpl;
|
||||
import hudson.PluginWrapper.Dependency;
|
||||
@@ -31,7 +34,26 @@ import hudson.util.CyclicGraphDetector;
|
||||
import hudson.util.CyclicGraphDetector.CycleDetectedException;
|
||||
import hudson.util.IOUtils;
|
||||
import hudson.util.MaskingClassLoader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.ClassLoaderReflectionToolkit;
|
||||
import jenkins.ExtensionFilter;
|
||||
import jenkins.plugins.DetachedPluginsUtil;
|
||||
@@ -53,29 +75,6 @@ import org.apache.tools.zip.ZipEntry;
|
||||
import org.apache.tools.zip.ZipExtraField;
|
||||
import org.apache.tools.zip.ZipOutputStream;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.apache.commons.io.FilenameUtils.getBaseName;
|
||||
|
||||
public class ClassicPluginStrategy implements PluginStrategy {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ClassicPluginStrategy.class.getName());
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.util.DelegatingOutputStream;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,10 +23,11 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package hudson;
|
||||
|
||||
import static hudson.init.InitMilestone.COMPLETED;
|
||||
|
||||
import hudson.init.Initializer;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.util.SystemProperties;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static hudson.init.InitMilestone.COMPLETED;
|
||||
|
||||
/**
|
||||
* Registers a DNS multi-cast service-discovery support.
|
||||
*
|
||||
|
||||
@@ -25,16 +25,15 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.security.ACLContext;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.security.ACL;
|
||||
|
||||
import hudson.security.ACLContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Collection;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
/**
|
||||
* Runs a job on all projects in the order of dependencies
|
||||
|
||||
@@ -23,34 +23,32 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Describable;
|
||||
import hudson.model.Hudson;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.model.ViewDescriptor;
|
||||
import hudson.model.Descriptor.FormException;
|
||||
import hudson.util.AdaptedIterator;
|
||||
import hudson.util.Iterators.FlattenIterator;
|
||||
import hudson.slaves.NodeDescriptor;
|
||||
import hudson.tasks.Publisher;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
|
||||
import hudson.model.Describable;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Descriptor.FormException;
|
||||
import hudson.model.Hudson;
|
||||
import hudson.model.ViewDescriptor;
|
||||
import hudson.slaves.NodeDescriptor;
|
||||
import hudson.tasks.Publisher;
|
||||
import hudson.util.AdaptedIterator;
|
||||
import hudson.util.Iterators.FlattenIterator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.model.Jenkins;
|
||||
import net.sf.json.JSONException;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
|
||||
/**
|
||||
* {@link ExtensionList} for holding a set of {@link Descriptor}s, which is a group of descriptors for
|
||||
|
||||
@@ -23,27 +23,26 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.remoting.VirtualChannel;
|
||||
import hudson.util.CyclicGraphDetector;
|
||||
import hudson.util.CyclicGraphDetector.CycleDetectedException;
|
||||
import hudson.util.VariableResolver;
|
||||
import jenkins.security.MasterToSlaveCallable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.Arrays;
|
||||
import java.util.TreeSet;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Logger;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import jenkins.security.MasterToSlaveCallable;
|
||||
|
||||
/**
|
||||
* Environment variables.
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package hudson;
|
||||
|
||||
import org.apache.commons.jelly.JellyContext;
|
||||
import org.apache.commons.jelly.JellyException;
|
||||
import org.apache.commons.jelly.expression.Expression;
|
||||
import org.apache.commons.jelly.expression.ExpressionFactory;
|
||||
import org.apache.commons.jelly.expression.ExpressionSupport;
|
||||
import org.apache.commons.jexl.JexlContext;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.commons.jelly.JellyContext;
|
||||
import org.apache.commons.jelly.JellyException;
|
||||
import org.apache.commons.jelly.expression.Expression;
|
||||
import org.apache.commons.jelly.expression.ExpressionFactory;
|
||||
import org.apache.commons.jelly.expression.ExpressionSupport;
|
||||
import org.apache.commons.jexl.JexlContext;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
|
||||
@@ -23,19 +23,18 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import jenkins.YesNoMaybe;
|
||||
import net.java.sezpoz.Indexable;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import static jenkins.YesNoMaybe.MAYBE;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
import jenkins.YesNoMaybe;
|
||||
import net.java.sezpoz.Indexable;
|
||||
|
||||
/**
|
||||
* Marks a field, a method, or a class for automatic discovery, so that Hudson can locate
|
||||
* implementations of {@link ExtensionPoint}s automatically.
|
||||
|
||||
@@ -38,18 +38,6 @@ import com.google.inject.spi.ProvisionListener;
|
||||
import hudson.init.InitMilestone;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Hudson;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.ExtensionFilter;
|
||||
import jenkins.ExtensionRefreshException;
|
||||
import jenkins.ProxyInjector;
|
||||
import jenkins.model.Jenkins;
|
||||
import net.java.sezpoz.Index;
|
||||
import net.java.sezpoz.IndexItem;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -67,6 +55,17 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
import javax.annotation.PostConstruct;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.ExtensionFilter;
|
||||
import jenkins.ExtensionRefreshException;
|
||||
import jenkins.ProxyInjector;
|
||||
import jenkins.model.Jenkins;
|
||||
import net.java.sezpoz.Index;
|
||||
import net.java.sezpoz.IndexItem;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Discovers the implementations of an extension point.
|
||||
|
||||
@@ -23,15 +23,14 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson;
|
||||
import hudson.init.InitMilestone;
|
||||
import hudson.model.Hudson;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.util.AdaptedIterator;
|
||||
import hudson.util.DescriptorList;
|
||||
import hudson.util.Iterators;
|
||||
import hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -44,8 +43,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.util.io.OnMaster;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,13 +24,12 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.tasks.UserNameResolver;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.util.CopyOnWriteList;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
/**
|
||||
* Compatibility layer for legacy manual registration of extension points.
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
/**
|
||||
* Marker interface that designates extensible components
|
||||
|
||||
@@ -25,9 +25,16 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import static hudson.FilePath.TarCompression.GZIP;
|
||||
import static hudson.Util.fileToPath;
|
||||
import static hudson.Util.fixEmpty;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.jcraft.jzlib.GZIPInputStream;
|
||||
import com.jcraft.jzlib.GZIPOutputStream;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.Launcher.LocalLauncher;
|
||||
import hudson.Launcher.RemoteLauncher;
|
||||
@@ -59,7 +66,6 @@ import hudson.util.IOUtils;
|
||||
import hudson.util.NamingThreadFactory;
|
||||
import hudson.util.io.Archiver;
|
||||
import hudson.util.io.ArchiverFactory;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
@@ -68,6 +74,7 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.NotSerializableException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.OutputStream;
|
||||
@@ -93,6 +100,7 @@ import java.nio.file.attribute.PosixFilePermission;
|
||||
import java.nio.file.attribute.PosixFilePermissions;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Enumeration;
|
||||
@@ -110,9 +118,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import jenkins.FilePathFilter;
|
||||
import jenkins.MasterToSlaveFileCallable;
|
||||
import jenkins.SlaveToMasterFileCallable;
|
||||
@@ -127,6 +132,7 @@ import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.apache.commons.io.input.CountingInputStream;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.DirectoryScanner;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.types.FileSet;
|
||||
@@ -139,14 +145,6 @@ import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
|
||||
import static hudson.FilePath.TarCompression.GZIP;
|
||||
import static hudson.Util.fileToPath;
|
||||
import static hudson.Util.fixEmpty;
|
||||
import java.io.NotSerializableException;
|
||||
|
||||
import java.util.Collections;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
|
||||
/**
|
||||
* {@link File} like object with remoting support.
|
||||
*
|
||||
|
||||
@@ -25,24 +25,17 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.Slave;
|
||||
import hudson.security.ACL;
|
||||
import hudson.security.AccessControlled;
|
||||
import hudson.security.AuthorizationStrategy;
|
||||
import hudson.security.GlobalSecurityConfiguration;
|
||||
import hudson.security.Permission;
|
||||
import hudson.security.SecurityRealm;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
import jenkins.util.SystemProperties;
|
||||
import hudson.cli.CLICommand;
|
||||
import hudson.console.ConsoleAnnotationDescriptor;
|
||||
import hudson.console.ConsoleAnnotatorFactory;
|
||||
import hudson.init.InitMilestone;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.Action;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.Describable;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.DescriptorVisibilityFilter;
|
||||
@@ -56,11 +49,12 @@ import hudson.model.JobPropertyDescriptor;
|
||||
import hudson.model.ModelObject;
|
||||
import hudson.model.Node;
|
||||
import hudson.model.PageDecorator;
|
||||
import jenkins.model.SimplePageDecorator;
|
||||
import hudson.model.PaneStatusProperties;
|
||||
import hudson.model.ParameterDefinition;
|
||||
import hudson.model.ParameterDefinition.ParameterDescriptor;
|
||||
import hudson.model.PasswordParameterDefinition;
|
||||
import hudson.model.Run;
|
||||
import hudson.model.Slave;
|
||||
import hudson.model.TimeZoneProperty;
|
||||
import hudson.model.TopLevelItem;
|
||||
import hudson.model.User;
|
||||
@@ -68,6 +62,12 @@ import hudson.model.View;
|
||||
import hudson.scm.SCM;
|
||||
import hudson.scm.SCMDescriptor;
|
||||
import hudson.search.SearchableModelObject;
|
||||
import hudson.security.ACL;
|
||||
import hudson.security.AccessControlled;
|
||||
import hudson.security.AuthorizationStrategy;
|
||||
import hudson.security.GlobalSecurityConfiguration;
|
||||
import hudson.security.Permission;
|
||||
import hudson.security.SecurityRealm;
|
||||
import hudson.security.captcha.CaptchaSupport;
|
||||
import hudson.security.csrf.CrumbIssuer;
|
||||
import hudson.slaves.Cloud;
|
||||
@@ -86,13 +86,12 @@ import hudson.util.FormValidation.CheckMethod;
|
||||
import hudson.util.HudsonIsLoading;
|
||||
import hudson.util.HudsonIsRestarting;
|
||||
import hudson.util.Iterators;
|
||||
import hudson.util.jna.GNUCLibrary;
|
||||
import hudson.util.RunList;
|
||||
import hudson.util.Secret;
|
||||
import hudson.util.jna.GNUCLibrary;
|
||||
import hudson.views.MyViewsTabBar;
|
||||
import hudson.views.ViewsTabBar;
|
||||
import hudson.widgets.RenderOnDemandClosure;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
@@ -126,31 +125,34 @@ import java.util.ConcurrentModificationException;
|
||||
import java.util.Date;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TimeZone;
|
||||
import java.util.TreeMap;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogManager;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import jenkins.model.GlobalConfiguration;
|
||||
import jenkins.model.GlobalConfigurationCategory;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.ModelObjectWithChildren;
|
||||
import jenkins.model.ModelObjectWithContextMenu;
|
||||
|
||||
import jenkins.model.SimplePageDecorator;
|
||||
import jenkins.util.SystemProperties;
|
||||
import org.apache.commons.jelly.JellyContext;
|
||||
import org.apache.commons.jelly.JellyTagException;
|
||||
import org.apache.commons.jelly.Script;
|
||||
@@ -160,24 +162,14 @@ import org.apache.commons.jexl.util.Introspector;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jenkins.ui.icon.IconSet;
|
||||
import org.jvnet.tiger_types.Types;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.DoNotUse;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.Ancestor;
|
||||
import org.kohsuke.stapler.RawHtmlArgument;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.kohsuke.stapler.RawHtmlArgument;
|
||||
|
||||
import hudson.model.PasswordParameterDefinition;
|
||||
import hudson.util.RunList;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.stream.Collectors;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.accmod.restrictions.DoNotUse;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,32 +23,25 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import static org.apache.commons.io.output.NullOutputStream.NULL_OUTPUT_STREAM;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.Proc.LocalProc;
|
||||
import hudson.Proc.ProcWithJenkins23271Patch;
|
||||
import hudson.model.Computer;
|
||||
import jenkins.util.MemoryReductionUtil;
|
||||
import hudson.model.Run;
|
||||
import hudson.util.QuotedStringTokenizer;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.model.Node;
|
||||
import hudson.model.Run;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.remoting.Channel;
|
||||
import hudson.remoting.Pipe;
|
||||
import hudson.remoting.RemoteInputStream;
|
||||
import hudson.remoting.RemoteOutputStream;
|
||||
import hudson.remoting.VirtualChannel;
|
||||
import hudson.util.StreamCopyThread;
|
||||
import hudson.util.ArgumentListBuilder;
|
||||
import hudson.util.ProcessTree;
|
||||
import jenkins.security.MasterToSlaveCallable;
|
||||
import jenkins.tasks.filters.EnvVarsFilterRuleWrapper;
|
||||
import jenkins.tasks.filters.EnvVarsFilterLocalRule;
|
||||
import jenkins.tasks.filters.EnvVarsFilterableBuilder;
|
||||
import org.apache.commons.io.input.NullInputStream;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.Beta;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import hudson.util.QuotedStringTokenizer;
|
||||
import hudson.util.StreamCopyThread;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -56,16 +49,22 @@ import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.apache.commons.io.output.NullOutputStream.NULL_OUTPUT_STREAM;
|
||||
import hudson.Proc.ProcWithJenkins23271Patch;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.security.MasterToSlaveCallable;
|
||||
import jenkins.tasks.filters.EnvVarsFilterLocalRule;
|
||||
import jenkins.tasks.filters.EnvVarsFilterRuleWrapper;
|
||||
import jenkins.tasks.filters.EnvVarsFilterableBuilder;
|
||||
import jenkins.util.MemoryReductionUtil;
|
||||
import org.apache.commons.io.input.NullInputStream;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.Beta;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
/**
|
||||
* Starts a process.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.model.AbstractBuild;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.model.Node;
|
||||
import hudson.model.Executor;
|
||||
import hudson.model.Node;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.tasks.BuildWrapper;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
|
||||
/**
|
||||
* Decorates {@link Launcher} so that one can intercept executions of commands
|
||||
|
||||
@@ -24,16 +24,15 @@
|
||||
|
||||
package hudson;
|
||||
|
||||
import jenkins.util.SystemProperties;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import javax.servlet.ServletContext;
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.logging.Logger;
|
||||
import javax.servlet.ServletContext;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.util.SystemProperties;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link PluginManager}.
|
||||
|
||||
@@ -23,28 +23,27 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import jenkins.util.SystemProperties;
|
||||
import com.thoughtworks.xstream.core.util.Base64Encoder;
|
||||
import hudson.util.DualOutputStream;
|
||||
import hudson.util.EncodingStream;
|
||||
import com.thoughtworks.xstream.core.util.Base64Encoder;
|
||||
import hudson.util.IOUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.net.HttpRetryException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.nio.charset.Charset;
|
||||
import jenkins.util.SystemProperties;
|
||||
|
||||
/**
|
||||
* Entry point to Hudson from command line.
|
||||
|
||||
@@ -25,7 +25,6 @@ package hudson;
|
||||
|
||||
import hudson.model.PermalinkProjectAction.Permalink;
|
||||
import hudson.util.EditDistance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
package hudson;
|
||||
|
||||
import hudson.util.VersionNumber;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
@@ -23,37 +23,34 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.init.Initializer;
|
||||
import hudson.init.Terminator;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Descriptor.FormException;
|
||||
import hudson.model.Saveable;
|
||||
import hudson.model.listeners.ItemListener;
|
||||
import hudson.model.listeners.SaveableListener;
|
||||
import hudson.model.Descriptor.FormException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jenkins.model.GlobalConfiguration;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.util.SystemProperties;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.StaplerProxy;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.File;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import hudson.init.Initializer;
|
||||
import hudson.init.Terminator;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.GlobalConfiguration;
|
||||
|
||||
/**
|
||||
* Base class of Hudson plugin.
|
||||
*
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.util.Collection;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import jenkins.util.AntClassLoader;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,17 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import static hudson.init.InitMilestone.COMPLETED;
|
||||
import static hudson.init.InitMilestone.PLUGINS_LISTED;
|
||||
import static hudson.init.InitMilestone.PLUGINS_PREPARED;
|
||||
import static hudson.init.InitMilestone.PLUGINS_STARTED;
|
||||
import static java.util.logging.Level.FINE;
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.PluginWrapper.Dependency;
|
||||
import hudson.init.InitMilestone;
|
||||
@@ -52,6 +63,48 @@ import hudson.util.Retrier;
|
||||
import hudson.util.Service;
|
||||
import hudson.util.VersionNumber;
|
||||
import hudson.util.XStream2;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import jenkins.ClassLoaderReflectionToolkit;
|
||||
import jenkins.ExtensionRefreshException;
|
||||
import jenkins.InitReactorRunner;
|
||||
@@ -97,67 +150,12 @@ import org.kohsuke.stapler.export.Exported;
|
||||
import org.kohsuke.stapler.export.ExportedBean;
|
||||
import org.kohsuke.stapler.interceptor.RequirePOST;
|
||||
import org.kohsuke.stapler.verb.POST;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.JarURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static hudson.init.InitMilestone.COMPLETED;
|
||||
import static hudson.init.InitMilestone.PLUGINS_LISTED;
|
||||
import static hudson.init.InitMilestone.PLUGINS_PREPARED;
|
||||
import static hudson.init.InitMilestone.PLUGINS_STARTED;
|
||||
import static java.util.logging.Level.FINE;
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Manages {@link PluginWrapper}s.
|
||||
*
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.model.Hudson;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
|
||||
/**
|
||||
* Pluggability point for how to create {@link PluginWrapper}.
|
||||
|
||||
@@ -24,7 +24,17 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.ALREADY_DISABLED;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.DISABLED;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.ERROR_DISABLING;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.NOT_DISABLED_DEPENDANTS;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.NO_SUCH_PLUGIN;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.apache.commons.io.FilenameUtils.getBaseName;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.PluginManager.PluginInstanceStore;
|
||||
import hudson.model.AdministrativeMonitor;
|
||||
import hudson.model.Api;
|
||||
@@ -33,28 +43,6 @@ import hudson.model.UpdateCenter;
|
||||
import hudson.model.UpdateSite;
|
||||
import hudson.util.VersionNumber;
|
||||
import io.jenkins.lib.versionnumber.JavaSpecificationVersion;
|
||||
import jenkins.YesNoMaybe;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.security.UpdateSiteWarningsMonitor;
|
||||
import jenkins.util.AntClassLoader;
|
||||
import jenkins.util.URLClassLoader2;
|
||||
import jenkins.util.java.JavaUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.Beta;
|
||||
import org.kohsuke.accmod.restrictions.DoNotUse;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.HttpResponse;
|
||||
import org.kohsuke.stapler.HttpResponses;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.kohsuke.stapler.export.Exported;
|
||||
import org.kohsuke.stapler.export.ExportedBean;
|
||||
import org.kohsuke.stapler.interceptor.RequirePOST;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -80,15 +68,26 @@ import java.util.jar.Manifest;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.ALREADY_DISABLED;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.DISABLED;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.ERROR_DISABLING;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.NOT_DISABLED_DEPENDANTS;
|
||||
import static hudson.PluginWrapper.PluginDisableStatus.NO_SUCH_PLUGIN;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import jenkins.YesNoMaybe;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.plugins.DetachedPluginsUtil;
|
||||
import static org.apache.commons.io.FilenameUtils.getBaseName;
|
||||
import jenkins.security.UpdateSiteWarningsMonitor;
|
||||
import jenkins.util.AntClassLoader;
|
||||
import jenkins.util.URLClassLoader2;
|
||||
import jenkins.util.java.JavaUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.Beta;
|
||||
import org.kohsuke.accmod.restrictions.DoNotUse;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.HttpResponse;
|
||||
import org.kohsuke.stapler.HttpResponses;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.kohsuke.stapler.export.Exported;
|
||||
import org.kohsuke.stapler.export.ExportedBean;
|
||||
import org.kohsuke.stapler.interceptor.RequirePOST;
|
||||
|
||||
/**
|
||||
* Represents a Jenkins plug-in and associated control information
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.Launcher.ProcStarter;
|
||||
import hudson.model.TaskListener;
|
||||
@@ -32,10 +33,8 @@ import hudson.util.DaemonThreadFactory;
|
||||
import hudson.util.ExceptionCatchingThreadFactory;
|
||||
import hudson.util.NamingThreadFactory;
|
||||
import hudson.util.NullStream;
|
||||
import hudson.util.StreamCopyThread;
|
||||
import hudson.util.ProcessTree;
|
||||
import org.apache.commons.io.input.NullInputStream;
|
||||
|
||||
import hudson.util.StreamCopyThread;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -51,7 +50,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import org.apache.commons.io.input.NullInputStream;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
package hudson;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import hudson.model.AbstractDescribableImpl;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Saveable;
|
||||
@@ -49,7 +50,6 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Pattern;
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.security.stapler.StaplerAccessibleType;
|
||||
import jenkins.util.JenkinsJVM;
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package hudson;
|
||||
|
||||
import org.kohsuke.stapler.QueryParameter;
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import org.kohsuke.stapler.QueryParameter;
|
||||
|
||||
/**
|
||||
* Used in conjunction with {@link QueryParameter} to refer to
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
@@ -32,7 +32,6 @@ import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* This filter allows you to modify headers set by the container or other servlets
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
|
||||
package hudson;
|
||||
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
|
||||
/**
|
||||
* Accompanies {@link Restricted} annotation to indicate when the access restriction was placed.
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletException;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Obtains the structured form data from {@link StaplerRequest}.
|
||||
* See http://wiki.jenkins-ci.org/display/JENKINS/Structured+Form+Submission
|
||||
|
||||
@@ -23,41 +23,38 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.model.AperiodicWork;
|
||||
import hudson.slaves.OfflineCause;
|
||||
import hudson.util.VersionNumber;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.SequenceInputStream;
|
||||
import java.net.BindException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.ServerSocketChannel;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.interfaces.RSAPublicKey;
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
|
||||
import hudson.model.AperiodicWork;
|
||||
import hudson.util.VersionNumber;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.AgentProtocol;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.identity.InstanceIdentityProvider;
|
||||
import jenkins.security.stapler.StaplerAccessibleType;
|
||||
import jenkins.slaves.RemotingVersionInfo;
|
||||
import jenkins.util.SystemProperties;
|
||||
import hudson.slaves.OfflineCause;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import jenkins.AgentProtocol;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.net.BindException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.Socket;
|
||||
import java.nio.channels.ServerSocketChannel;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.io.output.NullOutputStream;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
@@ -24,15 +24,14 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import static hudson.init.InitMilestone.COMPLETED;
|
||||
|
||||
import hudson.init.Initializer;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.util.SystemProperties;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static hudson.init.InitMilestone.COMPLETED;
|
||||
|
||||
/**
|
||||
* Monitors a UDP multicast broadcast and respond with the location of the Hudson service.
|
||||
*
|
||||
|
||||
@@ -23,26 +23,14 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.CheckReturnValue;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.model.TaskListener;
|
||||
import jenkins.util.MemoryReductionUtil;
|
||||
import hudson.util.QuotedStringTokenizer;
|
||||
import hudson.util.VariableResolver;
|
||||
import jenkins.util.SystemProperties;
|
||||
|
||||
import jenkins.util.io.PathRemover;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.io.output.NullOutputStream;
|
||||
import org.apache.commons.lang.time.FastDateFormat;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.taskdefs.Copy;
|
||||
import org.apache.tools.ant.types.FileSet;
|
||||
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.Closeable;
|
||||
@@ -110,15 +98,22 @@ import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.CheckForNull;
|
||||
import edu.umd.cs.findbugs.annotations.CheckReturnValue;
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import jenkins.util.MemoryReductionUtil;
|
||||
import jenkins.util.SystemProperties;
|
||||
import jenkins.util.io.PathRemover;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.io.output.NullOutputStream;
|
||||
import org.apache.commons.lang.time.FastDateFormat;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.taskdefs.Copy;
|
||||
import org.apache.tools.ant.types.FileSet;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,36 +23,45 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import hudson.security.ACLContext;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import jenkins.util.SystemProperties;
|
||||
import static java.util.logging.Level.FINE;
|
||||
import static java.util.logging.Level.SEVERE;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
|
||||
import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
|
||||
import com.thoughtworks.xstream.core.JVM;
|
||||
import hudson.model.Hudson;
|
||||
import hudson.security.ACL;
|
||||
import hudson.security.ACLContext;
|
||||
import hudson.util.AWTProblem;
|
||||
import hudson.util.BootFailure;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.util.ChartUtil;
|
||||
import hudson.util.HudsonFailedToLoad;
|
||||
import hudson.util.HudsonIsLoading;
|
||||
import hudson.util.IncompatibleAntVersionDetected;
|
||||
import hudson.util.IncompatibleServletVersionDetected;
|
||||
import hudson.util.IncompatibleVMDetected;
|
||||
import hudson.util.InsufficientPermissionDetected;
|
||||
import hudson.util.NoHomeDir;
|
||||
import hudson.util.RingBufferLogHandler;
|
||||
import hudson.util.NoTempDir;
|
||||
import hudson.util.IncompatibleAntVersionDetected;
|
||||
import hudson.util.HudsonFailedToLoad;
|
||||
import hudson.util.ChartUtil;
|
||||
import hudson.util.AWTProblem;
|
||||
import jenkins.util.JenkinsJVM;
|
||||
import org.jvnet.localizer.LocaleProvider;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.jelly.JellyFacet;
|
||||
import org.apache.tools.ant.types.FileSet;
|
||||
|
||||
import hudson.util.RingBufferLogHandler;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.security.Security;
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Formatter;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
@@ -63,24 +72,14 @@ import javax.servlet.ServletResponse;
|
||||
import javax.servlet.SessionTrackingMode;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.TransformerFactoryConfigurationError;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.security.Security;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Formatter;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import static java.util.logging.Level.FINE;
|
||||
import static java.util.logging.Level.SEVERE;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.util.JenkinsJVM;
|
||||
import jenkins.util.SystemProperties;
|
||||
import org.apache.tools.ant.types.FileSet;
|
||||
import org.jvnet.localizer.LocaleProvider;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.jelly.JellyFacet;
|
||||
|
||||
/**
|
||||
* Entry point when Hudson is used as a webapp.
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import hudson.model.AbstractBuild;
|
||||
import hudson.model.Action;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.model.AbstractBuild;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,18 +33,6 @@ import hudson.diagnosis.OldDataMonitor;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.util.AtomicFileWriter;
|
||||
import hudson.util.XStream2;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.Locator;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.ext.Locator2;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -52,15 +40,27 @@ import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.Serializable;
|
||||
import java.io.Writer;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.util.Collections;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.Locator;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.ext.Locator2;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
/**
|
||||
* Represents an XML data file that Jenkins uses as a data file.
|
||||
|
||||
@@ -3,10 +3,9 @@ package hudson.cli;
|
||||
import hudson.model.AbstractBuild;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.Fingerprint.RangeSet;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* {@link CLICommand} that acts on a series of {@link AbstractBuild}s.
|
||||
|
||||
@@ -23,13 +23,11 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.TopLevelItem;
|
||||
import hudson.model.DirectlyModifiableView;
|
||||
import hudson.model.TopLevelItem;
|
||||
import hudson.model.View;
|
||||
|
||||
import java.util.List;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,43 +23,40 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.Util;
|
||||
import hudson.console.ModelHyperlinkNote;
|
||||
import hudson.model.Cause.UserIdCause;
|
||||
import hudson.model.CauseAction;
|
||||
import hudson.model.Job;
|
||||
import hudson.model.Run;
|
||||
import hudson.model.ParametersAction;
|
||||
import hudson.model.ParameterValue;
|
||||
import hudson.model.ParametersDefinitionProperty;
|
||||
import hudson.model.ParameterDefinition;
|
||||
import hudson.Extension;
|
||||
import hudson.AbortException;
|
||||
import hudson.model.Queue;
|
||||
import hudson.model.Item;
|
||||
import hudson.model.Job;
|
||||
import hudson.model.ParameterDefinition;
|
||||
import hudson.model.ParameterValue;
|
||||
import hudson.model.ParametersAction;
|
||||
import hudson.model.ParametersDefinitionProperty;
|
||||
import hudson.model.Queue;
|
||||
import hudson.model.Run;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.model.User;
|
||||
import hudson.model.queue.QueueTaskFuture;
|
||||
import hudson.util.EditDistance;
|
||||
import hudson.util.StreamTaskListener;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.ParameterizedJobMixIn;
|
||||
import jenkins.scm.SCMDecisionHandler;
|
||||
import jenkins.triggers.SCMTriggerItem;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.CmdLineException;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.ParameterizedJobMixIn;
|
||||
import jenkins.triggers.SCMTriggerItem;
|
||||
|
||||
/**
|
||||
* Builds a job, and optionally waits until its completion.
|
||||
*
|
||||
|
||||
@@ -23,28 +23,11 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import hudson.model.UnprotectedRootAction;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import org.jenkinsci.Symbol;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
import org.kohsuke.stapler.StaplerProxy;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.UnprotectedRootAction;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PipedInputStream;
|
||||
@@ -54,15 +37,28 @@ import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.UnsupportedCharsetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.util.FullDuplexHttpService;
|
||||
import jenkins.websocket.WebSocketSession;
|
||||
import jenkins.websocket.WebSockets;
|
||||
import org.jenkinsci.Symbol;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.stapler.HttpResponse;
|
||||
import org.kohsuke.stapler.HttpResponses;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
import org.kohsuke.stapler.StaplerProxy;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
/**
|
||||
* Cancel previous quiet down Jenkins - preparation for a restart
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
/**
|
||||
* Clears the build queue
|
||||
|
||||
@@ -25,14 +25,13 @@ package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.security.csrf.CrumbExclusion;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.DoNotUse;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.DoNotUse;
|
||||
|
||||
/**
|
||||
* Makes CLI HTTP fallback work with CSRF protection enabled (JENKINS-18114).
|
||||
|
||||
@@ -26,12 +26,11 @@ package hudson.cli;
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Computer;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
/**
|
||||
* Reconnect to a node or nodes.
|
||||
|
||||
@@ -27,15 +27,6 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.remoting.ClassFilter;
|
||||
import hudson.remoting.ObjectInputStreamEx;
|
||||
import hudson.remoting.SocketChannelStream;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.CipherInputStream;
|
||||
import javax.crypto.CipherOutputStream;
|
||||
import javax.crypto.KeyAgreement;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.interfaces.DHPublicKey;
|
||||
import javax.crypto.spec.DHParameterSpec;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -56,6 +47,14 @@ import java.security.interfaces.DSAPublicKey;
|
||||
import java.security.interfaces.RSAPublicKey;
|
||||
import java.security.spec.X509EncodedKeySpec;
|
||||
import java.util.Base64;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.CipherInputStream;
|
||||
import javax.crypto.CipherOutputStream;
|
||||
import javax.crypto.KeyAgreement;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.interfaces.DHPublicKey;
|
||||
import javax.crypto.spec.DHParameterSpec;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import org.jenkinsci.remoting.util.AnonymousClassWarnings;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,15 +6,14 @@ import hudson.model.Item;
|
||||
import hudson.model.Job;
|
||||
import hudson.model.PermalinkProjectAction.Permalink;
|
||||
import hudson.model.Run;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintStream;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
/**
|
||||
* cat/tail/head of the console output.
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.model.TopLevelItem;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Item;
|
||||
import hudson.model.TopLevelItem;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.ModifiableTopLevelItemGroup;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
|
||||
/**
|
||||
* Copies a job from CLI.
|
||||
*
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Item;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.ModifiableTopLevelItemGroup;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import hudson.Extension;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.Node;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,12 +23,11 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Failure;
|
||||
import hudson.model.View;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* @author ogondza
|
||||
|
||||
@@ -25,7 +25,6 @@ package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.Run;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.util.HashSet;
|
||||
|
||||
@@ -27,12 +27,11 @@ import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.model.AbstractItem;
|
||||
import hudson.model.Item;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* CLI command, which deletes a job or multiple jobs.
|
||||
* @author pjanouse
|
||||
|
||||
@@ -26,11 +26,10 @@ package hudson.cli;
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Node;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* CLI command, which deletes Jenkins nodes.
|
||||
|
||||
@@ -26,13 +26,11 @@ package hudson.cli;
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.cli.handlers.ViewOptionHandler;
|
||||
import hudson.model.ViewGroup;
|
||||
import hudson.model.View;
|
||||
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import hudson.model.ViewGroup;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* @author ogondza, pjanouse
|
||||
|
||||
@@ -27,13 +27,12 @@ package hudson.cli;
|
||||
import hudson.Extension;
|
||||
import hudson.PluginWrapper;
|
||||
import hudson.lifecycle.RestartNotSupportedException;
|
||||
import java.io.PrintStream;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Disable one or more installed plugins.
|
||||
* @since 2.151
|
||||
|
||||
@@ -28,13 +28,12 @@ import hudson.Extension;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.ComputerSet;
|
||||
import hudson.util.EditDistance;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
/**
|
||||
* CLI Command, which disconnects nodes.
|
||||
|
||||
@@ -27,13 +27,12 @@ package hudson.cli;
|
||||
import hudson.Extension;
|
||||
import hudson.PluginManager;
|
||||
import hudson.PluginWrapper;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Enables one or more installed plugins. The listed plugins must already be installed along with its dependencies.
|
||||
* Any listed plugin with disabled dependencies will have its dependencies enabled transitively. Note that enabling an
|
||||
|
||||
@@ -26,11 +26,8 @@ package hudson.cli;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.Node;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,6 @@ package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.View;
|
||||
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,18 +23,17 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import groovy.lang.GroovyShell;
|
||||
import groovy.lang.Binding;
|
||||
import jenkins.model.Jenkins;
|
||||
import groovy.lang.GroovyShell;
|
||||
import hudson.Extension;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.CmdLineException;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.CmdLineException;
|
||||
|
||||
/**
|
||||
* Executes the specified groovy script.
|
||||
|
||||
@@ -23,24 +23,22 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import jenkins.model.Jenkins;
|
||||
import groovy.lang.Binding;
|
||||
import groovy.lang.Closure;
|
||||
import hudson.Extension;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import jline.TerminalFactory;
|
||||
import jline.UnsupportedTerminal;
|
||||
import org.codehaus.groovy.tools.shell.Groovysh;
|
||||
import org.codehaus.groovy.tools.shell.IO;
|
||||
import org.codehaus.groovy.tools.shell.Shell;
|
||||
import org.codehaus.groovy.tools.shell.util.XmlCommandRegistrar;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.PrintStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import jline.UnsupportedTerminal;
|
||||
import jline.TerminalFactory;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,11 +25,9 @@ package hudson.cli;
|
||||
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
|
||||
|
||||
@@ -26,26 +26,25 @@ package hudson.cli;
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.PluginManager;
|
||||
import hudson.util.VersionNumber;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.model.UpdateSite;
|
||||
import hudson.model.UpdateSite.Data;
|
||||
import hudson.util.EditDistance;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import hudson.util.VersionNumber;
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
/**
|
||||
* Installs a plugin either from a file, an URL, or from update center.
|
||||
|
||||
@@ -4,18 +4,17 @@ import hudson.Extension;
|
||||
import hudson.model.Run;
|
||||
import hudson.scm.ChangeLogSet;
|
||||
import hudson.util.QuotedStringTokenizer;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.List;
|
||||
import jenkins.scm.RunWithSCM;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.kohsuke.args4j.Option;
|
||||
import org.kohsuke.stapler.export.Flavor;
|
||||
import org.kohsuke.stapler.export.Model;
|
||||
import org.kohsuke.stapler.export.ModelBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.List;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
/**
|
||||
* Retrieves a change list for the specified builds.
|
||||
*
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.Item;
|
||||
import hudson.model.TopLevelItem;
|
||||
import hudson.model.View;
|
||||
import hudson.Extension;
|
||||
import jenkins.model.ModifiableTopLevelItemGroup;
|
||||
import java.util.Collection;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.ModifiableTopLevelItemGroup;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import java.util.List;
|
||||
import hudson.Extension;
|
||||
import hudson.PluginManager;
|
||||
import hudson.PluginWrapper;
|
||||
import hudson.model.UpdateSite;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
|
||||
@@ -29,13 +29,11 @@ import hudson.Extension;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.ComputerSet;
|
||||
import hudson.util.EditDistance;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
/**
|
||||
* CLI Command, which puts the Jenkins node offline.
|
||||
|
||||
@@ -27,11 +27,9 @@ package hudson.cli;
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Computer;
|
||||
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* CLI Command, which moves the node to the online state.
|
||||
|
||||
@@ -25,11 +25,10 @@
|
||||
package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Quiet down Jenkins - preparation for a restart
|
||||
*
|
||||
|
||||
@@ -27,15 +27,13 @@ import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
import hudson.model.AbstractItem;
|
||||
import hudson.model.Item;
|
||||
|
||||
import hudson.model.Items;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* Reloads job from the disk.
|
||||
|
||||
@@ -23,13 +23,11 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.TopLevelItem;
|
||||
import hudson.model.DirectlyModifiableView;
|
||||
import hudson.model.TopLevelItem;
|
||||
import hudson.model.View;
|
||||
|
||||
import java.util.List;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,10 +3,9 @@ package hudson.cli;
|
||||
import hudson.model.Fingerprint.RangeSet;
|
||||
import hudson.model.Job;
|
||||
import hudson.model.Run;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* {@link CLICommand} that acts on a series of {@link Run}s.
|
||||
|
||||
@@ -4,13 +4,10 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Job;
|
||||
import hudson.model.Run;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
|
||||
// TODO: Remove Serializable
|
||||
@SuppressFBWarnings(value = "SE_NO_SERIALVERSIONID", justification = "The Serializable should be removed.")
|
||||
@Extension
|
||||
|
||||
@@ -3,11 +3,10 @@ package hudson.cli;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Job;
|
||||
import hudson.model.Run;
|
||||
import java.io.Serializable;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Extension
|
||||
public class SetBuildDisplayNameCommand extends CLICommand implements Serializable {
|
||||
private static final long serialVersionUID = 6665171784136358536L;
|
||||
|
||||
@@ -25,10 +25,9 @@ package hudson.cli;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.AbstractItem;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
* @author Kohsuke Kawaguchi
|
||||
|
||||
@@ -24,13 +24,10 @@
|
||||
|
||||
package hudson.cli;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.Node;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,11 +23,9 @@
|
||||
*/
|
||||
package hudson.cli;
|
||||
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.View;
|
||||
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,17 +23,17 @@
|
||||
*/
|
||||
package hudson.cli.declarative;
|
||||
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import hudson.cli.CLICommand;
|
||||
import hudson.util.ListBoxModel.Option;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
import org.jvnet.hudson.annotation_indexer.Indexed;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotates methods on model objects to expose them as CLI commands.
|
||||
*
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
*/
|
||||
package hudson.cli.declarative;
|
||||
|
||||
import static java.util.logging.Level.SEVERE;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.AbortException;
|
||||
import hudson.Extension;
|
||||
@@ -48,7 +50,6 @@ import java.util.MissingResourceException;
|
||||
import java.util.Stack;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import static java.util.logging.Level.SEVERE;
|
||||
import java.util.logging.Logger;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.ExtensionRefreshException;
|
||||
|
||||
@@ -23,16 +23,16 @@
|
||||
*/
|
||||
package hudson.cli.declarative;
|
||||
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import hudson.cli.CLICommand;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
import org.jvnet.hudson.annotation_indexer.Indexed;
|
||||
import org.kohsuke.args4j.CmdLineException;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotates a resolver method that binds a portion of the command line arguments and parameters
|
||||
* to an instance whose {@link CLIMethod} is invoked for the final processing.
|
||||
|
||||
@@ -26,19 +26,18 @@ package hudson.cli.declarative;
|
||||
import hudson.cli.CLICommand;
|
||||
import hudson.util.ReflectionUtils;
|
||||
import hudson.util.ReflectionUtils.Parameter;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.CmdLineException;
|
||||
import org.kohsuke.args4j.CmdLineParser;
|
||||
import org.kohsuke.args4j.Option;
|
||||
import org.kohsuke.args4j.spi.FieldSetter;
|
||||
import org.kohsuke.args4j.spi.Setter;
|
||||
import org.kohsuke.args4j.spi.OptionHandler;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.CmdLineException;
|
||||
import org.kohsuke.args4j.CmdLineParser;
|
||||
import org.kohsuke.args4j.Option;
|
||||
import org.kohsuke.args4j.spi.FieldSetter;
|
||||
import org.kohsuke.args4j.spi.OptionHandler;
|
||||
import org.kohsuke.args4j.spi.Setter;
|
||||
|
||||
/**
|
||||
* Binds method parameters to CLI arguments and parameters via args4j.
|
||||
|
||||
@@ -24,15 +24,14 @@
|
||||
|
||||
package hudson.cli.declarative;
|
||||
|
||||
import org.jvnet.hudson.annotation_indexer.Indexed;
|
||||
import org.kohsuke.args4j.spi.OptionHandler;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import org.jvnet.hudson.annotation_indexer.Indexed;
|
||||
import org.kohsuke.args4j.spi.OptionHandler;
|
||||
|
||||
/**
|
||||
* {@link OptionHandler}s that should be auto-discovered.
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
package hudson.cli.handlers;
|
||||
|
||||
import hudson.model.AbstractProject;
|
||||
import org.kohsuke.MetaInfServices;
|
||||
import org.kohsuke.args4j.CmdLineParser;
|
||||
import org.kohsuke.args4j.OptionDef;
|
||||
import org.kohsuke.args4j.spi.Setter;
|
||||
import org.kohsuke.MetaInfServices;
|
||||
import org.kohsuke.args4j.spi.OptionHandler;
|
||||
import org.kohsuke.args4j.spi.Setter;
|
||||
|
||||
/**
|
||||
* Refer to {@link AbstractProject} by its name.
|
||||
|
||||
Loaded 100 of 1284 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user