170 Commits

Author SHA1 Message Date
Andy Wilkinson
ade22c87ec Update WarLauncher to remove the root of the war from the classpath
Previously, WarLauncher included its root on the classpath. It also used
a filtered version of its root archive to hide both the WEB-INF and
META-INF directories. This meant that files in WEB-INF and META-INF
could be found by the classloader (as they were on the classpath) but
could not be read as the filtered archive was hiding them.

This commit updates WarLauncher to remove the root of the war file from
the classpath. It also removes the filtering of the archive, thereby
allowing files in META-INF and WEB-INF to be accessed via the
ServletContext.

Closes gh-1792
2014-11-11 14:42:19 +00:00
Andy Wilkinson
b99ffcc170 Merge branch '1.1.x' 2014-11-10 15:43:07 +00:00
Michael Cramer
f62664534d Update maven-dependency-plugin to version 2.9
Closes gh-1862
2014-11-10 15:40:42 +00:00
Phillip Webb
2e7aa4685b Polish 2014-10-21 20:34:00 -07:00
Andy Wilkinson
886bbc3b41 Merge branch '1.1.x' 2014-10-15 16:36:11 +01:00
Andy Wilkinson
9a2d654eba Rename test classes so that their tests are run by Maven 2014-10-15 16:35:48 +01:00
Andy Wilkinson
7211571969 Fix some grammar issues in docs
Closes gh-1695
2014-10-13 13:18:24 +01:00
Eric Dahl
16937746a0 Fix some grammar issues in docs 2014-10-13 12:22:14 +01:00
Spring Buildmaster
3e71a21b30 Next development version 2014-10-10 15:19:47 -07:00
Phillip Webb
509c3aef4e Merge branch '1.1.x' 2014-10-09 19:23:57 -07:00
Phillip Webb
6028d92a4e Support Windows UNC paths with fat jars
Update `Launcher` and `JarFile` to correctly deal with Windows UNC
paths.

Fixes gh-1641
2014-10-09 19:06:28 -07:00
Andy Wilkinson
316e5f78f9 Merge branch '1.1.x' 2014-10-01 10:12:19 +01:00
Andy Wilkinson
f7d1f968b9 Improve error message when JarFile encounters a compressed nested jar
Closes gh-1643
2014-10-01 10:09:30 +01:00
Spring Buildmaster
edb4b7ed7d Next development version 2014-09-25 21:02:37 -07:00
Spring Buildmaster
d63e4b4329 Next development version 2014-09-04 12:15:18 -07:00
Dave Syer
399238384f Merge branch '1.1.x' 2014-08-19 14:16:44 +01:00
Dave Syer
8e84151f8f Normalize search path in PropertiesLauncher
* Windows: allow absolute file paths without file:/// prefix
* All: only add nested archives (not directories), so loader.path=lib/*
behaves the same as -classpath=lib/* (except for adding zip files)

Fixes gh-1352
2014-08-19 14:16:10 +01:00
Dave Syer
ccfc47091c Fix URL filtering when loading from a directory
The ExplodedArchive would erroneously always attempt to filter
its contents (and thereby shield them from a classloader that wrapped
it) even if they haven't been explicitly provided.

See gh-1352
2014-08-19 14:16:10 +01:00
Phillip Webb
54625cc2a0 Make LaunchedURLClassLoader lock provider static
Fixes gh-1380
2014-08-18 20:08:03 -07:00
Spring Buildmaster
74d0c5185a Next development version 2014-08-07 11:59:17 -07:00
Phillip Webb
4f440fcbb9 Java 7 ClassLoader performance improvements
Use Java 7 `registerAsParallelCapable` and `getClassLoadingLock` methods
when possible. This should improve performance when running on JDK 7+
whilst still remaining JDK 6 compatible.

Closes gh-1284
2014-07-29 14:12:52 -07:00
Stephane Nicoll
249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 2014-07-11 10:44:05 +02:00
Spring Buildmaster
40327e1ae6 Next development version 2014-07-08 02:33:36 -07:00
Phillip Webb
fa88c481a5 Remote trailing whitespace 2014-07-02 15:17:14 -07:00
Spring Buildmaster
981669b7c0 Next development version 2014-06-26 14:09:54 -07:00
Phillip Webb
35b26b52f2 Add caching to JarFile.getUrl()
Fixes gh-1178
2014-06-26 11:23:35 -07:00
Phillip Webb
200cd535c2 Revert "Next development version"
This reverts commit 67189477fe9db7a1e4c5268886868221ca6d2628.
2014-06-26 11:03:09 -07:00
Spring Buildmaster
67189477fe Next development version 2014-06-26 10:51:35 -07:00
Phillip Webb
9632abf825 Formatting and cleanup 2014-06-26 09:41:15 -07:00
Phillip Webb
7e7733d45d Deal with spaces in file references
Fixes gh-1169
2014-06-25 15:43:07 -07:00
Phillip Webb
7654259f80 Fix JarFile issues when running on Windows
Fix 'fat jar' support for windows to correctly deal with URL and path
slash issues. The root cause of the original problem was caused by JAR
URLs not including a root slash (ie `file:C:/Users` vs `file:/C:/Users`)

Fixes gh-1145
2014-06-25 14:32:31 -07:00
Spring Buildmaster
542f3cbda8 Next development version 2014-06-24 13:53:56 -07:00
Phillip Webb
60ef031f78 Fix "signer information does not match" error
Update ExecutableArchiveLauncher so that `-cp` URLs are not added
when they are already contained as nested JARs. This prevents a
SecurityException "signer information does not match error" when using
signed jars. The root cause of the issue was that the primary JAR file
was on the default classpath with the URL "file:....jar" and in the
main URL set as "jar:file:....jar". It is now filtered so that only
the "jar:" variant is added.

Fixes gh-1134
2014-06-24 11:46:15 -07:00
Phillip Webb
f30b962ff9 Add support for unpacking nested JARs
Update the executable JAR code to automatically unpack any entries
which include an entry comment starting `UNPACK:` to the temp folder.
The existing Maven and Gradle plugins have been updated with new
configuration options and the `spring-boot-tools` project has been
updated to write the appropriate entry comment based on a flag passed
in via the `Library` class.

This support has been added to allow libraries such a JRuby (which
assumes that `jruby-complete.jar` is always accessible as file) to work
with Spring Boot executable jars.

Fixes gh-1070
2014-06-24 00:46:56 -07:00
Phillip Webb
3d6c8a85f4 Allow URL resolution within nested JARs
Update JarURLConnection to allow the resolution of items within a nested
jar, even if the jarFile passed to the connection is several levels up.

This prevent a connection from incorrectly resolving an entry against
the wrong jar file.

See gh-1070
2014-06-23 22:35:37 -07:00
Phillip Webb
20fb55ea47 Polish 2014-06-20 10:29:47 -07:00
Phillip Webb
a3ceaf63e2 Improve performance of fat jar loading
Tweak 'fat jar' handling to generally improve performance:

- Allow JarURLConnection to throw a static FileNotFoundException when
  loading classes. This exception is thrown many times when attempting
  to load a class and is silently swallowed so there is no point in
  providing the entry name.
- Expose JarFile.getJarEntryData(AsciiBytes) and store AsciiBytes in
  the JarURLConnection. Previously AsciiBytes were created, discarded
  then created again.
- Use EMPTY_JAR_URL for the JarURLConnection super constructor. The URL
  is never actually used so we can improve performance by using a
  constant.
- Extract JarEntryName for possible caching. The jar entry name
  extracted from the URL is now contained in an inner JarEntryName
  class. This could be cached if necessary (although currently it is
  not because no perceivable performance benefit was observed)

Fixes gh-1119
2014-06-20 10:29:47 -07:00
Phillip Webb
a8777eda76 Add JarFile caching
Cache root jar files in the Handler and also store nested jar files in
the JarEntryData.

See gh-1119
2014-06-20 10:29:47 -07:00
Phillip Webb
88195292dd Reuse previously parsed entries for filtered JARs
Update JarFile to reuse the previously parsed entries when creating
filtered jars. This saves needing to re-scan the underlying file to
recreate a subset of entries.

See gh-1119
2014-06-20 10:29:47 -07:00
Phillip Webb
e9aab1e90c Drop JarEntryFilters from constructor and methods
Drop JarEntryFilter arguments from the JarFile constructor and the
getNestedJarFile methods. Filtered JarFiles can still be obtained by
using the getFilteredJarFile() method.

This helps simplify the code a little and will make it easier to add
caching.

See gh-1119
2014-06-20 10:29:47 -07:00
Phillip Webb
54dc46f777 Allow prefixed bytes with fat JARs
Update `spring-boot-loader` ZIP processing code to support prefixed
bytes within the fat jar. This technique allows a bash script to be
embedded at the start of the JAR whilst still allowing `java -jar`
execution.

Fixes gh-1073
2014-06-15 09:11:51 -07:00
Spring Buildmaster
4ca26a21dc Next development version 2014-06-11 10:46:27 -07:00
Spring Buildmaster
05ed7b3bcd Next development version 2014-06-10 12:40:35 -07:00
Phillip Webb
3007a777d0 Roll back to 1.1.0.BUILD-SNAPSHOT 2014-06-10 09:00:08 -07:00
Spring Buildmaster
c650f2391e Next development version 2014-06-09 21:55:19 -07:00
Phillip Webb
b5d267ca89 Polish 2014-06-09 12:33:49 -07:00
Phillip Webb
99af5dbe23 Merge branch '1.0.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2014-05-28 14:57:13 +01:00
Phillip Webb
d848f03c43 Fix URL methods in JarURLConnection
Update JarURLConnection to return correct values from `getURL()`,
`getJarFileURL()` and `getEntryName()`.

Fixes gh-973
2014-05-28 14:41:15 +01:00
Phillip Webb
695571ad0b Unify versions in POMs started by the invoker
Unify the versions used in integration tests launched by the
maven-invoker-plugin. Allows for already cached local copies to be
used, hopefully speeding up the build.
2014-05-28 14:35:28 +01:00
Phillip Webb
d4d3ffa93c Unify versions in POMs started by the invoker
Unify the versions used in integration tests launched by the
maven-invoker-plugin. Allows for already cached local copies to be
used, hopefully speeding up the build.
2014-05-27 21:25:34 +01:00