Commit Graph

1152 Commits

Author SHA1 Message Date
Andy Wilkinson c14a550632 Merge branch '1.5.x' 2017-02-08 22:05:06 +00:00
Andy Wilkinson b931f564e6 Work around Gradle 3.3's overzealous deprecation warning
In Gradle 3.3, when an API that will be removed in 4.0 is called, a
deprecation warning is output as part of the build. Users have noticed
his warning and, quite reasonably, complained about it. Unfortunately,
avoiding the warning requires the use of an API that was introduced in
Gradle 3.x which we can't use directly as we want to remain compatible
with Gradle 2.x.

This commit introduces the use of reflection to call
ProjectDependency.getTargetConfiguration() via reflection when it's
available (Gradle 3) and ProjectDependency.getProjectConfiguration()
when it's not (Gradle 2).

Closes gh-8154
2017-02-08 22:03:55 +00:00
Spring Buildmaster 5c12500366 Next Development Version 2017-01-30 20:10:13 +00:00
Andy Wilkinson 9a7e5caea7 Merge branch '1.5.x' 2017-01-30 13:17:17 +00:00
Andy Wilkinson 20c1370107 Correct the scope of the spring-boot-test-support dependency
Closes gh-8136
2017-01-30 13:15:49 +00:00
Spring Buildmaster a2696bf873 Next Development Version 2017-01-30 11:40:24 +00:00
Andy Wilkinson 31b0e81765 Add @FunctionalInterface to remaining public and protected interfaces
See gh-6857
2017-01-27 16:41:09 +00:00
Eddú Meléndez 3d52c86a21 Annotate interfaces with @FunctionaInterface
Closes gh-6857
2017-01-27 16:41:01 +00:00
Spring Buildmaster ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
Andy Wilkinson f049fea00d Merge branch '1.5.x' 2017-01-26 10:24:36 +00:00
Andy Wilkinson 6b353fb005 Move spring-boot-test-support into spring-boot-tools
Closes gh-8114
2017-01-26 10:17:20 +00:00
Phillip Webb 3d619da553 Polish 2017-01-25 16:56:22 -08:00
Andy Wilkinson bdf903896f Remove support for module layout
Closes gh-8107
2017-01-25 16:49:37 +00:00
Andy Wilkinson 3ce6d8e5b5 Merge branch '1.5.x' 2017-01-25 16:41:13 +00:00
Andy Wilkinson cd5124005b Deprecate support for module layout
Closes gh-8008
2017-01-25 16:40:42 +00:00
Stephane Nicoll 661fd848eb Merge branch '1.5.x' 2017-01-25 11:02:32 +01:00
Stephane Nicoll 505e7f75ea Polish contribution
Closes gh-8089
2017-01-25 11:01:53 +01:00
dreis d58f38f6f6 Use String.replace() with single char if possible
See gh-8089
2017-01-25 11:01:52 +01:00
Stephane Nicoll 551bfb2c60 Polish contribution
Closes gh-8103
2017-01-25 11:01:52 +01:00
Johnny Lim 32f9e90de5 Replace 'String.length() == 0' with 'String.isEmpty()'
See gh-8103
2017-01-25 11:01:52 +01:00
Stephane Nicoll d67ce78e8b Merge branch '1.5.x' 2017-01-24 13:23:06 +01:00
Johnny Lim e0de28a1f7 Polish
Closes gh-8076
2017-01-24 13:22:22 +01:00
Andy Wilkinson 2b75570680 Fix dead code warning in CentralDirectoryParserTests 2017-01-24 11:07:43 +00:00
Phillip Webb 8ffaa54e74 Merge branch '1.5.x' 2017-01-23 23:45:44 -08:00
Madhura Bhave ca435512c0 Introduce spring-boot-autoconfigure-processor
Add an annotation processor that generates properties files for certain
auto-configuration class annotations. Currently attribute values from
@AutoConfigureOrder, @AutoConfigureBefore, @AutoConfigureAfter and
@ConditionalOnClass annotations are stored.

The properties file will allow optimizations to be added in the
`spring-boot-autoconfigure` project. Primarily by removing the need
to ASM parse as many `.class` files.

See gh-7573
2017-01-23 22:14:56 -08:00
Andy Wilkinson 6d14a9dc78 Merge branch '1.5.x' 2017-01-20 16:52:53 +00:00
Andy Wilkinson 080ff49c8d Prevent AspectJ from loading aspects too early
Previously, AspectJ would find META-INF/aop.xml almost as soon as
the jar was launched, and before LaunchedURLClassLoader had been
created. This meant that AspectJ would attempt to load aspects listed
in META-INF/aop.xml but that were package in BOOT-INF/classes and,
therefore, could not be loaded.

This commit updates the Repackager so that a META-INF/aop.xml file
is moved into BOOT-INF/classes. This ensures that it isn't visible
to the app class loader so it won't be loaded to early. It will
now be loaded by LaunchedURLClassLoader which can also load the
compiled aspects that aop.xml references.

Closes gh-7587
2017-01-20 16:51:51 +00:00
Andy Wilkinson aba09cce73 Merge branch '1.5.x' 2017-01-18 14:25:09 +00:00
Alessandro Falappa ec537b307e Make start/stop run-levels configurable in INIT-INFO of launch.script
See gh-7008
Closes gh-7902
2017-01-18 14:24:29 +00:00
Andy Wilkinson 1d4cee9460 Drop support for the old spring-boot Gradle plugin ID
Closes gh-7859
2017-01-13 06:47:02 -05:00
Phillip Webb f92f019418 Don't mock package private class
See gh-7770
2017-01-05 14:39:22 -08:00
Phillip Webb 77f9bb09ca Further Polish Mockito 2 support
See gh-7770
2017-01-05 14:29:29 -08:00
Phillip Webb 6bc37c0589 Drop annotation processor spring-core dependency
Remove the spring-core dependency from the annotation processor.
(cherry-picked from 4cb7d86aec)

Fixes gh-7882
2017-01-05 10:44:48 -08:00
Stephane Nicoll c0012a4bfe Merge branch '1.5.x' 2017-01-05 17:04:48 +01:00
Stephane Nicoll c06ff7061f Revert Shade annotation processor dependencies
This commit reverts 45d5b60

See gh-7883
2017-01-05 17:04:34 +01:00
Phillip Webb 4bfecc1307 Merge branch '1.5.x' 2017-01-04 23:52:40 -08:00
Phillip Webb 45d5b60f6d Shade annotation processor dependencies
Update the annotation processor to be completely self contained. The
single required dependency is now "shaded" into the jar.

Fixes gh-7883
2017-01-04 23:02:24 -08:00
Phillip Webb cc7c2ebb87 Migrate to android-json
Migrate from `org.json:json` to the clean room Apache 2.0 licensed
version that was developed for Android.

Fixes gh-5929
2017-01-04 23:00:06 -08:00
Phillip Webb 4cb7d86aec Drop annotation processor spring-core dependency
Remove the spring-core dependency from the annotation processor.

Fixes gh-7882
2017-01-04 22:58:28 -08:00
Andy Wilkinson 4dc30938d0 Merge branch '1.5.x' 2017-01-04 21:39:34 +00:00
Andy Wilkinson 803eddf6b2 Update test to reflect quoting of STOP_WAIT_TIME in launch.script 2017-01-04 21:39:16 +00:00
Andy Wilkinson 3967c525c8 Merge branch '1.5.x' 2017-01-04 21:31:26 +00:00
Andy Wilkinson c5e7d83e2d Fix shellcheck warnings for literal { and } characters in launch.script
Closes gh-7870
2017-01-04 21:30:42 +00:00
Andy Wilkinson be71f666d2 Merge branch '1.5.x' 2017-01-04 20:40:57 +00:00
Andy Wilkinson 75cb545361 Update launch.script to use a consistent location for pid file
Closes gh-6924
2017-01-04 20:39:51 +00:00
Stephane Nicoll 506f6497c0 Merge branch '1.5.x' 2017-01-04 09:56:19 +01:00
Johnny Lim f915ae197a Polish 2017-01-04 09:53:45 +01:00
Phillip Webb f8c7890a45 Merge branch '1.5.x' 2017-01-03 15:36:47 -08:00
dreis cee576b8b2 Reduce memory footprint of AsciiBytes.hashCode
Update `AsciiBytes.hashCode(int hash, String string)` so that it no
longer copies the backing array of the string.

Closes gh-7851
2017-01-03 15:36:11 -08:00
Andy Wilkinson 6fd27566af Merge branch '1.5.x' 2017-01-03 13:15:09 +00:00
Andy Wilkinson 6ced8abb86 Update the copyright header to 2017 2017-01-03 13:14:55 +00:00
Andy Wilkinson 6b1a80ac2a Merge branch '1.5.x' 2017-01-03 13:12:40 +00:00
Andy Wilkinson dac249fb0d Replace use of Gradle API that's bean deprecated in 3.x
Closes gh-7734
2017-01-03 13:05:48 +00:00
Phillip Webb 4026fa563f Merge branch '1.5.x' 2017-01-02 19:54:26 -08:00
Phillip Webb 41b83085a6 Restore `kill -9` to launch.script force-stop
Restore the `-9` flag to the send `kill` call which was inadvertently
lost in commit a35a1022c2.

Closes gh-6223
2017-01-02 19:47:54 -08:00
Phillip Webb a90bad37bd Merge branch '1.5.x' 2016-12-30 13:29:18 -08:00
Phillip Webb a35a1022c2 Update force-stop to respect STOP_WAIT_TIME
Closes gh-6223
2016-12-30 13:23:47 -08:00
Kazuki Shimizu 40691d07f8 Add force-stop to launch.script usage
See gh-6223
Closes gh-7787
2016-12-30 13:19:36 -08:00
Phillip Webb 53f1df86a2 Merge branch '1.5.x' 2016-12-30 12:17:28 -08:00
Phillip Webb aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Phillip Webb 4d73f3d2e9 Merge branch '1.5.x' 2016-12-29 22:22:04 -08:00
Gaurav Rawat 509be7474d Add `force-stop` support to launch script
Update the embedded launch script to support `force-stop`.

Closes gh-6223
2016-12-29 22:20:05 -08:00
Phillip Webb 519f9c6c54 Merge branch '1.5.x' 2016-12-28 15:35:32 -08:00
Phillip Webb 8b69856fc9 Polish 2016-12-28 15:23:26 -08:00
Phillip Webb 49fa702708 Merge branch '1.5.x' 2016-12-27 15:06:22 -08:00
Phillip Webb 85504e74a6 Merge branch '1.4.x' into 1.5.x 2016-12-27 15:05:15 -08:00
Arlo O'Keeffe 3a709511c4 Notify BuildContext of changed build-info file
Update Maven plugin to inform the BuildContext when changes are made to
the `build-info` file. Prior to this commit Eclipse could continually
trigger refreshes whenever "Refresh using native hooks or polling" was
enabled and the file was written to `src/main/resources`.

Closes gh-7741
2016-12-27 13:20:22 -08:00
Stephane Nicoll 31bde8ffc9 Merge branch '1.5.x' 2016-12-27 11:59:38 +01:00
Stephane Nicoll 2fe98f8f85 Merge branch '1.4.x' into 1.5.x 2016-12-27 11:59:25 +01:00
Stephane Nicoll 022f7e86a0 Align library file naming mapping
This commit aligns the mapping from library to name to the default
behaviour of the `maven-war-plugin`. Previously, our plugin would use
the full version of the library (i.e. including build timestamp if there
is one), rather than using the `baseVersion` property.

Closes gh-7743
2016-12-27 11:59:01 +01:00
Spring Buildmaster 9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb 6e02fe59f7 Merge branch '1.5.x' 2016-12-21 22:32:43 -08:00
Johnny Lim e12b4a944f Polish 2016-12-21 20:18:04 -08:00
Phillip Webb 8b47561f7e Merge branch '1.5.x' 2016-12-20 21:56:04 -08:00
Lucas Saldanha 534a9db6fd Make stop wait time in the launch script configurable
Create a parameter `STOP_WAIT_TIME` for the startup script
that configures the time in seconds to wait for a normal
shutdown. Because of #4941 we also send a shutdown half
way the countdown.

Fixes gh-7121
2016-12-20 15:15:12 -08:00
Phillip Webb 1f417997f3 Merge branch '1.5.x' 2016-12-19 13:21:18 -08:00
Phillip Webb 6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 2016-12-19 12:36:57 -08:00
Phillip Webb bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Andy Wilkinson 1782d778db Merge branch '1.5.x' 2016-12-15 20:07:55 +00:00
Andy Wilkinson 6fb1fb580d Upgrade to Dependency Management Plugin 1.0.0.RC1
Closes gh-7636
2016-12-15 20:07:35 +00:00
Stephane Nicoll df0a0e563c Merge branch '1.5.x' 2016-12-15 15:30:19 +01:00
Stephane Nicoll c2ca21bb63 Merge branch '1.4.x' into 1.5.x 2016-12-15 15:30:03 +01:00
Stephane Nicoll 26643ef428 Clarify how to exclude devtools with war packaging.
Closes gh-7556
2016-12-15 15:28:25 +01:00
Stephane Nicoll 1302d1b0e4 Merge branch '1.5.x' 2016-12-15 14:16:28 +01:00
Alessandro Falappa dd7d81a580 INIT INFO Required Start/Stop as embedded launch script properties
Expose the Required-Start and Require-Stop lines in the launch script
INIT INFO section as customizable embedded launch script properties.

This way one can express dependencies fron other init services by simply
changing the configuration in the build script.

Closes gh-7555
2016-12-15 14:14:50 +01:00
Stephane Nicoll a86678cc31 Merge branch '1.5.x' 2016-12-14 19:33:34 +01:00
Johnny Lim 6d1b752ffe Polish
Closes gh-7552
2016-12-14 19:14:24 +01:00
Andy Wilkinson 6eaa8d7c56 Merge branch '1.5.x' 2016-12-08 11:38:23 +00:00
Andy Wilkinson 53287eadf6 Merge branch '1.4.x' into 1.5.x 2016-12-08 11:38:13 +00:00
Andy Wilkinson 2d8344d46d Ensure that JarLauncher doesn't cause root jar to be on class path twice
Closes gh-7595
2016-12-08 11:34:22 +00:00
Phillip Webb 263d444d4e Merge branch '1.5.x' 2016-12-05 11:20:24 -08:00
Phillip Webb f6b0652369 Merge branch '1.4.x' into 1.5.x 2016-12-05 11:17:13 -08:00
Phillip Webb e430583eaf Polish 2016-12-05 11:08:38 -08:00
Andy Wilkinson 39c0f229c2 Merge branch '1.5.x' 2016-12-02 11:34:00 +00:00
Andy Wilkinson 0df03a95f0 Merge branch '1.4.x' into 1.5.x 2016-12-02 11:33:52 +00:00
Pei-Tang Huang 5a5e2db134 Quote $jarfile when creating arguments in launch script
Previously, if the pathname of fully executable contained any space
characters, the launch script would fail to locate the jar file

This commit fixes this issue by quoting the jarfile.

Closes gh-7535
2016-12-02 11:31:51 +00:00
Stephane Nicoll bd2415463c Merge branch '1.5.x' 2016-12-01 12:13:02 +01:00
Oscar Utbult 3a7969b8bb Remove redundant StringBuilder
Closes gh-7538
2016-12-01 12:11:04 +01:00
Stephane Nicoll da6360e506 Merge branch '1.5.x' 2016-11-30 15:17:56 +01:00
Stephane Nicoll e63174b93f Merge branch '1.4.x' into 1.5.x 2016-11-30 15:17:41 +01:00
Stephane Nicoll c51d836a15 Use standard file name for Maven dependencies
This commit uses standard files for libraries managed by the repackage
goal of the Maven plugin. Previously, only the name of the file was used
which could lead to duplicate libraries if the name of the target file
deviates from the default. This typically happens when the
`build.finalName` property is specified on a dependent module.

Note that the `maven-war-plugin` has an additional mechanism to customize
the file name structure of dependencies. This feature isn't supported by
the repackage goal so an explicit mention has been added in the
documentation.

Closes gh-7389
2016-11-30 15:13:25 +01:00
Stephane Nicoll 0568afc6cb Merge branch '1.5.x' 2016-11-30 08:31:41 +01:00
Johnny Lim 423f8037ce Polish
Closes gh-7530
2016-11-30 08:31:13 +01:00
Stephane Nicoll e7275b62dc Merge branch '1.5.x' 2016-11-30 08:27:30 +01:00
Oscar Utbult fabe35fdc4 Remove redundant toString() invocation
Closes gh-7527
2016-11-30 08:23:03 +01:00
Andy Wilkinson 633280d1d0 Merge branch '1.5.x' 2016-11-29 15:44:31 +00:00
Andy Wilkinson 1595286e04 Prefer @SpringBootApplication-annotated class when finding main class
Closes gh-6496
2016-11-29 15:44:10 +00:00
Stephane Nicoll 4da5245e69 Merge branch '1.5.x' 2016-11-29 15:22:20 +01:00
Stephane Nicoll f84fd19eaa Polish contribution
Closes gh-7491
2016-11-29 15:20:53 +01:00
Hrishikesh Joshi b3220985bb Detect default values defined in the parent
Closes gh-5434
2016-11-29 15:20:10 +01:00
Stephane Nicoll 9c374e7755 Merge branch '1.5.x' 2016-11-29 08:03:08 +01:00
Stephane Nicoll 06e44c71ec Merge branch '1.4.x' into 1.5.x 2016-11-29 08:02:50 +01:00
Oscar Utbult 88b83a909c Remove redundant toString() invocation
Closes gh-7510
2016-11-29 08:01:27 +01:00
Phillip Webb 450ab28163 Merge branch '1.5.x' 2016-11-28 17:27:05 -08:00
Dave Syer c6c6524b40 Support custom fat jar layouts
Allow support for custom Lyout implementations with both the Maven
and Gradle plugin. Implementations of `LayoutFactory` can now be
specified to allow customization of the layout. In addition a
layout may now implement `CustomLoaderLayout` if it wishes to
write custom loader classes.

See gh-7263
2016-11-28 16:31:53 -08:00
Phillip Webb f5b03c81f3 Rework Repacakger timeout code
Pull up common timeout code into Repackager and remove the need for
custom subclasses.

See gh-7263
2016-11-28 16:15:39 -08:00
Phillip Webb b4c3f4f504 Merge branch '1.5.x' 2016-11-28 15:37:43 -08:00
Phillip Webb 5ed00b3501 Merge branch '1.4.x' into 1.5.x 2016-11-28 15:27:07 -08:00
Phillip Webb 357d072a60 Polish 2016-11-28 15:14:46 -08:00
Stephane Nicoll e15b3e463f Fix compatibility with JDK9
Cast runtime object retrieved reflectively to their public interface
counterpart.

See gh-7226
2016-11-28 11:30:34 +01:00
Stephane Nicoll 2964e31186 Merge branch '1.5.x' 2016-11-25 11:18:17 +01:00
Stephane Nicoll 6e79521fff Expose skip property consistently
This commit makes sure that the `skip` command-line property can be used
for all goals of the maven plugin.

A dedicated sample for integration tests has also been added as this
change may confuse users, especially those who wish to skip a certain
goal and not the plugin execution altogether.

Closes gh-7313
2016-11-25 11:17:58 +01:00
Andy Wilkinson c714880001 Merge branch '1.5.x' 2016-11-23 14:05:10 +00:00
Andy Wilkinson 655ab9871b Merge branch '1.4.x' into 1.5.x 2016-11-23 14:04:59 +00:00
Andy Wilkinson 5e79657d4b Treat URLs for same file in nested archive and from jar root as equal
Consider the following two URLs:

jar:file:/test.jar!/BOOT-INF/classes!/foo.txt
jar:file:/test.jar!/BOOT-INF/classes/foo.txt

They both reference the same foo.txt file in the BOOT-INF/classes
directory of test.jar, however the first URL does so via the
nested BOOT-INF/classes archive. Previously, this difference in the
URLs would lead to PathMatchingResourcePatternResolver returning two
resources for foo.txt when asked to find all resources matching the
pattern classpath*:/**/*.txt.

This commit updates our Handler that is used for jar: URLs to consider
the two URLs above to be equivalent such that url1 is equal to url2
and the two urls will produce the same hash code.

Closes gh-7449
2016-11-23 14:04:45 +00:00
Andy Wilkinson bc6b2a9c75 Merge branch '1.5.x' 2016-11-22 13:54:49 +00:00
Christian Koops 5c11059e1d Make launch script's logFilename and pidFilename configurable via properties
Closes gh-7234
2016-11-22 13:54:16 +00:00
Phillip Webb cb7c0b5031 Merge branch '1.5.x' 2016-11-16 16:06:53 -08:00
Johnny Lim 8038882d46 Polish
Closes gh-7403
2016-11-16 13:36:51 -08:00
Andy Wilkinson e26a3e3766 Merge branch '1.5.x' 2016-11-15 13:14:44 +00:00
Andy Wilkinson 22e456a177 Merge branch '1.4.x' into 1.5.x 2016-11-15 13:14:30 +00:00
Andy Wilkinson c2730ac63f Polish formatting and address warnings 2016-11-15 11:48:35 +00:00
Spring Buildmaster e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Andy Wilkinson 3a2d9e31ff Merge branch '1.4.x' into 1.5.x 2016-11-08 10:36:56 +00:00
Andy Wilkinson 808185ab4e Make LaunchedURLClassLoader Java 6 compatible again
Closes gh-7334
2016-11-08 10:35:18 +00:00
Andy Wilkinson 78fcb311c9 Merge branch '1.5.x' 2016-11-08 10:04:09 +00:00
Andy Wilkinson e576225959 Merge branch '1.4.x' into 1.5.x 2016-11-08 10:03:58 +00:00
dreis 7a797909ae Reinstate LaunchedURLClassLoader's registration as parallel capable
Closes gh-7334
2016-11-08 09:58:14 +00:00
Andy Wilkinson 7c3d7d882a Merge branch '1.5.x' 2016-11-01 16:25:07 +00:00
Andy Wilkinson ef3395beaa Raise the minimum supported version of Gradle to 2.9
Closes gh-6884
2016-11-01 16:25:02 +00:00
Andy Wilkinson d58c79d9b7 Merge branch '1.5.x' 2016-11-01 14:26:22 +00:00
Andy Wilkinson 20e8c36590 Merge branch '1.4.x' into 1.5.x 2016-11-01 14:26:18 +00:00
Andy Wilkinson 6828997651 Correct minimum recommended version of Gradle to be 2.9 rather than 2.8
Closes gh-7189
See gh-6884
2016-11-01 14:25:07 +00:00
Phillip Webb 98a3ae9ac4 Merge branch '1.5.x' 2016-10-31 23:13:37 -07:00
Phillip Webb 5b66ffbb4b Merge branch '1.4.x' into 1.5.x 2016-10-31 23:09:36 -07:00
Phillip Webb 97fee46682 Revert Layout changes
This reverts commits:
- 974ec92ad6.
- 537e0c12c2.
- 500a3df6e9.
2016-10-31 21:08:15 -07:00
Andy Wilkinson cdcc3d2f28 Ensure getResources("") includes nested root URLs
Previously, if Boot's JarURLConnection pointed to the root of a nested
entry, e.g. /BOOT-INF/classes, a call to getInputStream() would throw
an IOException. This behavior is reasonable for a URL that points
to the root of a normal jar as the jar itself is on the class path
anyway. However, for a nested jar it meant that a call to
ClassLoader.getResources("") would not include URLs for any nested
jars and directories (/BOOT-INF/classes and jars in /BOOT-INF/lib).
This is due to some logic in URLClassPath.Loader.findResource that
verifies a URL by opening a connection and calling getInputStream().

The result of missing URLs for the root of nested jars and directories
is that classpath scanning that scans from the root (not a good idea
for performance reasons, but something that we should support) would
not find entries in /BOOT-INF/classes or in jars in /BOOT-INF/lib.

This commit updates our JarURLConnection so that it no longer throws
an IOException when asked for an InputStream for the root of a nested
entry (directory or jar).

Fixes gh-7003
2016-10-31 12:06:35 -07:00
Phillip Webb 57d5a2ebc6 Formatting 2016-10-31 11:41:45 -07:00
Stephane Nicoll 236f03c4bb Merge branch '1.5.x' 2016-10-31 11:38:54 +01:00
Johnny Lim 7bb63238ab Fix typo
Closes gh-7253
2016-10-31 11:37:52 +01:00
Stephane Nicoll d27ffd289a Merge branch '1.5.x' 2016-10-31 10:38:06 +01:00
Stephane Nicoll 974ec92ad6 Fix broken build 2016-10-31 10:37:57 +01:00
Dave Syer 5f5e3bf6c3 Merge branch '1.5.x' 2016-10-30 11:24:52 +00:00
Dave Syer 537e0c12c2 Support for custom layout types to change loader classes
A layout can
also optionally change the loader jar that is unpacked in the root
of the repackaged archive by implementing a new method in Layout.
2016-10-30 11:24:29 +00:00
Dave Syer 500a3df6e9 Add LayoutFactory in spring.factories
Instead of a fixed enum of layout types, user can provide custom
layouts via implementations of LayoutFactory in spring.factories.
2016-10-30 11:24:29 +00:00
Stephane Nicoll 1448902c14 Merge branch '1.5.x' 2016-10-28 13:31:56 +02:00
Stephane Nicoll f6959ccbcd Merge branch '1.4.x' into 1.5.x 2016-10-28 13:31:38 +02:00
Stephane Nicoll 7f8849c62b Merge branch '1.3.x' into 1.4.x 2016-10-28 13:31:19 +02:00
Stephane Nicoll 5863e6f78c Fix class name in generated meta-data
Previously, the algorithm that computes the String representation of a
class reference and a property type was shared. This lead to generic
information for group's `type` and `sourceType` property.

This commit separates that logic in two: `getQualifiedName` is now
responsible to generate a fully qualified class name while the existing
`getType` is solely responsible to generate a type representation for the
property. Only the latter has generic information.

Closes gh-7236
2016-10-28 13:23:47 +02:00
Andy Wilkinson f2c7e22731 Merge branch '1.5.x' 2016-10-26 12:13:38 +01:00
Andy Wilkinson 6b3eede59f Merge branch '1.4.x' into 1.5.x 2016-10-26 12:13:26 +01:00
Andy Wilkinson 6a68c8f7e0 Restore Handler logic that was changed during its merge
This commit restores the logic in Handler that was changed when
d20ac56a was merged, while leaving the structural improvements intact.

In addition to a couple of changes where a typo meant the wrong
variable was being referenced, some logic branches now return false
rather than called super. This realigns our Handler's behaviour with
that of the JDK's.

Some more tests have also been added to try to catch the problems that
were introduced during the merge.

Closes gh-7021
2016-10-26 11:10:38 +01:00
Phillip Webb 57fb3888ac Merge branch '1.5.x' 2016-10-25 20:18:47 -07:00
Phillip Webb 3c5328924c Merge branch '1.4.x' into 1.5.x 2016-10-25 20:17:55 -07:00
Andy Wilkinson d20ac56afd Align our jar URL stream handler with the JDK's
Previously our handler didn't override parseURL or sameFile which
resulted in behaviour that differed from that of the JDK's handler.
Crucially, this would result in our JarURLConnection being passed
a spec that didn't contain a "!/". A knock-on effect of this was
that the connection would point to the root of the jar rather than
the intended entry.

Closes gh-7021
2016-10-25 20:16:32 -07:00
Andy Wilkinson f0798253a3 Merge branch '1.5.x' 2016-10-24 22:16:34 +01:00
Andy Wilkinson 5b9eaab6c0 Merge branch '1.4.x' into 1.5.x 2016-10-24 22:16:23 +01:00
Andy Wilkinson ee7141cf63 Allow PropertyLauncher loader.path to be configured using manifest
Closes gh-7178
2016-10-24 22:14:56 +01:00
Stephane Nicoll 73b5afa56e Merge branch '1.5.x' 2016-10-24 18:08:39 +02:00
Stephane Nicoll ae4dd0d17e Merge branch '1.4.x' into 1.5.x 2016-10-24 18:08:23 +02:00
Stephane Nicoll a638dcd51b Remove unnecessary use of System.out.println 2016-10-24 18:07:40 +02:00
Andy Wilkinson 3f655d998d Merge branch '1.5.x' 2016-10-24 12:20:41 +01:00
Andy Wilkinson 9abafb839b Merge branch '1.4.x' into 1.5.x 2016-10-24 12:20:23 +01:00
Andy Wilkinson be597d7ce9 Fix handling of cyrillic characters in AsciiBytes hashCode method
Closes gh-7202
2016-10-24 12:19:57 +01:00
Andy Wilkinson 702d904d53 Merge branch '1.5.x' 2016-10-19 16:51:23 +01:00
Andy Wilkinson d7e2708687 Merge branch '1.4.x' into 1.5.x 2016-10-19 16:51:14 +01:00
Andy Wilkinson 999fa123df Deprecate support for Gradle 2.7 and earlier 2016-10-19 16:50:35 +01:00
Andy Wilkinson 2a685a8c15 Merge branch '1.5.x' 2016-10-18 13:47:33 +01:00
Andy Wilkinson b7c55fb192 Merge branch '1.4.x' into 1.5.x 2016-10-18 13:47:20 +01:00
Andy Wilkinson a31180dd68 Avoid calling URL.getContent() when defining a package
URL.getContent() is shorthand for URL.openConnection().getContent().
It creates an InputStream that isn't explicitly closed. This means
that a file handle remains open until the URLConnection is garbage
collected. This can lead to the process exceeding the limit for open
files.

Previously, LaunchedURLClassLoader was using getConent() when
proactively defining a package for a class that is about to be loaded.
getContent() was used to access nested jar files to check if they
contained the package and, if so, to retrieve the jar's manifest.

In place of using getContent(), this commit uses JarURLConnection's
getJarFile() method which provides access to the JarFile without the
unwanted side-effect of opening an input stream.

Closes gh-7180
2016-10-18 13:35:33 +01:00
Stephane Nicoll d79546da74 Merge branch '1.5.x' 2016-10-17 17:52:29 +03:00
Stephane Nicoll 6186262ecc Switch `excludeDevtools` to true by default
Switch the default value of `excludeDevtools` from `false` to `true` as
it is more sensible to exclude such dependency by default.

Closes gh-7170
2016-10-17 17:52:12 +03:00
Andy Wilkinson f48545bd57 Merge branch '1.5.x' 2016-10-14 09:20:12 +01:00
Andy Wilkinson 899b8a04cb Merge branch '1.4.x' into 1.5.x 2016-10-14 09:20:02 +01:00
Andy Wilkinson 24f8c737fb Make relative PID_FOLDER and LOG_FOLDER absolute using jar's directory
Closes gh-7092
Closes gh-7093
2016-10-14 09:19:11 +01:00
Andy Wilkinson 84c9c7bd92 Merge branch '1.5.x' 2016-10-13 16:55:33 +01:00
Andy Wilkinson 57b7357be7 Merge branch '1.4.x' into 1.5.x 2016-10-13 16:55:21 +01:00
Andy Wilkinson 03deff9a1c Handle relative pid folder correctly in the launch script
Previously, a relative PID folder was not handled correctly when
running stop, status, or force_reload. This meant that a service
could be started when configured to use a relative pid file, but
then could not be stopped.

The PID folder should be treated as relative to the service's jar
file. This commit updates stop, status, and force_reload to push the
jar file's directory so that this is now the case for those three
commands.

Closes gh-7092
2016-10-13 16:51:54 +01:00
Phillip Webb 01900c8342 Merge branch '1.5.x' 2016-10-11 23:42:14 -07:00
Phillip Webb d818a09ed8 Polish 2016-10-11 23:38:14 -07:00
Stephane Nicoll c50a352999 Merge branch '1.5.x' 2016-10-11 15:37:07 +02:00
Stephane Nicoll 28ed59ca6e Polish contribution
Closes gh-6645
2016-10-11 15:36:35 +02:00
Plamen Totev 3cccc732df Add workingDirectory option for Maven plugin run/start
Add configuration option that specifies the working directory to use to
run/start the application via the Maven plugin.

Closes gh-6243
2016-10-11 15:36:27 +02:00
Stephane Nicoll daaa545d69 Merge branch '1.5.x' 2016-10-06 17:09:24 +02:00
Stephane Nicoll c06dc33bf6 Generate deprecated meta-data for deprecated @Bean methods
This commit makes sure that a meta-data group exposed via a deprecated
`@Bean` method is deprecated as well. This also works if the class
in which the bean method is defined is itself deprecated.

Closes gh-7100
2016-10-06 17:08:49 +02:00
Andy Wilkinson fe10ea73b0 Merge branch '1.4.x' into 1.5.x 2016-10-05 14:58:42 +01:00
Andy Wilkinson ad3e5c04bb Add a second, portal-compatible ID to the Gradle plugin
To be compatible with Gradle's plugin portal, plugins must have an
ID that uses a reverse domain name. This means that spring-boot is
not compatible.

This commit introduces a new ID, org.springframework.boot, and
deprecates the old ID.

Closes gh-6997
2016-10-05 14:58:26 +01:00
Andy Wilkinson f137ec6a3a Merge branch '1.5.x' 2016-10-05 14:58:02 +01:00
Andy Wilkinson 846f264da8 Merge branch '1.4.x' into 1.5.x 2016-10-05 14:57:51 +01:00