Commit Graph
138 Commits
Author SHA1 Message Date
Basil Crow 20786f087b Fix dangling Javadocs 2019-10-19 14:02:59 -07:00
Raihaan Shouhell 61e87f1807 Avoid boxed primitive 2019-10-01 13:50:49 +08:00
Jesse Glick 3bcdefcae4 [JENKINS-55582] Refinement to at least handle nonstandard $JENKINS_HOME/plugins/$shortName.hpi and warn about $shortName-$version.hpi. 2019-05-23 13:26:15 -04:00
Jesse Glick 855ea2eea2 [JENKINS-57528] - Load detached plugins which are implicit deps of other plugins at startup even w/o UC (#4000)
* Do not warn repeatedly of the same missing update site dependency.
This happens when locally testing split plugins (despite their presence in WEB-INF/detached-plugins/*.hpi).

(cherry picked from commit 918a0fd221)

* Detached plugins must be kept up to date with security advisories.

(cherry picked from commit e08d28a698)

* Load detached plugins which are implicit dependencies of other plugins at startup, even if the update center was not used.

(cherry picked from commit ad7a36001d)

* Adjusted expected version after e08d28a698.

(cherry picked from commit 84f939cebd)

* e08d28a698 exposed tests which had been incorrectly storing plugins as *.hpi rather than *.jpi.

(cherry picked from commit a0abad7ec4)

* Test failure after ad7a36001d.

(cherry picked from commit 0084e8dbdd)

* Another test failure after ad7a36001d30a6174b25e616fc3c215dd24919d1; fewer installDetachedPlugin calls are now required.

(cherry picked from commit b65bb54e99)
2019-05-17 16:22:22 +02:00
Josh Soref 003e525b79 Java can infer types for <> 2019-02-21 00:33:38 -05:00
Josh Soref 3d8c3c417c Remove useless initialization 2019-02-20 23:35:12 -05:00
Josh Soref 36fa47add2 noinspection StatementWithEmptyBody 2019-02-20 23:15:14 -05:00
Josh Soref 264980c707 Java 7: omit explit type in favor of <> 2019-02-20 21:51:03 -05:00
Baptiste Mathus a78312ea0f [JENKINS-55681] - Make JAXB a detached plugin only on Java 11 (#3865)
* Move detached plugins logic into a dedicated class

ClassicPluginStrategy is already long enough, so trying to make things a
bit more focused before adding Java 11 logic. (and even if not, the change
still splits a class that is almost 1k lines).

* Install jaxb as detached only on Java 11+

* Remove duplicate @Restricted

Given the enclosing class already has it.

* Use 1.5 release

* Add more test coverage

* getMinJavaVersion => getMinimumJavaVersion

* Rename DetachedPluginsManager as DetachedPluginsUtil

as requested by Oleg and Jesse. Mainly because of the misleading
relationship (there's no inheritance) with the existing `PluginManager`
class.

* 🤦 adjust to 1.5 release method renaming

* Clarify minimum Java version column

Co-Authored-By: batmat <bmathus@gmail.com>

* Update to 2.3.0 version of the jaxb plugin

* Bump minimum core version to next expected release version

* Add preventive cycle breaks for jaxb while waiting for JENKINS-28942

As requested by Oleg.

* Add test to fail fast on wrong format for split-plugins.txt
2019-02-03 10:56:26 +01:00
Oleg Nenashev 150de1df6e Merge pull request #3640 from oleg-nenashev/build/jdk11-underscore-vars
JDK-11 support: refactor code to avoid underscore variable names
2018-09-27 18:08:51 +02:00
Oleg Nenashev 8598492f19 Ignored Exceptions: use ‘ignored’ to supress IntellijIDEA warnings as suggested by @daniel-beck 2018-09-27 01:23:28 +02:00
Oleg Nenashev 297e4e3d85 [JENKINS-53793] - Suppress DMI_COLLECTION_OF_URLS in ClassicPluginStrategy
It starts failing FindBugs runs against Java 11.
The implementation is not efficient, but it should not be a serious issue in this case
2018-09-27 00:31:15 +02:00
Oleg Nenashev a3cc7780aa JDK11 support: refactor code to avoid underscore variable names 2018-09-21 16:47:59 -07:00
Oleg Nenashev 9bd13323c8 [JENKINS-51608] - Improve diagnostics of errorneous cases in ClassicPluginStrategy#getShortName() 2018-05-30 14:23:21 +02:00
Jesse Glick e410313306 Supporting blank lines & comments in split-plugins.txt & split-plugin-cycles.txt. 2017-10-27 13:41:26 -04:00
Jesse Glick 1a399a1c9e [JENKINS-47634] Move metadata about split plugins into a resource file so that plugin-compat-tester need not be manually synchronized. 2017-10-25 14:54:51 -04:00
Jesse Glick 417afd66f3 1.0 released. 2017-10-17 15:30:29 -04:00
Jesse Glick af8ac036a2 Updated to 2.86-SNAPSHOT. 2017-10-17 09:07:16 -04:00
Jesse Glick e376780c64 [JENKINS-47393] Preparation for split of CommandLauncher to a plugin. 2017-10-11 16:43:06 -04:00
Andrew Bayer 303a9f7df7 [FIXED JENKINS-44898] Add findResource to PluginFirstClassLoader (#2916)
* [FIXED JENKINS-44898] Add findResource to PluginFirstClassLoader

This fixes GroovyClassLoader.loadClass for a .groovy file in a plugin
with a PluginFirstClassLoader, specifically by fixing fast-loading via
the UberClassLoader.

* Move common code to AntWithFindResourceClassLoader.

* Adding testing of new PluginFirstClassLoader behavior.
2017-06-17 23:00:10 +02:00
Jesse Glick 0993b7099b Do not load detached plugins during tests (#2829)
* Do not load detached plugins during tests.
Also warn about plugins which force us to create classes.jar.

* Porting POM fix from #2795: we must allow snapshots from repo.jenkins-ci.org so as to be able to test upstream component PRs.

* Fixed failures in tests which assumed detached plugins were being loaded.

* jenkins-test-harness 2.20

* Unreproducible test failure on CI, probably due to timing.
2017-05-01 16:44:55 +03:00
Stephen Connolly 3871d7778e [JENKINS-43531] Plugins may not be expecting InvalidPathException
- Plugins should really be expecting it, but as historically they have not, may as well convert to IOE for them
2017-04-19 14:04:33 +01:00
Jesse Glick 7c16d8dc46 Fix Javadoc generation on JDK 8. 2017-04-11 09:26:45 -04:00
Stephen Connolly f0cd7ae8ff [JENKINS-42934] Avoid using new FileInputStream / new FileOutputStream 2017-03-20 12:50:46 +00:00
Nicolas De Loof 7b39424495 rely on try-with-resources 2016-10-03 15:12:48 +02:00
Stephen Connolly d92fd4cc63 [JENKINS-37041] Address Code review comments 2016-07-28 16:30:17 +01:00
Stephen Connolly 2a450e5ac2 [FIXED JENKINS-37041] Ensure that detached plugins are always at least their minimum version 2016-07-28 16:09:21 +01:00
Stephen Connolly 091829207a [FIXED JENKINS-36923] Move bcpkix dependency from jenkins-war to bouncycastle-api plugin
- We are committed to this now that bouncycastle-api 2.16.0 has been released
2016-07-27 09:21:49 +01:00
Stephen Connolly 03066d587f [JENKINS-36923] The PR builder should at least work for this now 2016-07-25 17:44:39 +01:00
Stephen Connolly 3e72adafeb [JENKINS-36923] Give ownership of bcpkix dependency to bouncycastle-api plugin 2016-07-25 17:09:24 +01:00
Oleg Nenashev ce8922bd74 Merge branch 'master' into JENKINS-34755
Conflicts:
	core/src/main/java/hudson/Util.java
	core/src/main/java/hudson/WebAppMain.java
	core/src/main/java/hudson/model/Item.java
	core/src/main/java/hudson/model/Queue.java
	core/src/main/java/hudson/model/UpdateCenter.java
	core/src/main/java/hudson/security/csrf/DefaultCrumbIssuer.java
	core/src/main/java/hudson/slaves/NodeProvisioner.java
	core/src/main/java/jenkins/model/Jenkins.java
	core/src/main/java/jenkins/slaves/NioChannelSelector.java
	core/src/main/java/jenkins/util/xml/XMLUtils.java
2016-05-12 12:05:24 +02:00
Baptiste Mathus 99c43c8ccd Remove pre Java 7 reflection's based invocations
Simplify the code now the minimum version is Java 7.
2016-04-13 23:09:22 +02:00
Baptiste Mathus 8b3e4f43a2 Multi-catch refactoring when applicable 2016-04-12 10:17:42 +02:00
kzantow e7ad694932 Refactoring lack-of-moving-comments-too fail 2016-03-15 15:39:44 -04:00
kzantow dac7decdce Implement @jglick's idea: move implicit dependency modifications to
UpdateSite, when reading plugin metadata
2016-03-15 15:14:25 -04:00
kzantow 4e3295bb2c Address @jglick's comments: refactor ClassicPluginStrategy to use
BREAK_CYCLE, use the same getImpliedDependency method for multiple code
paths, @Restricted isMailerPresent
2016-03-15 14:17:39 -04:00
kzantow 5e8bb98ee0 JENKINS-33308 - automatically install previously bundled dependencies
for plugins that depend on old Jenkins versions
2016-03-15 10:46:18 -04:00
Daniel Beck 3624f70169 Merge branch 'master' of github.com:jenkinsci/jenkins into 2.0
Conflicts:
	cli/pom.xml
	core/pom.xml
	pom.xml
	test/pom.xml
	test/src/test/java/hudson/cli/CreateNodeCommandTest.java
	test/src/test/java/hudson/cli/DeleteNodeCommandTest.java
	test/src/test/java/hudson/cli/GetNodeCommandTest.java
	test/src/test/java/hudson/cli/OnlineNodeCommandTest.java
	test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
	war/pom.xml
2016-02-22 13:22:37 +01:00
Stephen Connolly c0cbff7297 [JENKINS-32765] Perhaps it makes more sense to make this a property of the PluginManager rather than the classic strategy
- Also expose via servlet context parameter of same name to allow multiple instances of Jenkins in the same servlet container to have different directories
- As we are no longer a constant, change the system property to camelCase
2016-02-04 14:40:44 +00:00
Stephen Connolly d27cff8fd2 [FIXED JENKINS-32765] Allow the directory that plugins are exploded into to be changed
- This really has to be controlled by either a system property or a CLI parameter as we cannot guarantee that any path
  specified in a configuration file in JENKINS_HOME will be valid on another machine where the JENKINS_HOME is mounted
- Obviously Jenkins does not currently support fully starting two Jenkins instances on the same JENKINS_HOME, so this
  fix is to assist in Disaster Recovery (or semi-higher availability) sceanarios where the backup node is being brought
  up. In such cases, the node that failed may not have correctly released all its file handles in the backing NFS share
  and thus could be blocking the recovery node from starting up.
- An additional use case is where the JENKINS_HOME is stored on a remote disk, e.g. a SAN, etc. and the user wants to
  take advantage of the faster local disk to serve the resources from both plugins and Jenkins core. Without this change
  only Jenkins core can be relocated outside of JENKINS_HOME (using the '--webroot=...' command line option).
- Ideally we would introduce this into the extras-executable-war module once the system property has had time to soak
  (although in an ideal world that module would be agnostic of Jenkins and thus it might not be appropriate there)
2016-02-04 10:29:52 +00:00
Tom Fennelly b5fa04f048 Fixups to ClassicPluginStrategy 2016-01-22 11:03:54 +00:00
tfennelly 036a8e94ed [FIX JENKINS-9598] Add plugin selection wizard on first launch
Also ... unbundling of plugins from Jenkins core.
2016-01-20 10:54:32 +00:00
Johannes Ernst 9303136c9d Incorporated pull request feedback:
* moved to jenkins.util.SystemProperties
* consistent naming getString/getInteger/getBoolean
* improved code formatting
Improved JavaDoc
2015-11-18 18:26:41 +00:00
Johannes Ernst 709fe5b9aa Allow setting of system properties from context.xml in addition to setting from command-line.
Accomplished by centralizing calls to System.getProperty(String) and related into new file SystemProperties.java.
There, we first check for existence of system property; if not, we look for property in context.xml
This is done for "application" properties (like hudson.DNSMultiCast.disabled) but not for java properties (like user.name)
2015-11-17 01:38:51 +00:00
James Nord 4c6dd0135a [JENKINS-30820] pick up the new bytecode-compat-t.
The new version of the BCT does not generate stackMap if the original code
did not contain stack maps.  Further more the new version takes a
classloader to use so that it can load classes when searching for the
common parent class.
2015-10-16 18:34:24 +02:00
Vincent Latombe a65d007533 Prerequisite for JENKINS-25785 in order to break dependency cycle when windows-slaves will depend on credentials 2015-06-13 14:18:40 +02:00
Jesse Glick 6ad8cbfc3a Merge branch 'security' into security-rc
Conflicts:
	core/src/main/java/hudson/ClassicPluginStrategy.java
	core/src/main/java/hudson/cli/AddJobToViewCommand.java
	core/src/main/java/hudson/model/Run.java
	core/src/main/java/hudson/node_monitors/MonitorOfflineCause.java
	core/src/main/java/hudson/tasks/junit/JUnitResultArchiver.java
	core/src/main/java/jenkins/model/IdStrategyDescriptor.java
	core/src/main/resources/hudson/model/AbstractProject/configure-common_ru.properties
	core/src/main/resources/hudson/model/AbstractProject/configure-common_tr.properties
	core/src/main/resources/hudson/model/FileParameterValue/value_pt_BR.properties
	core/src/main/resources/hudson/model/Job/index.jelly
	core/src/main/resources/hudson/model/TextParameterDefinition/config_pt_BR.properties
	core/src/main/resources/hudson/node_monitors/Messages_cs.properties
	core/src/main/resources/hudson/node_monitors/Messages_sv_SE.properties
	core/src/main/resources/hudson/security/SecurityRealm/signup.jelly
	core/src/main/resources/hudson/slaves/CommandConnector/config_pt_BR.properties
	core/src/main/resources/hudson/views/BuildButtonColumn/column.properties
	core/src/main/resources/jenkins/diagnosis/HsErrPidList/index_pt_BR.properties
	core/src/main/resources/jenkins/model/IdStrategy/config.jelly
	core/src/main/resources/jenkins/model/Jenkins/MasterComputer/_api.jelly
	core/src/main/resources/jenkins/model/Jenkins/load-statistics_pt_BR.properties
	core/src/main/resources/jenkins/security/s2m/AdminCallableMonitor/message.jelly
	core/src/main/resources/jenkins/security/s2m/AdminWhitelistRule/index_pt_BR.properties
	core/src/main/resources/jenkins/slaves/systemInfo/EnvVarsSlaveInfo/systemInfo.jelly
	core/src/main/resources/jenkins/slaves/systemInfo/Messages.properties
	core/src/main/resources/jenkins/slaves/systemInfo/Messages_da.properties
	core/src/main/resources/jenkins/slaves/systemInfo/Messages_de.properties
	core/src/main/resources/jenkins/slaves/systemInfo/Messages_fr.properties
	core/src/main/resources/jenkins/slaves/systemInfo/Messages_ja.properties
	core/src/main/resources/jenkins/slaves/systemInfo/Messages_nl.properties
	core/src/main/resources/jenkins/slaves/systemInfo/Messages_pt_BR.properties
	core/src/main/resources/jenkins/slaves/systemInfo/Messages_zh_TW.properties
	core/src/main/resources/jenkins/triggers/Messages_fr.properties
	core/src/main/resources/lib/form/class-entry.jelly
	core/src/main/resources/lib/form/helpLink_pt_BR.properties
	core/src/main/resources/lib/form/link.jelly
	core/src/main/resources/lib/hudson/project/configurable.properties
	core/src/main/resources/lib/hudson/project/configurable_bg.properties
	core/src/main/resources/lib/hudson/project/configurable_es_AR.properties
	core/src/main/resources/lib/hudson/project/configurable_eu.properties
	core/src/main/resources/lib/hudson/project/configurable_gl.properties
	core/src/main/resources/lib/hudson/project/configurable_hi_IN.properties
	core/src/main/resources/lib/hudson/project/configurable_nl.properties
	core/src/main/resources/lib/hudson/project/configurable_tr.properties
	core/src/main/resources/lib/hudson/project/console-link.jelly
	core/src/main/resources/lib/hudson/project/console-link_pt_BR.properties
	core/src/main/resources/lib/layout/pane_de.properties
	core/src/main/resources/lib/layout/pane_pt.properties
	core/src/main/resources/lib/layout/pane_pt_BR.properties
	core/src/main/resources/lib/layout/task_pt.properties
	core/src/test/java/hudson/util/XStream2Test.java
	pom.xml
	test/pom.xml
	test/src/test/java/hudson/model/AbstractItemSecurityTest.java
	test/src/test/resources/lib/layout/IconTest/03_testTask.jelly
	war/src/main/webapp/scripts/msie.js
2015-02-05 16:35:57 -05:00
Jesse Glick 41786ad019 Preventing cyclic dependencies among bundled plugins.
Reproducible for example via HelpLinkTest.testMatrixConfig.
Otherwise have: matrix-project → script-security → matrix-auth → windows-slaves → antisamy-markup-formatter → matrix-project
Tried to come up with a generic way of doing this automatically, but failed.
Just because we bundle a particular build of some plugin does not mean it was built against anything recent,
and for use on older cores it may well need some of those implicit dependencies.
2015-02-04 16:45:53 -05:00
Jesse Glick 5d43fdf1e6 matrix-project 1.0
(cherry picked from commit 0bd831e2d9)
2015-02-04 14:05:32 -05:00
Jesse Glick 92ca85339f Preparing to include transitional release.
(cherry picked from commit 071951e658)
2015-02-04 14:05:00 -05:00