Commit Graph

243 Commits (c736a1698b9309b8f6b3376b9676bc000afa01d2)

Author SHA1 Message Date
Spring Buildmaster 9768b0a8c2 Next Development Version 8 years ago
Andy Wilkinson 17062f9589 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 2ddcf0e831 Avoid using File.renameTo(File) as it doesn't work on Windows 8 years ago
Andy Wilkinson 50c0204f2d Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson d32c3a7f43 Correct the URL that's called to test servlet context resources
See gh-8299
Closes gh-8525
8 years ago
Andy Wilkinson 1395f38ee7 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson a2cf0455fd Fix static resource handling when run in IDE or using Maven or Gradle
The changes made for gh-8299 attempted to make static resource
handling consistent across Jetty, Tomcat, and Undertow. They did so
for application's launched using JarLauncher or WarLauncher but did
not consider application's launched in an IDE or using spring-boot:run
in Maven or bootRun in Gradle.

Running in an IDE or via Maven or Gradle introduces two new
resource locations:

 - Jars on the classpath with file protocol URLs (they are always
   jar protocol URLs when using either launcher)
 - Directories on the classpath from a project that is depended upon
   and contains resources in META-INF/resources

This commit updates the factories for all three containers to handle
these new resources locations. The integration tests have also been
updated.
8 years ago
Spring Buildmaster d23fa24340 Next Development Version 8 years ago
Spring Buildmaster 2a83e80a9b Next Development Version 8 years ago
Phillip Webb f1012c104a Polish 8 years ago
Phillip Webb 987b6c956e Polish 8 years ago
Andy Wilkinson 68af831059 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson b443b745fb Make static resource handling consistent across embedded containers
Previously, there were a number of inconsistencies in the embedded
containers' handling of static resources. The Servlet spec requires
that static resources can be served from the META-INF/resources/
directory of jars nested inside a war in WEB-INF/lib/. The intention
was also to extend this to cover jar packaging when jars are nested in
BOOT-INF/lib/. This worked when using Tomcat as long as Jasper was on
the classpath. If you didn't have Jasper on the classpath or you
were using Jetty or Undertow it did not work.

This commit updates the configuration of embedded Jetty, Tomcat, and
Undertow so that all three containers handle static resources in the
same way, serving them from jars in WEB-INF/lib/ or /BOOT-INF/lib/.
Numerous intergration tests have been added to verify the behaviour,
including tests for Tomcat 8.0 and 7.0 which is supported in addition
to the default 8.5.x. Note that static resource handling only works
with Jetty 9.3.x and 9.2 and earlier does not support nested jars (
see https://github.com/eclipse/jetty.project/issues/518 for details).

Closes gh-8299
8 years ago
Phillip Webb 47fd5f4fac Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 47b00c086c Polish 8 years ago
Andy Wilkinson f67dd957b1 Ignore excludeDevtools on extension when it has been set on bootRepackage
Previously, bootRepackage's excludeDevtools property would be
overridden by the springBoot extension's excludeDevtools property.
This prevented devtools from being included by configuring it on the
repackaging task.

This commit corrects the logic so that the setting on the repackaging
task takes priority. It also adds some tests to verify the behaviour.

Closes gh-8308
8 years ago
Spring Buildmaster 5c12500366 Next Development Version 8 years ago
Spring Buildmaster a2696bf873 Next Development Version 8 years ago
Spring Buildmaster ed1ce140c0 Next Development Version 8 years ago
Andy Wilkinson ba8f7214d8 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 0e72ef1a10 Improve diagnostics for in StarterDependenciesIntegrationTests
The root cause of the build failure something has a null message which
means there's no information available about why the build failed.
Instead of calling fail when a BuildException occurs, this commit
wraps it in a RuntimeException and rethrows it. This should make the
entire chain of exceptions available when a failure occurs.
8 years ago
Andy Wilkinson 69e7e31b1c Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 7c2664f959 Ensure that jar entry names use forward slashes, even on Windows
Previously, in the DevTools integration tests, portions of a File's
path were used to create the name of a jar entry. On Windows this
resulted in the entry containing \ characters. As a result the
directory structure was incorrect and the classes could not be loaded
from the jar.

This commit ensures that any \ characters are replaced with /
characters.

See gh-7782
8 years ago
Phillip Webb aacf5d660f Update copyright year for changed files 8 years ago
Gaurav Rawat 509be7474d Add `force-stop` support to launch script
Update the embedded launch script to support `force-stop`.

Closes gh-6223
8 years ago
Phillip Webb a23591e047 Support Jetty 9.4 and upgrade to 9.4.0.v20161208
Update `JettyEmbeddedServletContainerFactory` to support Jetty 9.4
directly and Jetty 9.3 via reflection. The primary difference between
Jetty 9.3 and 9.4 are the session management classes. Websocket suppport
has also been updates, but this is handled transparently by the
Spring Framework support.

Fixes gh-7599
8 years ago
Spring Buildmaster 9057f9ae1f Next development version 8 years ago
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb bd74c3d327 Polish formatting 8 years ago
Johnny Lim 6d1b752ffe Polish
Closes gh-7552
8 years ago
Andy Wilkinson b546fd1046 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 6061dd492e Increase timeout in DevTools integration tests and improve diagnostics 8 years ago
Vedran Pavic 8bd2e69915 Update Docker images used by launch script integration tests 8 years ago
Phillip Webb 9e18021e8c Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb fce17ca6d9 Polish 8 years ago
Andy Wilkinson cd3f951d35 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 5dea4c5a03 Wait for server port to be written in a more robust manner
Previously, we just waited for the file to exist before trying to read
the port from it. This left a window where the file existed but its
contents had not be written which could result in a
NumberFormatException.

This commit now waits for the file to have a length that is greater
than zero.

See gh-7379
8 years ago
Andy Wilkinson eff0fc0221 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 918e122ddc Fix remote DevTools' support for adding and removing classes
Previously, remote DevTools only correctly supported modifying
existing classes. New classes that were added would be missed, and
deleted classes could cause a failure as they would be found by
component scanning but hidden by RestartClassLoader.

This commit introduces a DevTools-specific ResourcePatternResolver
that is installed as the application context's resource loader. This
custom resolver is aware of the files that have been added and
deleted and modifies the result returned from getResource and
getResources accordingly.

New intergration tests have been introduced to verify DevTools'
behaviour. The tests cover four scenarios:

- Adding a new controller
- Removing an existing controller
- Adding a request mapping to a controller
- Removing a request mapping from a controller

These four scenarios are tested with:

- DevTools updating a local application
- DevTools updating a remote application packaged in a jar file
- DevTools updating a remote application that's been exploded

Closes gh-7379
8 years ago
Spring Buildmaster e712a9ba8c Next Development Version 8 years ago
Andy Wilkinson ef3395beaa Raise the minimum supported version of Gradle to 2.9
Closes gh-6884
8 years ago
Andy Wilkinson 899b8a04cb Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 24f8c737fb Make relative PID_FOLDER and LOG_FOLDER absolute using jar's directory
Closes gh-7092
Closes gh-7093
8 years ago
Andy Wilkinson 57b7357be7 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 03deff9a1c Handle relative pid folder correctly in the launch script
Previously, a relative PID folder was not handled correctly when
running stop, status, or force_reload. This meant that a service
could be started when configured to use a relative pid file, but
then could not be stopped.

The PID folder should be treated as relative to the service's jar
file. This commit updates stop, status, and force_reload to push the
jar file's directory so that this is now the case for those three
commands.

Closes gh-7092
8 years ago
Andy Wilkinson 31e6819a6c Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 97cf2e9677 Polish new tests for the Gradle plugin's deprecated ID
The output capture for the deprecation warning only appears to work
when the test is run in isolation. I can't figure out why that's the
case, particularly as we have another test class
(BootRunResourceTests) that uses OutputCapture and works reliably.

I'm cutting my loses and removing the use of OutputCapture and the
assertion that the warnings is logged.

See gh-6997
8 years ago
Andy Wilkinson fe10ea73b0 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson ad3e5c04bb Add a second, portal-compatible ID to the Gradle plugin
To be compatible with Gradle's plugin portal, plugins must have an
ID that uses a reverse domain name. This means that spring-boot is
not compatible.

This commit introduces a new ID, org.springframework.boot, and
deprecates the old ID.

Closes gh-6997
8 years ago
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 8 years ago