Commit Graph

1058 Commits (85267def3e4dab0ab54b712d638181ced78e40d1)

Author SHA1 Message Date
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
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 83df8e47fe Merge branch '1.5.x' 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
Phillip Webb ca5e566deb Fix Configuration processor test tangle
Move `Metadata` test class to fix a package tangle in the test code.

Fixes gh-8613
8 years ago
Andy Wilkinson b35c162593 Raise the minimum supported version of Gradle to 3.4
Closes gh-7922
8 years ago
Phillip Webb d8f827d224 Cleanup and format code 8 years ago
Phillip Webb 425dbc3e52 Update copyright header for edited files 8 years ago
Spring Buildmaster d23fa24340 Next Development Version 8 years ago
Spring Buildmaster 2a83e80a9b Next Development Version 8 years ago
Andy Wilkinson 9c88ba3b90 Merge branch '1.5.x' 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 b6e8a280fd Merge branch '1.5.x' 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 58ac67eb27 Merge branch '1.5.x' 8 years ago
Phillip Webb f1012c104a Polish 8 years ago
Stephane Nicoll 36fb0ed383 Merge branch '1.5.x' 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 a4bcd20b64 Merge branch '1.5.x' 8 years ago