Update JarFile to allow the custom registration of a JAR
`URLStreamHandler` that allows `jar:` URLs to be constructed from
Strings. This removes the previous requirement that all nested JAR URLs
be created with a 'context'.
To supported nested JARs the `java.protocol.handler.pkgs` system
property is changed so that our custom URLHandler is picked for 'jar'
protocols in preference to the Java default.
Fixes gh-269
Update `GroovyCompiler` and `AetherGrapeEngineFactory` to use the
recently added `spring-boot-dependency-tools` in favor of loading
dependency information from a generated properties file.
Add a gradle `ResolutionStrategy` that resolves missing version numbers
using the `spring-boot-dependencies` POM.
This commit also introduces a new `spring-boot-dependency-tools` module
that provides programmatic access to the `dependencyManagement` section
of the dependencies POM.
Fixed gh-262
Update the maven and gradle plugins to fail the build if a single
unique main class cannot be found. Additionally plugins will warn
if the search is taking too long.
Fixes gh-210
Usage:
$ gradle bootRun
...
Edit files in src/main/resources and see the changes live in a web app
(e.g. static resources in /static).
The old functionality of bootRun has been replaced (since it didn't add
a lot of value and also didn't expose any JMV argument setters of anything).
This new feature set is backed by any existing "run" task configuration.
In addition autodetects a main class if there is one in the project
sources, so no need for mainClassName = '...' in build.gradle.
Applies the 'application' plugin (so no need to declare that either).
Fixes gh-225
Fix JarEntryData to re-read the local header, rather than relying on
the central directory record.
This protects against the situation where a JAR file is written with an
'Extra Field Length' that is different in the local header to the
central directory header.
This appears to be the case with aspectj 1.7.4 which contains the
following central directory file header for ProceedingJoinPoint:
50 4B 01 02 signature
14 03 version made by
0A 00 version required
00 00 general
08 00 compress methods
0E 40 59 43 last modified
2D 59 20 70 crc
EC 00 00 00 csize
8D 01 00 00 size
2A 00 fname len
00 00 ext field len
00 00 file comment len
00 00 disk num
00 00 int file att
00 00 A4 81 ext file att
97 F3 00 00 relative offset of the local file header
... file name
and the following local header:
50 4B 03 04 signature
0A 00 version required
00 00 general
08 00 compress method
0E 40 59 43 last modified
2D 59 20 70 crc
EC 00 00 00 csize
8D 01 00 00 size
2A 00 fname len
14 00 ext field len
... file name
... extra field
Note that the 'ext field len' is 0x00 in the central record but 0x14 in
the local record.
Fixes gh-203
Previous fix for handling wildcard entries in a classpath
imposed a new problem in a case where entry is a directory
with a jar files but also contains a lot of nested directories.
For example entry "./*" resulted for scanning whole disk starting
from "/". In case of default hadoop classpath, it scanned everything
under hadoop's installation. On some cases this deep scan was hidden
and was revealed by NPE's for file access exceptions.
When we want to support wildcard entries we only want to get
jar files from that directory, while boot itself have a need
to travel recursively to find classfiles from an expoded archive.
We handle this case by using recursive(true by default) flag in
ExplodedArchive and this flag is set to false in PropertiesLauncher
if we match wildcard.
PropertiesLauncher now supports creating its own class loader
from looader.classLoader property. It will succeed if the
implementation specified has a default constructor or one
that takes a parent class loader, or one that takes a URL[]
and a parent class loader (like URLClassLoader).
Refactor spring-boot-loader to work directly with low level zip data
structures, removing the need to read every byte when the application
loads.
This change was initially driven by the desire to improve tab-completion
time when working with the Spring CLI tool. Local tests show CLI
startup time improving from ~0.7 to ~0.22 seconds.
Startup times for regular Spring Boot applications are also improved,
for example, the tomcat sample application now starts 0.5 seconds
faster.
By default it is on, but you can switch it
off (`-P '!integration'`) to ignore integration tests
and get a faster build.
.travis.yml uses this feature so that it doesn't keep
failing on a timeout.