973 Commits

Author SHA1 Message Date
Phillip Webb
9795262dc1 Polish 2020-04-01 11:20:56 -07:00
Scott Frederick
ac949d7851 Document remote Docker configuration
This commit adds documentation for the configuration required to
use a remote Docker daemon with the `build-image` Maven goal or the
`bootBuildImage` Gradle task.

See gh-20538
2020-03-31 13:37:55 -05:00
Stephane Nicoll
6aa3461611 Version layers configuration xsd
This commit provides a versioned xsd for the layers configuration of the
Maven plugin. The version starts at `2.3` to match with the Spring Boot
feature release in which this was introduced.

Closes gh-20663
2020-03-24 15:55:30 +01:00
dreis2211
f95e9543dc Fix typos in packaging docs
See gh-20630
2020-03-24 07:44:26 +01:00
Phillip Webb
0717de723f Polish 2020-03-23 20:03:44 -07:00
Phillip Webb
9a33a723fe Update copyright year of changed files 2020-03-23 14:15:08 -07:00
Madhura Bhave
7444306d0b Polish docs 2020-03-23 13:01:16 -07:00
Madhura Bhave
a06f4f21e3 Combine application and resources layers into a single layer
Closes gh-20562
2020-03-23 12:59:42 -07:00
Madhura Bhave
952e529787 Rename "classes" to "application" in custom layer configuration
Closes gh-20539
2020-03-23 10:44:03 -07:00
Stephane Nicoll
0b7f198b54 Publish Maven plugin API
This commit enables javadoc generator for the Spring Boot Maven plugin.

This also harmonizes the structure of the documentation, with an `/api`
and a `/reference` root directories for the javadoc and the reference
guide respectively.

Closes gh-20127
2020-03-19 14:00:58 +01:00
Scott Frederick
44f7508825 Fix BuildImageMojo javadoc. 2020-03-17 19:12:47 -05:00
Scott Frederick
08e96427de Add command-line properties for Maven build-image options
This commit adds support for setting the image name and builder
parameters of the Maven spring-boot:build-image goal using command-line
properties as an alternative to plugin configuration in pom.xml. Per
Maven conventions, a value in pom.xml configuration will override a
command-line property when both are provided.

Fixes gh-20520
2020-03-17 18:40:37 -05:00
Madhura Bhave
fb8b531bfd Polish 2020-03-16 17:45:56 -07:00
Madhura Bhave
84b2e8c308 Rename classes package to application
Closes gh-20526
2020-03-16 16:03:29 -07:00
Scott Frederick
f2dadf5a87 Add support for customizing layers in Gradle
This commit adds configuration to the Spring Boot Gradle plugin that
allows the names and contents of layers to be customized in the build
configuration.

Fixes gh-20296
2020-03-16 17:27:32 -05:00
Andy Wilkinson
c4a55a5fb4 Fail fast when attempting to repackage a reproducible war
Maven's war plugin does not support reproducible builds, resulting in
the entries in the war file not being written in a consistent order
from build to build.

Closes gh-20176
2020-03-16 20:29:37 +00:00
Andy Wilkinson
ca202ad59f Support Maven's outputTimestamp when repackaging jars and wars
Closes gh-20176
2020-03-16 17:19:52 +00:00
Madhura Bhave
e49e62df5c Add support for customizing layers in Maven
This commit adds an additional 'layers/configuration' property that can
be used to refer to a separate layers configuration file. This separate
file defines:

* The layers and their order of precedence,
* How libraries are handled using filters that match against the
coordinates of each library, and
* How classes are handled using filters that match against the location
of the entry

An XSD to validate the XML configuration file is available.

Closes gh-20295

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2020-03-12 14:50:08 +01:00
Scott Frederick
e60a7ea8d6 Fix Maven plugins tests on Windows
This commit fixes problems with file path separators and command
line argument quoting in Maven plug integration tests when run on
Windows.

Fixes gh-20244
2020-02-26 16:50:15 -06:00
Scott Frederick
509a1f1d41 Configure buildpack to use target Java version
With this commit, the Maven `spring-boot:build-image` goal and the
Gradle `bootBuildImage` task will configure the OpenJDK buildpack
to use the same JRE version as the project's target version,
provided the buildpack Java version is not explicitly set in the
build configuration.

Fixes gh-20172
2020-02-25 15:11:42 -06:00
Stephane Nicoll
c0c097117a Polish
See gh-20244
2020-02-21 09:27:00 +01:00
Scott Frederick
23e781033c Merge branch '2.2.x'
Closes gh-20244
2020-02-20 14:43:55 -06:00
Scott Frederick
625b40aa90 Prefer arguments in POM over spring-boot.run.arguments
This commit changes the order of precedence for the `arguments` property
of the AbstractRunMojo so that values specified in the POM override
values provided on the command line using `spring-boot.run.arguments`.
This brings the `arguments` property in line with all other Mojo
parameters.

Fixes gh-20024
2020-02-20 13:09:20 -06:00
Madhura Bhave
15cd590f7f Allow users to opt out of including the layer tools in a layered jar
For Maven, the layer configuration is now an additional configuration
option instead of a layout type.

Closes gh-19866
2020-02-19 17:28:27 -08:00
Johnny Lim
8be8a8421d Polish
See gh-20226
2020-02-19 09:34:46 +01:00
dreis2211
76d2bc27eb Explicitly set java home in Maven Plugin integration tests
See gh-20193
2020-02-18 12:05:43 +00:00
Scott Frederick
191dce3f5e Set Spring Boot version in ephemeral builder
This commit adds a `createdBy` structure to the metadata of the ephemeral
builder container image that identifies Spring Boot as the creator of the
image, along with the Spring Boot version.

See gh-20126
2020-02-12 13:31:21 -06:00
Stephane Nicoll
3229142188 Merge branch '2.2.x'
Closes gh-20121
2020-02-11 13:50:54 +01:00
Stephane Nicoll
765b2178d1 Document spring-boot.run.arguments behaviour with multiple arguments
Closes gh-19998
2020-02-11 13:39:10 +01:00
Scott Frederick
12c640e133 Upgrade default image builder version
This commit upgrades the default CNB builder image from
cloudfoundry/cnb:0.0.43-bionic to cloudfoundry/cnb:0.0.53-bionic.
It also adds integration tests for the Maven and Gradle plugins
to verify both versions are supported.
2020-02-06 17:24:29 -06:00
Johnny Lim
e6d5f5a271 Polish
See gh-19995
2020-02-01 09:24:20 +01:00
Phillip Webb
234c5033d4 Polish whitespace 2020-01-30 17:09:49 -08:00
Scott Frederick
653cabe2ce Add documentation for gradle bootBuildImage task 2020-01-30 17:54:15 -06:00
Andy Wilkinson
54b3f480b4 Use posix long names when creating tar archive for image building
Fixes gh-19964
2020-01-30 13:31:27 +00:00
dreis2211
741a4f4b2b Fix links in Maven Plugin documentation
See gh-19952
2020-01-28 10:50:36 +01:00
Stephane Nicoll
5410148f79 Improve documentation of 'image' parameter of Maven Plugin
Closes gh-19950
2020-01-27 20:56:42 +01:00
Stephane Nicoll
11c5fba355 Remove unnecessary execution-specific configuration in documentation
This documentation moves the specific `build-image` execution
configuration example of the Maven plugin documentation to the general
plugin configuration. This makes sure that it works in most cases and
an execution-specific configuration is not required here anyway.

Closes gh-19946
2020-01-27 20:12:00 +01:00
Stephane Nicoll
0bd03fa278 Fix xml syntax in example
Closes gh-19906
2020-01-24 16:01:44 +01:00
Andy Wilkinson
cbee16318f Fix version references in Maven Plugin's reference documentation
Closes gh-19878
2020-01-23 16:37:18 +00:00
Stephane Nicoll
331ebe90e0 Restore @since on build-image parameters 2020-01-23 16:47:03 +01:00
Stephane Nicoll
63019ab3f1 Add documentation for Maven plugin's build-image support
Closes gh-19830
2020-01-23 16:35:45 +01:00
Stephane Nicoll
6df5e7af4f Add integration tests for Maven plugin's build-image support
See gh-19830
2020-01-23 16:06:11 +01:00
Stephane Nicoll
105db66553 Polish 2020-01-23 14:04:19 +01:00
Stephane Nicoll
95be419527 Use Class.forName rather than ClassLoader.loadClass
This commit changes uses of ClassLoader.loadClass to Class.forName for
consistency with what was initiated in #19342 and better compatibility
with GraalVM.

Closes gh-19824
2020-01-23 10:47:53 +01:00
Phillip Webb
e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
2020-01-22 16:02:38 -08:00
Phillip Webb
0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
2020-01-22 15:49:52 -08:00
Phillip Webb
e28338d6cd Rename spring-boot-cloudnativebuildpack
Rename the `spring-boot-cloudnativebuildpack` module to
`spring-boot-buildpack-platform` and update the the package
name to `org.springframework.boot.buildpack.platform`.

Closes gh-19851
2020-01-22 11:01:32 -08:00
Phillip Webb
cb4928ad51 Add build-image support to the maven plugin
Add a new `build-image` goal to the Maven plugin to allow Docker images
to be create via using the cloud native buildpack.

See gh-19830
2020-01-20 23:48:47 -08:00
Madhura Bhave
cf01f9fba0 Add tests for configuring layered jar layout
Closes gh-19768
2020-01-16 11:27:41 -08:00
Scott Frederick
8f102aee68 Remove deprecated 2.2 code
See gh-19699
2020-01-16 14:44:52 +01:00