Commit Graph

1022 Commits (8997143f3196935ecdd42f01137197ea19647690)

Author SHA1 Message Date
Spring Buildmaster c0f9f64776 Next Development Version 7 years ago
Johnny Lim bfa291f671 Polish 7 years ago
Spring Buildmaster 30eb937a83 Next Development Version 7 years ago
Stephane Nicoll af18110226 Polish "Improve exception message for invalid source"
Closes gh-10130
7 years ago
Aurélien Pupier 44b60c72e3 Improve exception message for invalid source
See gh-10130
7 years ago
Andy Wilkinson 7a87c69dd0 Normalize spec when creating jar URL by removing /../ and /./
Previously when Handler was creating a URL from a context URL and a
spec, any occurrances of /../ or /./ in the spec would be left as-is.
This differed from the JDK's Handler implementation which normalizes
the URL by modifying the path to remove any occurrences of /../ or
/./

This commit updates our Handler implementation to align it with the
JDK's. Tests have been added to assert that, given the same inputs,
the two Handler classes produce the same output.

Closes gh-9917
7 years ago
Andy Wilkinson b7ac5f2eb2 Polish "Make JarURLConnection return entry's last modified time"
Closes gh-9893
7 years ago
rostislav.dudka 7c7259beec Make JarURLConnection return entry's last modified time
See gh-9893
7 years ago
Spring Buildmaster 17a5bb0be4 Next development version 7 years ago
Spring Buildmaster 41c5c0e7c9 Next development version 7 years ago
Andy Wilkinson e0be40cd94 Polish "Locate additional metadata when using Gradle 4"
Closes gh-9732
7 years ago
Misagh Moayyed 980b83c0d8 Locate additional metadata when using Gradle 4
Closes gh-9758
7 years ago
Phillip Webb 28dad44e2d Be defensive about JUL calls from JAR Handler
Update nested JAR support to only obtain JUL loggers when absolutely
necessary and to defensively deal with failures.

Prior to this commit it was not possible to override
`java.util.logging.manager` to use a nested JAR as the logger
implementation.

Fixes gh-9848
7 years ago
Stephane Nicoll 11fb792e88 Fix source repository links in maven plugin site
Closes gh-9671
7 years ago
Phillip Webb aa57ca7e18 Polish 7 years ago
Stephane Nicoll d77056639d Add a warning about fully executable archive
Closes gh-9574
8 years ago
Andy Wilkinson e6a3ca5da6 Address deprecation warning that's generated by Gradle 4.x
In Gradle 4.x, SourceSetOutput now has multiple classes directories
and getClassesDir() has been deprecated. This commit introduces the
use of reflection to use getClassesDirs() when it's available rather
than getClassesDir().

Closes gh-9559
8 years ago
Andy Wilkinson 59122358d3 Clean up and format code 8 years ago
Stephane Nicoll acda4f905f Add support for deprecation level
This commit ensures that deprecation level set in manual metadata is
properly merged in the generated one.

Closes gh-9449
8 years ago
Andy Wilkinson 2d3bcae4e1 Make JarURLConnection return entry's length from getContentLengthLong()
Closes gh-9484
8 years ago
Spring Buildmaster 05d4d0281c Next Development Version 8 years ago
Andy Wilkinson 5c708ae712 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 5b4f9edc86 Restore original TCCL in PropertiesLauncherTests
Calling launch of PropertiesLauncherTests sets the thread context
class loader to an instance of LaunchedURLClassLoader. To avoid this
class loader being used beyond the scope of the test and launcher
that created it, this commit updates PropertiesLauncherTests to
capture the TCCL before each test and restore it after each test.

Closes gh-9378
8 years ago
Andy Wilkinson c22230a418 Try making FilePool static to fix the Mockito problem on Bamboo 8 years ago
Andy Wilkinson e11b7aff08 Ensure that file is released back to pool when seek fails
Closes gh-9370
8 years ago
Stephane Nicoll 9b2ad6100e Fix reference of custom layout example
Closes gh-9342
8 years ago
Andy Wilkinson f7127e5522 Ensure that closing a JarFile closes all underlying resources
Closes gh-8871
8 years ago
Phillip Webb 74f411faed Formatting 8 years ago
Stephane Nicoll cdf5f6e0ee Add support for deprecation level in manual metadata
This commit allows to specify a deprecation level to a manual metadata
entry. The purpose of that new attribute is to distinguish cases where
the property is still bound (default) from cases where the property no
longer exists and won't be bound.

This gives the opportunity to IDEs to still show the property as an
error and offer documentation and an action to rename it if a
replacement exists.

Closes gh-9074
8 years ago
Stephane Nicoll 643dea18ee Accommodate with Lombok generation ordering
Previously, if lombok was running before the configuration metadata
annotation processor, duplicated keys were created as both the
getter/setter and the special lombok handling applied.

This commit makes sure to be lenient by removing duplicate metadata
entries. This commit also makes sure to identify the getter of a
nested group if present. That way, the sourceMethod is set consistently
and avoid the creation of a duplicate group.

Closes gh-8886
8 years ago
Stephane Nicoll ea4e6fea35 Polish 8 years ago
Stephane Nicoll f8e1345b75 Unify versions used in integration tests
This commit makes sure the integration tests use the same versions as
the one managed by `spring-boot-dependencies` (including Maven plugins).

Closes gh-8947
8 years ago
Stephane Nicoll 7b1fc01733 Fix checkstyle violations 8 years ago
Stephane Nicoll 063d301fd3 Make LayoutType public
Closes gh-9067
8 years ago
Spring Buildmaster 9768b0a8c2 Next Development Version 8 years ago
Spring Buildmaster d719d2cbbc Next Development Version 8 years ago
Dave Syer 14638e67bc Extended PropertiesLauncher class location logic
Update `PropertiesLauncher` so that classes can be loaded outside of
`BOOT-INF/classes`. You can use a subdirectory, or the root directory
of an external jar (but not the parent archive to avoid issues
with agents and awkward delegation models).

Fixes gh-8480
Closes gh-8486
8 years ago
Phillip Webb ad38776de3 Polish 8 years ago
Phillip Webb ddcb5ee328 Polish 8 years ago
Andy Wilkinson c55bfb00b1 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 456327260b Fail fast when a Zip64 jar is encountered
Previously, jars (either top-level or nested) in Zip64 format were
treated as normal jar files. This would lead to a failure later on
when an attempt was made to read an entry from the file.

This commit updates the loader to fail fast when it encounters a
Zip64 jar file. Such files are identified by the number of entries
in the central directory end record being 0xFFFF.

Closes gh-8735
8 years ago
Stephane Nicoll d8e90af3bf Merge branch '1.4.x' into 1.5.x 8 years ago
dreis 1266642aba Fix test assertions
Closes gh-8660
8 years ago
Andy Wilkinson e6cfb4e5fb Improve diagnostics when reading a nested jar throws a runtime exception
Previously, only IOExceptions were caught and wrapped in a new
IOException that included the name of the nested entry that was
being read.

Following this commit, any Exception is caught and wrapped so that the
problematic entry can be identified in more failure scenarios.

Closes gh-8711
8 years ago
Spring Buildmaster d23fa24340 Next Development Version 8 years ago
Spring Buildmaster 2a83e80a9b Next Development Version 8 years ago
Andy Wilkinson 6673d8eebc Polish "Allow loader.path to refer to nested jars"
Closes gh-8334
Closes gh-8465
8 years ago
Dave Syer 3701cce88f Allow loader.path to refer to nested jars
Previously, each entry in loader.path could only refer to a standard
jar file. Refering to such a jar would add all of the classes in
the root of the jar to the class path.

This commit adds support for referencing a directory within a jar file
that contains one or more nested jars. For example:

$ java -jar -Dloader.path='jar:file:./lib.jar/!BOOT-INF/lib' my.jar

This will add all of the classes in all of that jars in the
BOOT-INF/lib directory of lib.jar to the class path.

See gh-8334
8 years ago
Andy Wilkinson b36c8a7c24 Polish "Tighten up PropertiesLauncher's contract"
See gh-8346
Closes gh-7221
8 years ago
Dave Syer e4c807b884 Tighten up PropertiesLauncher's contract
The main changes are:

- Switch to `loader.properties` instead of `application.properties`
- Search for `loader.properties` in `loader.home` as well as in
  the classpath
- Placeholder replacements in MANIFEST.MF (using `loader.properties`
  or system/env vars)

See gh-7221
Closes gh-8346
8 years ago
Phillip Webb f1012c104a Polish 8 years ago
Stephane Nicoll 19b4833c33 Keep order when filtering artifacts
This commit makes sure that the order of dependencies is kept when they
are filtered.

Closes gh-8397
8 years ago
Phillip Webb ca1540cefe Update header copyright for changed files 8 years ago
Phillip Webb 5867cd6175 Polish 8 years ago
Phillip Webb 47fd5f4fac Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 47b00c086c Polish 8 years ago
Andy Wilkinson f67dd957b1 Ignore excludeDevtools on extension when it has been set on bootRepackage
Previously, bootRepackage's excludeDevtools property would be
overridden by the springBoot extension's excludeDevtools property.
This prevented devtools from being included by configuring it on the
repackaging task.

This commit corrects the logic so that the setting on the repackaging
task takes priority. It also adds some tests to verify the behaviour.

Closes gh-8308
8 years ago
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
8 years ago
Spring Buildmaster 5c12500366 Next Development Version 8 years ago
Andy Wilkinson 20c1370107 Correct the scope of the spring-boot-test-support dependency
Closes gh-8136
8 years ago
Spring Buildmaster a2696bf873 Next Development Version 8 years ago
Spring Buildmaster ed1ce140c0 Next Development Version 8 years ago
Andy Wilkinson 6b353fb005 Move spring-boot-test-support into spring-boot-tools
Closes gh-8114
8 years ago
Phillip Webb 3d619da553 Polish 8 years ago
Andy Wilkinson cd5124005b Deprecate support for module layout
Closes gh-8008
8 years ago
Stephane Nicoll 505e7f75ea Polish contribution
Closes gh-8089
8 years ago
dreis d58f38f6f6 Use String.replace() with single char if possible
See gh-8089
8 years ago
Stephane Nicoll 551bfb2c60 Polish contribution
Closes gh-8103
8 years ago
Johnny Lim 32f9e90de5 Replace 'String.length() == 0' with 'String.isEmpty()'
See gh-8103
8 years ago
Johnny Lim e0de28a1f7 Polish
Closes gh-8076
8 years ago
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
8 years ago
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
8 years ago
Alessandro Falappa ec537b307e Make start/stop run-levels configurable in INIT-INFO of launch.script
See gh-7008
Closes gh-7902
8 years ago
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
8 years ago
Stephane Nicoll c06ff7061f Revert Shade annotation processor dependencies
This commit reverts 45d5b60

See gh-7883
8 years ago
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
8 years ago
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
8 years ago
Phillip Webb 4cb7d86aec Drop annotation processor spring-core dependency
Remove the spring-core dependency from the annotation processor.

Fixes gh-7882
8 years ago
Andy Wilkinson 803eddf6b2 Update test to reflect quoting of STOP_WAIT_TIME in launch.script 8 years ago
Andy Wilkinson c5e7d83e2d Fix shellcheck warnings for literal { and } characters in launch.script
Closes gh-7870
8 years ago
Andy Wilkinson 75cb545361 Update launch.script to use a consistent location for pid file
Closes gh-6924
8 years ago
Johnny Lim f915ae197a Polish 8 years ago
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
8 years ago
Andy Wilkinson 6ced8abb86 Update the copyright header to 2017 8 years ago
Andy Wilkinson dac249fb0d Replace use of Gradle API that's bean deprecated in 3.x
Closes gh-7734
8 years ago
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
8 years ago
Phillip Webb a35a1022c2 Update force-stop to respect STOP_WAIT_TIME
Closes gh-6223
8 years ago
Kazuki Shimizu 40691d07f8 Add force-stop to launch.script usage
See gh-6223
Closes gh-7787
8 years ago
Phillip Webb aacf5d660f Update copyright year for changed files 8 years ago
Gaurav Rawat 509be7474d Add `force-stop` support to launch script
Update the embedded launch script to support `force-stop`.

Closes gh-6223
8 years ago
Phillip Webb 8b69856fc9 Polish 8 years ago
Phillip Webb 85504e74a6 Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Stephane Nicoll 2fe98f8f85 Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Spring Buildmaster 9057f9ae1f Next development version 8 years ago
Johnny Lim e12b4a944f Polish 8 years ago
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
8 years ago
Phillip Webb 6121208cbb Polish formatting 8 years ago
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 8 years ago