Commit Graph

1179 Commits (0e21af4082f5a9727033eda22c6c451b1b62057e)

Author SHA1 Message Date
Stephane Nicoll cabe59d65a Remove animal sniffer
See gh-9564
8 years ago
Andy Wilkinson 49a62a7c33 Correct the scope of the spring-boot-test-support dependency
Closes gh-9550
8 years ago
Andy Wilkinson 991314c63d Merge branch '1.5.x' 8 years ago
Andy Wilkinson 59122358d3 Clean up and format code 8 years ago
Stephane Nicoll dbabfc224c Add support for Lettuce in RedisTestServer
Previously, RedisTestServer only supported Jedis and would blow up if
only Lettuce was on the classpath. This commit defensively checks which
driver is available and chose the appropriate one, defaulting to Jedis.

Closes gh-9524
8 years ago
Stephane Nicoll 81efd225f9 Merge branch '1.5.x' 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
Phillip Webb b94bb00fa1 Remove need for attached test-jar artifacts
Remove test-jar artifacts from Maven projects and relocate classes. The
majority of utilities now live in the `spring-boot-testsupport` module.

This update will help us to deploy artifacts using the standard Maven
deploy plugin in the future (which doesn't support the filtering of
individual artifacts).

Fixes gh-9493
8 years ago
Andy Wilkinson 700af8ed00 Merge branch '1.5.x' 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
Phillip Webb 2c7dd9f519 Polish 8 years ago
Andy Wilkinson 7301f9b5e8 Merge branch '1.5.x' 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 2928a31278 Merge branch '1.5.x' 8 years ago
Andy Wilkinson c22230a418 Try making FilePool static to fix the Mockito problem on Bamboo 8 years ago
Andy Wilkinson 8e2986c86e Fix call to isSpy to be compatible with Mockito 2 8 years ago
Andy Wilkinson b85eed4b58 Polish 8 years ago
Andy Wilkinson bcd34bca6f Merge branch '1.5.x' 8 years ago
Andy Wilkinson e11b7aff08 Ensure that file is released back to pool when seek fails
Closes gh-9370
8 years ago
Andy Wilkinson 4a605f6270 Drop custom software component in favor of just publishing an artifact
Previously, Spring Boot's Gradle plugin provided custom software
components (bootJava and bootWeb) for publishing the artifacts created
by the standard bootJar and bootWar tasks respectively. Providing a
custom software component requires the usage of some of Gradle's
internal APIs and this has now proven to be more trouble than it is
worth.

This commit removes the custom software component and documents how
to publish the artifact created by a BootJar or BootWar task directly
instead.

Closes gh-9153
8 years ago
Andy Wilkinson a685d9ec92 Run Gradle integration tests against multiple versions of Gradle
Closes gh-9365
8 years ago
Andy Wilkinson 5f3462f358 Use ObjectFactory rather than Usages to create Usage on Gradle 4.0
Usages has been removed in Gradle 4.0 and replaced with the use of
a new ObjectFactory API that can be used to create a Usage. This
commit uses reflection to access the ObjectFactory from the Project
and use it to create a Usage when an attempt to use Usages fails.

Closes gh-9364
8 years ago
Stephane Nicoll e8aa3a3a8e Upgrade to Maven War Plugin 3.1.0
Closes gh-9344
8 years ago
Stephane Nicoll 294bcbe962 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 9b2ad6100e Fix reference of custom layout example
Closes gh-9342
8 years ago
Johnny Lim 6939ff1e65 Polish
Closes gh-9330
8 years ago
Andy Wilkinson 6c3a27dadf Merge branch '1.5.x' 8 years ago
Andy Wilkinson f7127e5522 Ensure that closing a JarFile closes all underlying resources
Closes gh-8871
8 years ago
Andy Wilkinson d5438c299c Polish "Use try-with-resources to close resources automatically"
- Apply code formatting
- Use try-with-resources in many other places that were missed in the
  pull request

Closes gh-8045
8 years ago
Phillip Webb 302f038e84 Polish 8 years ago
Phillip Webb f4444a36b3 Merge branch '1.5.x' 8 years ago
Phillip Webb 74f411faed Formatting 8 years ago
Stephane Nicoll 2e94fd4434 Remove support for Spring Loaded
Closes gh-7978
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
Madhura Bhave 53493fdd86 Make detection of nested config more lenient
Closes gh-3454
8 years ago
Stephane Nicoll 1835dd7b94 Merge branch '1.5.x' 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
Andy Wilkinson e4f80e68fc Do not run Gradle plugin's tests when built with -DskipTests
Closes gh-9169
8 years ago
Stephane Nicoll 527c2e7b75 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 3547815805 Make sure Maven integration tests use a consistent java version
Closes gh-9149
8 years ago
Stephane Nicoll 5e14383886 Merge branch '1.5.x' 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
Johnny Lim 53e5d67cde Polish
Closes gh-9103
8 years ago
Andy Wilkinson 3abd8d3adf Drop support for configuring PropertiesLauncher with application.properties
Closes gh-8464
8 years ago
Stephane Nicoll 7b1fc01733 Fix checkstyle violations 8 years ago
Stephane Nicoll 063d301fd3 Make LayoutType public
Closes gh-9067
8 years ago
Andy Wilkinson 1ee9653f7c Group tasks and provide descriptions for tasks and configurations
Closes gh-8817
8 years ago
Andy Wilkinson 762a13e84f Configure assemble to depend upon bootJar or bootWar
Closes gh-8824
8 years ago
Andy Wilkinson a6d24a3bfc Allow bootWar to package webapp resources in dirs that overlap loader
Previously, the presence of a src/main/webapp/org directory would
cause the execution of BootWar to fail due to an attempt to write
a duplicate org/ entry to the zip output stream.

This commit updates BootZipCopyAction so that FileTreeElements that
match a directory entry created while writing the loader classes are
skipped.

Closes gh-8972
8 years ago
Spring Buildmaster 9768b0a8c2 Next Development Version 8 years ago
Andy Wilkinson ae0700efc1 Try to make RunningDocumentationTests platform independent
Windows seems unable to decide if the temp dir is in System32 or
system32 which breaks the comparison. This commit attempts to appease
the gods of case sensitity by reducing the portion of the path that we
check so that system32 vs System32 doesn't come into it.

See gh-8920
8 years ago
Spring Buildmaster d719d2cbbc Next Development Version 8 years ago
Andy Wilkinson 079b324e21 Make RunningDocumentationTests platform independent
Closes gh-8920
8 years ago
Phillip Webb 81fef71fcb Merge branch '1.5.x' 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
Stephane Nicoll 65986503c1 Fix glitch in doc
Closes gh-8921
8 years ago
Huang YunKun f303ce5ff4 Fix windows build of the Gradle plugin
Use family instead of name to check os system

Closes gh-8907
8 years ago
Andy Wilkinson 0186fb2e84 Fail fast when plugin is used with an unsupported version of Gradle
Closes gh-8820
8 years ago
Andy Wilkinson ab18901ad0 Ensure that entry is completely configured before putting to the stream
Previously, BootZipCopyAction would put the next entry to the stream
and then, in the case of a stored entry, configure its size, CRC32
etc. This had the benefit of being able to copy the entry into the
zip once, capturing its bytes for the calculation of the CRC32 as it
was copied. Unfortunately, while this produced zip files that could
be read by the JVM, other zip tools failed. For example, Go's zip
support that's used by CloudFoundry could not unzip the archive.

This commit updates BootZipCopy action to completely configure the
entry before putting it to the stream. This has the downside of
copying the file twice (once for the CRC32 and once to actually write
it to the zip stream) but this appears to be unavoidable as we have to
produce archives that can be unzipped without problems on all
platforms.

Closes gh-8816
8 years ago
Andy Wilkinson 2f64cdfa98 Include directory entries when copying loader into a Boot archive
See gh-8816
8 years ago
Andy Wilkinson 15d6c9d5c7 Merge pull request #8818 from Johnny Lim
* gh-8818:
  Fix typos in new Gradle plugin
8 years ago
Johnny Lim 8d921d49aa Fix typos in new Gradle plugin
Closes gh-8818
8 years ago
Andy Wilkinson 5bc721f3ad Polish Gradle plugin's documentation 8 years ago
Phillip Webb ad38776de3 Polish 8 years ago
Phillip Webb ddcb5ee328 Polish 8 years ago
Andy Wilkinson 7f5ca24ff9 Make Maven Central available to Gradle plugin's build 8 years ago
Andy Wilkinson 01166381a0 Provide separate documentation (API and reference) for Gradle plugin 8 years ago
Andy Wilkinson d43b1ae3a5 Polish the Gradle plugin's javadoc 8 years ago
Andy Wilkinson 85267def3e Integration test the reaction to the Application plugin being applied 8 years ago
Andy Wilkinson 915c17b955 Integration test the reaction to the Maven plugin being applied 8 years ago
Andy Wilkinson e552975a7a Integration test the reaction to the War plugin being applied 8 years ago
Andy Wilkinson c1f2f8079b Integration test the reaction to the Java plugin being applied 8 years ago
Andy Wilkinson b9b402e3db Rework BuildInfo to separate task and build info properties
Previously, the properties that applied to the BuildInfo task itself
and those that would be written into the build-info.properties file
were all configured on BuildInfo directly. This lack of separation
could be confusing.

This commit rework BuildInfo to separate the task's own properties
from those that are written into the build-info.properties file.

The task has also been updated so that changes to a project's
properties made after the task has been configured are reflected in
the build info properties.
8 years ago
Andy Wilkinson 201ea133e1 Guide users to apply dependency management plugin when resolution fails 8 years ago
Andy Wilkinson 8d55801c4d Restructure the code to enforce separation of plugin logic and tasks 8 years ago
Andy Wilkinson 1dc5c484f0 Use application plugin properties by convention when it is applied
bootRun's main and jvmArgs properties use mainClassName and
applicationDefaultJvmArgs respectively by convention.

bootJar and bootWar's mainClass property uses mainClassName by
convention.
8 years ago
Andy Wilkinson 188c9e0f42 Remove assumptions from BootInfo and move them to the DSL extension 8 years ago
Andy Wilkinson 5708eaf41b Simplify the DSL extension to provide a solid foundation 8 years ago
Andy Wilkinson 8048791ab2 Remove AgentPluginFeatures as they are undocumented
The current implementation is undocumented so it's not clear exactly
what it's intended to do. It also appears to overreach as, for
example, it affects every JavaExec task in a project.

We may need to reinstate something that's somewhat equivalent, but I'd
like to do that armed with more information about the intent of the
functionality and some specific problems that need to be solved.
8 years ago
Andy Wilkinson f440b7b7e3 Move decision about an entry's compression out into BootJar and BootWar 8 years ago
Andy Wilkinson 5bf8f778e2 Don't write the default loader classes when a custom launcher is used 8 years ago
Andy Wilkinson 2b44ad9809 Rework BootRunTask to be more idiomatic and make fewer assumptions 8 years ago
Andy Wilkinson 6e7e42459b Exclude Devtools by default and provide an option to include it 8 years ago
Andy Wilkinson d015714cba Add support for reproducible archives to BootJar and BootWar
Closes gh-8391
8 years ago
Andy Wilkinson bc543ef08a Use a convention mapping for resolving main class from the classpath 8 years ago
Andy Wilkinson d9af21ab7c Create software components for Spring Boot jar and war artifacts
Closes gh-1666
8 years ago
Andy Wilkinson 31febfa383 Create distribution for Boot jar or war when application plugin applied
Closes gh-2622
8 years ago
Andy Wilkinson b4e2044b9e Simplify bootRun main class configuration by reusing MainClassSupplier 8 years ago
Andy Wilkinson f16efb2277 Publish artifacts and, when Maven plugin used, customize upload task
See gh-1666
8 years ago
Andy Wilkinson b1f9123311 React to dependency management plugin rather than always applying it
Previously, the Spring Boot plugin would automatically apply the
dependency management plugin and import the spring-boot-dependencies
bom. This made it very difficult to use Spring Boot's plugin without
also using its dependency management. It also made it difficult to
see where the dependency management was coming from.

This commit updates the Spring Boot plugin so that it no longer
automatically applies the dependency management plugin. Instead, the
plugin now reacts to the dependency management plugin being applied
by importing the spring-boot-dependencies bom. Users that do not
wish to use Spring Boot's dependency management capabilities can now
do so by not applying the dependency management plugin.

Closes gh-3164
8 years ago
Andy Wilkinson 2ce8556976 Introduce bootJar and bootWar tasks for creating fat jars and wars
Previously, the BootRepackage task would take the output of a Jar
or War task and repackage it in a similar manner to Spring Boot's
Maven plugin. This caused several problems in Gradle including
broken up-to-date checks and a lack of configurability. See the issues
referenced below for full details.

This commit replaces BootRepackage with BootJar and BootWar
for building executable jars and wars respectively. BootJar extends
Gradle's standard Jar task and BootWar extends Gradle's standard War
task. This means that terms of configuration, the creation of
executable jars and wars is now as flexible as the creation of
standards jars and wars.

Closes gh-8167
Closes gh-8099
Closes gh-6846
Closes gh-5861
Closes gh-5393
Closes gh-5259
Closes gh-3931
8 years ago
Andy Wilkinson 20fe95b276 React to the Java plugin being applied rather than always applying it 8 years ago
Andy Wilkinson 9b15e6b5a3 Use Gradle, executed by Maven, to build the Gradle plugin 8 years ago
Andy Wilkinson 3ec5041826 Merge branch '1.5.x' 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 ff50331168 Merge branch '1.5.x' 8 years ago