Commit Graph

225 Commits

Author SHA1 Message Date
Andy Wilkinson
6920c39349 Merge branch '1.3.x' into 1.4.x 2019-03-20 15:06:50 +00:00
Andy Wilkinson
0e009ef047 Use HTTPS to link to the Apache license 2019-03-20 15:00:10 +00:00
Spring Operator
e2837843e1 Update build and setup configuration to use HTTPS
See gh-16244
2019-03-19 16:44:10 +00:00
Spring Operator
7c314122f7 Update build and setup configuration to use HTTPS
See gh-16243
2019-03-19 16:01:05 +00:00
Spring Buildmaster
88e43c8421 Next Development Version 2017-06-08 09:52:43 +00:00
Andy Wilkinson
e60a261952 Do not allow failure to remove container to mask earlier failure 2017-06-03 16:53:28 +01:00
Andy Wilkinson
31ff7f1846 Tolerate Successfully built being found in response other than last
Different versions of Docker produce different responses when building
and tagging an image. On CI, a response with a stream like
"Successfully built 185991ffe24a" followed by a response with a
stream like "Successfully tagged spring-boot-it/centos:6.9-a23bced6"
is received. By default, for the building of an image to be considered
successful, the Docker Java client requires the stream for the last
response item to contain "Successfully built". This means that, on the
CI server, it incorrectly believes that the building of the tagged
image has failed.

This commit uses a custom BuildImageResultCallback that doesn't
require the last response to be the one that has a stream containing
"Successfully built". Instead, it looks back through the error-free
responses (newest to oldest) looking for one with a stream containing
"Successfully built".
2017-06-03 13:00:15 +01:00
Andy Wilkinson
0270ccafa5 Enable Docker command debug logging to improve diagnostics on CI server 2017-06-03 09:54:13 +01:00
Andy Wilkinson
a69a851ae9 Drop CentOS 5 from launch script tests and upgrade to 6.9
CentOS 5 was declared EOL in March 2017 and yum on longer works
out of the box. 6.9 is the latest release of CentOS 6. Tests for
CentOS 7 have not been added as it uses systemd rather than SysVinit.

Closes gh-9395
2017-06-02 19:45:45 +01:00
Spring Buildmaster
d719d2cbbc Next Development Version 2017-04-20 12:46:19 +00:00
Andy Wilkinson
2ddcf0e831 Avoid using File.renameTo(File) as it doesn't work on Windows 2017-03-13 15:46:19 +00:00
Andy Wilkinson
d32c3a7f43 Correct the URL that's called to test servlet context resources
See gh-8299
Closes gh-8525
2017-03-09 14:04:19 +00:00
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.
2017-03-09 12:41:32 +00:00
Spring Buildmaster
2a83e80a9b Next Development Version 2017-03-03 14:39:21 +00:00
Phillip Webb
987b6c956e Polish 2017-03-01 20:43:04 -08:00
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
2017-03-01 12:40:26 +00:00
Phillip Webb
47b00c086c Polish 2017-02-27 13:56:17 -08:00
Spring Buildmaster
ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
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.
2017-01-18 13:38:10 +00:00
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
2017-01-16 20:42:04 +00:00
Spring Buildmaster
9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb
bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Andy Wilkinson
6061dd492e Increase timeout in DevTools integration tests and improve diagnostics 2016-12-02 13:40:22 +00:00
Phillip Webb
fce17ca6d9 Polish 2016-11-18 15:50:19 -08:00
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
2016-11-17 20:41:25 +00:00
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
2016-11-17 19:19:54 +00:00
Spring Buildmaster
e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Andy Wilkinson
24f8c737fb Make relative PID_FOLDER and LOG_FOLDER absolute using jar's directory
Closes gh-7092
Closes gh-7093
2016-10-14 09:19:11 +01:00
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
2016-10-13 16:51:54 +01:00
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
2016-10-05 16:54:37 +01:00
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
2016-10-05 14:58:26 +01:00
Stephane Nicoll
6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Spring Buildmaster
5f959b074f Next Development Version 2016-09-20 20:20:06 +00:00
Andy Wilkinson
f266e8c69d Merge branch '1.3.x' 2016-09-18 22:10:37 +01:00
Andy Wilkinson
5a539ce381 Update launch script integration tests to work with Docker 1.12
Closes gh-6914 (I hope)
2016-09-18 22:10:26 +01:00
Phillip Webb
a3c63b9c34 Fix broken Gradle test
Update test broken by recent Jetty changes.

See gh-6692
2016-09-09 09:58:17 -07:00
Spring Buildmaster
334baaeffd Next development version 2016-07-28 19:54:01 +00:00
Spring Buildmaster
a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Phillip Webb
a2d8a769ab Fix broken tomcat-juli gradle test
Fix Gradle test broken when `tomcat-juli` was removed.

See gh-6192
2016-07-18 18:50:01 -07:00
Spring Buildmaster
2216369348 Next Development Version 2016-07-04 14:15:02 +00:00
Andy Wilkinson
fc78a8de90 Merge branch '1.3.x' 2016-06-15 20:22:56 +01:00
Andy Wilkinson
c808de0021 Allow custom repackage task to be used without a global main class
Closes gh-5956
2016-06-15 20:17:51 +01:00
Stephane Nicoll
f9288a3af1 Revert "Polish maven repositories definition"
This commit reverts 62fa602fea

See gh-6031
2016-06-10 17:25:31 +02:00
Stephane Nicoll
62fa602fea Polish maven repositories definition
Previously, Maven repositories definition was specified in a profile that
is active by default. It means that as soon as any profile is enabled by
the user, said profile is no longer enabled. This has the nasty
consequences of having copy/paste in several places to make sure our own
profiles still have the proper repositories definition.

This commit creates a single "repositories" profile that is always active
unless a given property is explicitely specified. This allows to remove
the duplication and make things more consistent.

Some Gradle-specific repositories were also hard-coded in two modules
without any profile at all, meaning they were polluting the build of
anybody using it. While the impacted modules are gradle specific, that
repository has been shared in the new "repositories" profile as well.

Closes gh-6031
2016-06-10 11:55:46 +02:00
Johnny Lim
38dc9ec441 Polish 2016-05-10 14:48:42 +01:00
Spring Buildmaster
819a9574a6 Next Development Version 2016-05-10 05:28:34 +00:00
Andy Wilkinson
5d2177038f Merge branch '1.3.x' 2016-05-09 11:51:57 +01:00
Vedran Pavic
3891b242a3 Update launch script integration tests
- Use the latest Docker image for Ubuntu 14.04 LTS based tests
- Add Ubuntu 16.04 LTS based tests

Closes gh-5868
2016-05-09 11:37:38 +01:00
Spring Buildmaster
376bbe68d8 Next Development Version 2016-05-06 11:23:57 +00:00
Andy Wilkinson
3bfc6b1a4b Avoid packaging two versions of same dependency in Gradle repackaging
Previously, the Gradle plugin would include all of the dependencies
from both the compile and runtime configurations in the repackaged
jar. In the unlikely event that the compile and runtime configurations
contained different versions of the same dependency, this would lead
to both versions of the dependency being packaged in the jar file.

The runtime configuration extends the compile configuration so, in
normal circumstances, it will contain a superset of the compile
configuration's dependencies. In the situation described above where
the two configurations contain different versions of the same
dependency the runtime configuration will only contain whichever
version of the two dependencies has "won". By default, this will
be the dependency with the higher version.

This commit updates the Gradle plugin to only include the runtime
configuration's resolved dependencies during repackaging. As explained
above, the runtime configuration extends the compile configuration so
any compile dependencies will still be included, with the added
benefit that duplicate versions of the same dependency will have been
resolved to a single, preferred version.

Closes gh-5749
2016-04-21 11:37:40 +01:00