Commit Graph

1062 Commits

Author SHA1 Message Date
Scott Frederick 1c11e163c7 Fix Maven plugin command-line examples
Fixes gh-21078
2020-04-30 12:19:14 -05:00
Scott Frederick 0cb090766f Fix typos in mock tests data 2020-04-29 18:08:34 -05:00
Scott Frederick f3d717e97a Use paketo-buildpacks/builder as default builder
This commit changes the default builder image from
`cloudfoundry/cnb:bionic-platform-api-0.2` to
`gcr.io/paketo-buildpacks/builder:base-platform-api-0.3`. It also
uses a `paketo-buildpacks/builder` image instead of a
`cloudfoundry/cnb` image to test compatibility with lifecycle v2
and uses paketo naming instead of cloudfoundry when mocking builder
interactions.

Some adjustments to lifecycle phases were also made to align more
closely with the pack CLI.

Fixes gh-21066
2020-04-29 14:28:25 -05:00
Andy Wilkinson c7a5b72565 Improve compatibility by replacing use of seq with a native for-loop
Closes gh-21068
2020-04-29 19:30:35 +01:00
Andy Wilkinson 2d769e7679 Polish "Stop limiting layer customization to external modules"
See gh-21207
2020-04-29 14:22:43 +01:00
Paddy Drury 98644df64d Stop limiting layer customization to external modules
See gh-21207
2020-04-29 14:22:43 +01:00
Stephane Nicoll 6921fdacac Expand configuration class eager filtering to imports
Previously, only root auto-configuration classes could be excluded
eagerly via an AutoConfigurationImportFilter. Any configuration class
loaded as a result of processing a particular auto-configuration were
parsed and checked as usual.

This commit makes use of the `getExclusionFilter` callback to expand
this filter to all candidates that are considered. The annotation
processor has also be expanded to generate metadata for non-root
configuration classes.

Closes gh-12157
2020-04-29 10:45:28 +02:00
Phillip Webb ad1248e4ec Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder"

Closes gh-21218
2020-04-28 19:20:24 -07:00
dreis2211 4b0a31acf8 Delete Toml class
See gh-21129
2020-04-28 11:01:00 +01:00
Andy Wilkinson fb33610027 Automatically create developmentOnly configuration
Previously, the developmentOnly configuration, typically used for
Devtools, had to be declared manually. The BootJar and BootWar tasks
then had a property, excludeDevtools, that could be used to control
whether or not Devtools would be excluded from the executable archive.

This commit updates the reaction to the Java plugin being applied to
automatically create the developmentOnly configuration. The classpaths
of bootJar and bootWar are then configured not to include the contents
of the developmentOnly configuration. As a result of this, the
excludeDevtools property is no longer needed and has been deprecated.
Its default has also been changed from true to false to make it easy
to opt in to Devtools, when configured as a development-only
dependency, being included in executable jars and wars by adding
developmentOnly to the classpath of the archive task.

Closes gh-16599
2020-04-27 13:38:14 +01:00
Phillip Webb 77b9dd900c Merge branch '2.2.x'
See gh-21127
2020-04-25 22:21:23 -07:00
Phillip Webb 7d53f7d27f Attempt to prevent JarFiles from being left open
Update `JarFile` to also call `super.close()` early for nested jars.

See gh-21126
2020-04-25 22:20:53 -07:00
Phillip Webb 4f47b7b46a Merge branch '2.2.x'
See gh-21127
2020-04-25 13:32:43 -07:00
Phillip Webb 7c6e912463 Attempt to prevent JarFiles from being left open
Update `JarFile` so that `super.close()` is called early so that the
file is not left open. Since we re-implement `JarFile` methods to work
directly on the underlying `RandomAccessDataFile`, it should be safe
to close immediately.

See gh-21126
2020-04-25 13:03:07 -07:00
Stephane Nicoll 961be0fea3 Merge branch '2.2.x'
Closes gh-21118
2020-04-25 09:15:49 +02:00
dreis2211 e3a9bacf3b Fix typo
See gh-21002
2020-04-25 09:14:01 +02:00
dreis2211 848127ae49 Avoid recompiling pattern in Handler#canonicalize
See gh-21103
2020-04-25 09:02:21 +02:00
dreis2211 5eb5bf0a2d Polish
See gh-21009
2020-04-25 08:54:47 +02:00
Stephane Nicoll 85e9f713b0 Update copyright year of changed files
See gh-21007
2020-04-25 08:50:51 +02:00
Johnny Lim 29717423a3 Remove this keyword on member method invocations
See gh-21007
2020-04-25 08:49:44 +02:00
Andy Wilkinson 076a384c9c Merge branch '2.2.x'
Closes gh-21112
2020-04-24 18:10:00 +01:00
Andy Wilkinson 29dc236bb2 Broaden deprecation warning check in Gradle Plugin's tests
Closes gh-21111
2020-04-24 17:45:42 +01:00
Scott Frederick 8f5ef951de Use current timestamp for index files with Gradle
This commit removes changes the timestamp used when writing the
classpath and layers index files in the Gradle plugin to be the
current timestamp unless `preserveFileTimestamps=true`. It also
polishes some duplication in the handling of entry attributes
when creating the fat archive and adds a test to verify that
the Gradle plugin uses the same fixed timestamp constant as
Gradle uses internally.

See gh-21005
2020-04-23 16:05:32 -05:00
Phillip Webb bf41da5322 Update copyright year of changed files 2020-04-21 18:12:27 -07:00
Phillip Webb ed7a5db174 Fail operations when JarFile is closed
Update `JarFile` to track when the instance has been closed and throw
an exception in the same way that `ZipFile` does.

Closes gh-21072
2020-04-21 18:12:03 -07:00
Phillip Webb cc33e23d31 Merge branch '2.2.x'
Closes gh-21074
2020-04-21 17:22:11 -07:00
Phillip Webb 6bf933205c Merge branch '2.1.x' into 2.2.x
Fixes gh-21073
2020-04-21 17:21:32 -07:00
Scott Frederick fa186aa15b Preserve timestamps on loader directories
Prior to this commit, when the Maven plugin copied
spring-boot-loader.jar to a repackaged archive the timestamps of class
files were preserved but the timestamps of directories were not
preserved. This resulted in the directories having a current timestamp.

This commit copies the directory timestamps from spring-boot-loader.jar
to the repackaged archive and adds tests to verify the proper
behavior.

See gh-20927
2020-04-21 18:58:34 -05:00
Phillip Webb c85918b8b3 Create new JarFile instance for URL connections
Update `JarURLConnection` to ensure that when connections are opened
a new copy of the JarFile is provided.

Prior to this commit, a single `JarFile` instance was shared which meant
that it could be accidental closed if accessed via
`JarURLConnection.getJarFile()`. If the underlying jar file is closed
then it's possible for a `NoClassDefFoundError` to be thrown if running
on JDK 11 with an active `SecurityManager`.

Closes gh-17796
2020-04-21 16:32:51 -07:00
Stephane Nicoll 692885f71e Merge branch '2.2.x'
Closes gh-21049
2020-04-21 16:00:41 +02:00
Stephane Nicoll 8cbd7f5cd0 Polish "Add support for initializing nested object when nothing bound"
This commit harmonizes the change made to @DefaultValue to the
annotation processor. If such annotation is added to a scalar value with
no value at all, no default value is produced.

Closes gh-18917
2020-04-21 15:59:34 +02:00
Scott Frederick 555132e096 Fix archive attributes in Gradle plugin
This commit ensures that file permissions are set on entries that the
Gradle plugin adds to an archive. It also reverts the constant date
and time used for added entries to a previous value to ensure a time
zone offset is not applied.

See gh-20927
2020-04-17 17:33:28 -05:00
Johnny Lim 5fad43ec40 Polish
See gh-20973
2020-04-16 13:46:53 +02:00
Stephane Nicoll 4648ecef6e Merge branch '2.2.x'
Closes gh-20969
2020-04-15 09:48:32 +02:00
Stephane Nicoll 1dd8dcc6c9 Polish "Polish JarFile to extra anonymous inner class"
See gh-20882
2020-04-15 09:39:00 +02:00
Konrado85 e0d1cf0e38 Polish JarFile to extra anonymous inner class
See gh-20882
2020-04-15 09:33:24 +02:00
Konrado85 9f4c39c985 Change PropertiesLauncher equals method to use URI
See gh-20872
2020-04-13 13:55:17 +02:00
dreis2211 4b9986d790 Remove unused fields in tests
See gh-20926
2020-04-13 13:46:43 +02:00
Cicio Flaviu 7f1655e5cb Add package-info to buildpack.platform.docker.ssl
See gh-20913
2020-04-10 08:57:23 -05:00
dreis2211 d4575bc122 Fix unused parameters
See gh-20911
2020-04-10 14:06:42 +02:00
Stephane Nicoll 1c70b6735a Remove plugin management for exec-maven-plugin
Closes gh-20883
2020-04-08 17:51:22 +02:00
dreis2211 ae15a3d162 Polish LayersIndex
See gh-20874
2020-04-08 17:29:07 +02:00
Madhura Bhave 62c09d607a Polish 2020-04-07 14:28:36 -07:00
Phillip Webb 3ca896e63f Polish 2020-04-07 12:10:49 -07:00
Phillip Webb 1640add8be Don't use Assert class from loader
Remove the use of `Assert` since it's unavailable that early.
2020-04-07 12:09:43 -07:00
Phillip Webb d9fb4dd477 Don't use monospacing in documentation headings
Closes gh-20875
2020-04-07 11:08:57 -07:00
Scott Frederick e17d4be484 Polish plugin documentation headings 2020-04-07 09:17:51 -05:00
Scott Frederick a64e26fc44 Polish plugin documentation headings 2020-04-07 08:53:37 -05:00
Phillip Webb 729fc9dd6d Ensure streams are always closed
Update `AbstractJarWriter` to ensure that streams are always closed,
even if entries are not written.
2020-04-06 23:48:37 -07:00
Phillip Webb 1abbfbbfcd Attempt to fix failing Windows test 2020-04-06 23:48:28 -07:00