Commit Graph

298 Commits

Author SHA1 Message Date
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
fe10ea73b0 Merge branch '1.4.x' into 1.5.x 2016-10-05 14:58:42 +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
7e9ed5e1a7 Next Development Version 2016-09-21 07:58:07 +00: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
Andy Wilkinson
f1f5066786 Merge branch '1.3.x' 2016-04-06 13:29:01 +01:00
Vedran Pavic
9e287ef611 Improve repeatability of launch script tests
Previously, tags were used for CentOS and Ubuntu images that may
change over time. This commit updates the Dockerfiles to use fixed
base images. For Ubuntu, a fixed tag is available. For CentOS we
have to resort to using the digest.

Closes gh-5397
2016-04-06 13:28:16 +01:00
Phillip Webb
b398b3319c Rename @SpringApplicationTest -> @SpringBootTest
Rename @SpringApplicationTest to SpringBootTest and
@SpringApplicationContextLoader to @SpringBootContextLoader.

Fixes gh-5562
2016-04-04 22:36:58 -07:00
Andy Wilkinson
33f0ea3480 Rework SpringApplicationTest to support web modes
Rework the new testing support so that @SpringApplicationTest can be
used for standard integration tests, web integration tests with a
mock Servlet environment and web integration tests with an embedded
servlet container. This means that it a replacement for 1.3's
@IntegrationTest and @WebIntegrationTest and allows all
SpringApplication testing to be configured using a common annotation.

The old @IntegrationTest and @WebIntegrationTest along with their
supporting classes have been reinstated to their previous form (while
remaining deprecated). This should ensure that they continue to work
in 1.4 exactly as they did in 1.3 giving users a smooth path to
@SpringApplicationTest.

See gh-5477
2016-03-31 21:35:10 -07:00
Andy Wilkinson
fc463afb89 Merge branch '1.3.x' 2016-03-29 11:16:16 +01:00
Andy Wilkinson
1043239de0 Ignore non-JavaExec run task when finding application's main class
Previously, FindMainClassTask would look for a property named main
on any class named run. This was based on the assumption that the
run task would be a JavaExec task (typically provided by the
application plugin). If the run task was not a JavaExec task (more
accurately, if it did not have a main property) this would result in
a build failure due to trying to read a non-existent property.

This commit updates FindMainClassTask to only use the main property
of the run task if the task is a JavaExec task. This guarantees that
the property will exist on the task, and unlike using any property
named main on a task named run, also guarantee that its value will
refer to a Java class with a main method.

Closes gh-5501
2016-03-29 11:03:47 +01:00
Phillip Webb
0829a1bde8 Drop superfluous annotations
Update internal tests to drop annotations that can now
be inferred.

Fixes gh-5470
2016-03-23 22:19:36 -07:00
Phillip Webb
c28f552883 Migrate SpringJUnit4ClassRunner to SpringRunner
Replace all existing SpringJUnit4ClassRunner references with the new
SpringRunner alias.

Fixes gh-5292
2016-03-23 22:18:18 -07:00
Phillip Webb
2f815a907a Migrate existing tests from deprecated package
Update the existing tests to use the relocated `spring-boot-test`
classes. Restructuring was achieved using the following command:

find . -type f -name '*.java' -exec sed -i '' \
-e s/org.springframework.boot.test.ConfigFileApplicationContextInitializer/\
org.springframework.boot.test.context.ConfigFileApplicationContextInitializer/g \
-e s/org.springframework.boot.test.EnvironmentTestUtils/\
org.springframework.boot.test.util.EnvironmentTestUtils/g \
-e s/org.springframework.boot.test.IntegrationTest/\
org.springframework.boot.test.context.IntegrationTest/g \
-e s/org.springframework.boot.test.IntegrationTestPropertiesListener/\
org.springframework.boot.test.context.IntegrationTestPropertiesListener/g \
-e s/org.springframework.boot.test.OutputCapture/\
org.springframework.boot.test.rule.OutputCapture/g \
-e s/org.springframework.boot.test.SpringApplicationConfiguration/\
org.springframework.boot.test.context.SpringApplicationConfiguration/g \
-e s/org.springframework.boot.test.SpringApplicationContextLoader/\
org.springframework.boot.test.context.SpringApplicationContextLoader/g \
-e s/org.springframework.boot.test.SpringBootMockServletContext/\
org.springframework.boot.test.mock.web.SpringBootMockServletContext/g \
-e s/org.springframework.boot.test.TestRestTemplate/\
org.springframework.boot.test.web.client.TestRestTemplate/g \
-e s/org.springframework.boot.test.WebIntegrationTest/\
org.springframework.boot.test.context.web.WebIntegrationTest/g {} \;

See gh-5293
2016-03-23 22:17:50 -07:00
Andy Wilkinson
d46c9a28d5 Roll back to docker-java 2.x
This reverts 2ecb33f7 and largely reverts 2c619f8d.

docker-java 3.0 was causing a variety of problems and it appears that
we can get things working with Docker Java 2.2.x and Jackson 2.6.
2016-03-01 10:33:28 +00:00
Andy Wilkinson
2ecb33f7b4 Try to fix problems caused by stricter config checking in docker-java 3.0
Previously, the launch script integration tests ran happily on OS X and
on Bamboo’s Linux instances. With the upgrade to docker-java 3.0 that
is no longer the case with the default DockerClientConfig failing on
Bamboo as the default DOCKER_CERT_PATH location does not exist.

This commit updates the client configuration so that it attempts to
build the configuration once in it default configuration and, if this
fails, it tries again without TLS verification. This skips the check
of DOCKER_CERT_PATH’s validity.
2016-03-01 09:35:16 +00:00
Andy Wilkinson
2c619f8d93 Make launch script integration tests compatible with Spring Framework 4.3
Previously, the launch script integration tests used Jackson 2.1 to
align with the requirements of docker-java 2.x. This stopped working
when we upgraded to Spring Framework 4.3 which requires Jackson 2.6+.

This commit updates the launch script integration tests to use
docker-java 3.0.0-RC1 which is compatible with Jackson 2.6.x. An added
benefit is that 3.0 also adds support for copying an archive to a
container, allowing the custom command that performs this function to
be removed.

Closes gh-5278
2016-02-29 11:26:42 +00:00
Spring Buildmaster
225d877ab9 Next Development Version 2016-02-26 01:06:16 -08:00
Andy Wilkinson
44ddfcc7fa Upgrade copyright headers of all files changed in 2016 2016-02-25 12:09:42 +00:00
Andy Wilkinson
e04a8ff57d Merge branch '1.3.x' 2016-02-24 11:05:30 +00:00
Vedran Pavic
2641fe8f26 Tag Docker images created by launch script integration tests
Closes gh-5168
2016-02-24 11:04:27 +00:00
Phillip Webb
2baad56108 Fix spring-boot-launch-script-tests dependency
Remove the reference to the spring-boot:test jar since it's not
published.

See gh-5184
2016-02-20 00:22:28 -08:00
Phillip Webb
89b7704977 Extract spring-boot-test.jar
Relocate the `org.springframework.boot.test` package from the
`spring-boot.jar` to `spring-boot-test.jar`.

Fixes gh-5184
2016-02-19 19:28:37 -08:00
Andy Wilkinson
87fe0b2ade Use a conventional delegation model in LaunchedURLClassLoader
When an application is run as an executable archive with nested jars,
the application's own classes need to be able to load classes from
within the nested jars. This means that the application's classes need
to be loaded by the same class loader as is used for the nested jars.
When an application is launched with java -jar the contents of the
jar are on the class path of the app class loader, which is the
parent of the LaunchedURLClassLoader that is used to load classes
from within the nested jars. If the root of the jar includes the
application's classes, they would be loaded by the app class loader
and, therefore, would not be able to load classes from within the
nested jars.

Previously, this problem was resolved by LaunchedURLClassLoader being
created with a copy of all of the app class laoder's URLs and by
using an unconventional delegation model that caused it to skip its
parent (the app class loader) and jump straight to its root class
loader. This ensured that the LaunchedURLClassLoader would load both
the application's own classes and those from within any nested jars.
Unfortunately, this unusual delegation model has proved to be
problematic. We have seen and worked around some problems with Java
Agents (see gh-4911 and gh-863), but there are others (see gh-4868)
that cannot be made to work with the current delegation model.

This commit reworks LaunchedURLClassLoader to use a conventional
delegate model with the app class loader as its parent. With this
change in place, the application's own classes need to be hidden
from the app class loader via some other means. This is now achieved
by packaging application classes in BOOT-INF/classes (and, for
symmetry, nested jars are now packaged in BOOT-INF/lib). Both the
JarLauncher and the PropertiesLauncher (which supports the executable
jar layout) have been updated to look for classes and nested jars in
these new locations.

Closes gh-4897
Fixes gh-4868
2016-02-19 14:15:40 +00:00
Andy Wilkinson
77d426c284 Merge branch '1.3.x' 2016-02-08 16:14:52 +00:00
Vedran Pavic
6540b1f383 Remove Docker container after launch script test execution
Closes gh-5059
2016-02-08 16:14:35 +00:00
Phillip Webb
e214fa0949 Use AssertJ in spring-boot-integration-tests
See gh-5083
2016-02-06 15:51:27 -08:00
Stephane Nicoll
df64a74e60 Fix broken build
jetty-jndi is no longer shipped by default as of 2b2e21d but one test
checking for this wasn't updated properly.
2016-01-28 09:38:39 +01:00
Phillip Webb
fbaf209240 Move master to 1.4.0.BUILD-SNAPSHOT 2016-01-24 10:45:24 -08:00
Johnny Lim
9a31e02806 Polish
Closes gh-5013
2016-01-24 19:13:01 +01:00
Spring Buildmaster
504d3e97ba Next development version 2016-01-21 18:41:30 -08:00
Phillip Webb
cf93f84e87 Polish 2016-01-21 14:15:49 -08:00
Andy Wilkinson
a05a5b3f1c Fix problem reported by Checkstyle 2016-01-21 17:48:18 +00:00
Andy Wilkinson
9dc858cdf5 Add missing properties to RepackageTask and improve test coverage
Closes gh-4978
2016-01-21 17:04:25 +00:00
Andy Wilkinson
854cacdb4f Fix useStartStopDaemon in launch script and allow config via conf file
Commit 5a1ee6eb added support for disabling use of start-stop-daemon
via a placeholder in the default launch script. Unfortunately, that
placeholder was subsequently broken in 81a47639.

This commit reinstates the placeholder and adds tests to verify that all
of the placeholders in the launch script can be replaced and that they
have the required default values. Furthermore, it also allows the use of
start-stop-daemon to be configured via USE_START_STOP_DAEMON in an
app’s .conf file. This allows the configuration to be changed after the
app has been built.

Closes gh-4985
2016-01-21 14:58:51 +00:00
Andy Wilkinson
d1b47c8a8f Add integration tests for default launch script
This commit adds a suit of integration tests for the launch script. See
the accompanying README.adoc for further details.

Closes gh-4872
2016-01-13 13:28:14 +00:00
Spring Buildmaster
8db59059a5 Next Development Version 2015-12-18 05:43:02 -08:00
Johnny Lim
8ec00c35bf Polish
Closes gh-4572
2015-11-21 08:12:21 +01:00
Spring Buildmaster
3f6f57a80e Next Development Version 2015-11-16 03:18:54 -08:00
Dave Syer
fa9724becb Revert "Add or avoid proxy configurations for integration tests"
This reverts commit 251f2805a8.
2015-11-02 17:38:54 +00:00
mrumpf
251f2805a8 Add or avoid proxy configurations for integration tests
The Maven POM does all the dependency resolutions for the
spring-boot-antlib project. Delegating this task to Ivy, which is
buried deep in the Antrun/Antunit part of the build, makes any kind
of proxy configuration much more complex.
The ivysettings.xml already has the local M2 repository configured,
but because the folder "repository" is missing, the artifacts, already
downloaded by Maven cannot be resolved from this location.
The Spring and Maven Central repositories should be removed from the
ivysettings.xml files in order to force all resolves to be done through
the local M2 repository. The POM of joda-time version 2.8.1 has an
optional dependency to joda-convert 1.2, which lets the Ivy resolve
process fail, because this version of the joda-convert library was
not resolved by any of the Maven POMs. It seems as if Ivy does not
respect the optional scope, defined in the joda-time POM.

Pass proxy settings to the forked process to make the Gradle distribution download work

Create a gradle.properties file for each Gradle integration test and writes the forking
process' proxy settings as systemProp.http(s).Host/Port to the properties file.
This configures the external process with the right proxy settings to let it download
the Gradle distribution via the HTTP proxy server.

Added a hint for Windows users to get the core.autocrlf setting right

When the core.autocrlf setting under Windows is set to false for example
All files are not converted regarding their EOL characters to the
Windows format with CRLF at a line's end. There is a checkstyle
validation that checks that all files have the system's line endings
and in some test-cases the value from the system property "line.ending"
is used to check test output. So without the conversion, those checks
are going to fail, resulting in build errors.

Fixes gh-4367, fixes gh-3816
2015-11-02 17:23:30 +00:00
Phillip Webb
634bb770b2 Organize imports with new settings
See gh-4234
2015-10-19 12:58:34 -07:00
Phillip Webb
1e4d974ec0 Merge remote-tracking branch 'local12x/1.2.x' 2015-10-19 12:56:55 -07:00
Phillip Webb
a79131f8d2 Organize imports with new settings
See gh-4234
2015-10-19 12:55:44 -07:00
Spring Buildmaster
2b38a861e3 Next Development Version 2015-10-16 05:57:24 -07:00
Phillip Webb
d84889b03c Revert "Compile samples and integration tests with Java 8"
This reverts commit 09395f956a.
2015-10-16 00:01:52 -07:00
Phillip Webb
f02c651e40 Rename security-tests-* to security-test-*
Update spring-boot-security-tests to use standard module names.

Fixes gh-4101
2015-10-14 23:25:24 -07:00
Stephane Nicoll
e79ef9b73b Add option to exclude devtools from fat jar
Add an `excludeDevtools` property to both the Maven and Gradle plugin
that removes `org.springframework.boot:spring-boot-devtools` (if
necessary) when repackaging the application.

Closes gh-3171
2015-10-14 01:22:57 -07:00
Phillip Webb
c9fb9916b8 Reformat code using Eclipse Mars 2015-10-07 23:37:10 -07:00
Phillip Webb
e473364e4e Merge branch '1.2.x' 2015-10-07 23:34:08 -07:00
Phillip Webb
6ab376e2e8 Reformat code use Eclipse Mars 2015-10-07 23:32:31 -07:00
Phillip Webb
47576354f7 Merge branch '1.2.x' 2015-10-07 23:19:50 -07:00
Phillip Webb
09395f956a Compile samples and integration tests with Java 8
Update the samples and integration tests to use Java 8. There's no
specific reason to keep them on Java 6 and it helps keep Eclipse happy
if we upgrade.
2015-10-07 19:46:11 -07:00
Spring Buildmaster
9409c49c10 Next development version 2015-09-16 09:00:17 -07:00
Phillip Webb
d09805fd75 Polish license headers 2015-09-08 16:05:05 -07:00
Phillip Webb
6e29ee4557 Polish 2015-09-08 16:04:30 -07:00
Stephane Nicoll
7c0c953f81 Add value alias for SpringApplicationConfiguration
Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:

@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}

Closes gh-3635
2015-08-19 17:09:34 +02:00
Andy Wilkinson
434f528e0a Fix Gradle plugin task dependencies broken by removal of app plugin
8673250 updated the plugin so that the application plugin is no longer
applied by default. This exposed three problems:

 1. bootRepackage may run before findMainClass has run, leaving it with
    an unknown main class.
 2. findMainClass may run before the classes have been built, making it
    unable to find the main class by examining the class files
 3. The project's mainClassName property was still being used as a
    convention for the bootRun task's main property. If the application
    plugin has not be applied, then this property does not exist.

The first problem has been addressed by configuring bootRepackage to
depend on findMainClass.

The second problem has been addressed by configuring the main source
set's output as an input of findMainClass, and configuring findMainClass
to depend on the tasks that build the output.

The third problem has been addressed by only using the mainClassName
property if it exists and its value is not null. We then fallback to
using the mainClassName property on the project's extra properties in
the same way. 

See gh-2679
2015-07-22 13:47:29 +01:00
Spring Buildmaster
7ce391db4f Next development version 2015-07-01 22:48:01 -07:00
Andy Wilkinson
00d594dcda Replace GzipFilter and Tomcat compression with general purpose approach
Closes gh-3296
2015-06-29 15:58:57 +01:00
Phillip Webb
61fc4f3f12 Polish copyright headers 2015-06-23 10:22:14 -07:00
Phillip Webb
a48ed907e4 Merge branch '1.2.x' 2015-06-18 23:26:14 -07:00
Matt Benson
38e935ee5e Ignore failures when closing war files in tests
Update WarPackagingTests to ignore any IOExceptions when closing
created war files. Exceptions were sometimes thrown when running on a
Linux NTFS mount.

Fixes gh-3255
2015-06-18 23:23:07 -07:00
Spring Buildmaster
5d81c87b43 Next Development Version 2015-06-04 00:49:11 -07:00
Andy Wilkinson
51c49b69c5 Support bom-based dependency management in the CLI
Previously, the CLI’s dependency management used proprietary Properties
file-based metadata to configure its dependency management. Since
spring-boot-gradle-plugin’s move to using the separate dependency
management plugin the CLI was the only user of this format.

This commit updates the CLI to use Maven boms to configure its
dependency management. By default it uses the spring-boot-dependencies
bom. This configuration can be augmented and overridden using the new
@DependencyManagementBom annotation which replaces @GrabMetadata.

Closes gh-2688
Closes gh-2439
2015-05-07 14:58:23 +01:00
Andy Wilkinson
4452bb1873 Revert "Upgrade Gradle plugin’s ID so it’s suitable for the Plugin Portal"
This reverts commit b1c0a7cda4.

The plugin publishing process has moved to a new plugin-based approach
that brings with it some significant limitations:

 - There's no staging to allow the promotion of good release builds
 - There's no easy way to upload an existing artifact
 - There's no control over the published pom.

The risk brought by these limitations, particularly the first, are
too great so we will no be publishing the Boot plugin to the Portal
until they're resolved.

Changing the plugin's ID was a breaking change that would require
users to do some work when they upgrade to Boot 1.3. The ID of the
plugin was changed purely so that it met the Portal's requirements.
Given that the plugin will not be published to the Portal for the
foreseaable future there's no need for us to inflict a breaking change
on people when there will be no benefit.

See gh-1567
2015-04-21 12:37:12 +01:00
Phillip Webb
a8d099f6b8 Revert "Add start/stop goals to maven plugin"
This reverts commit 54e12a07e6.
2015-04-16 12:32:06 -07:00
Stephane Nicoll
54e12a07e6 Add start/stop goals to maven plugin
SpringApplicationLifecycle provides lifecycle operations on the current
Spring Boot application. It can be registered as an MBean of the platform
MBean server if a specific property is set. Besides, the JMX name can
also be customized via a property in case more than one Spring Boot
application is started in the same process.

The Maven plugin uses that MBean to check that the application is ready
before ending the "start" phase. It uses it to trigger a proper shutdown
of the application during the "stop" phase.

If the process has to be forked, the platform MBean server is exposed on
a configurable port so that the maven plugin can connect to it.

Such change permits the maven plugin to integrate a classical integration
test scenario where the "start" goal is invoked during the
pre-integration phase and the "stop" goal during the post-integration
phase.

Closes gh-2525
2015-04-16 11:50:18 +02:00
Spring Buildmaster
e03c11dda8 Next development version 2015-03-30 22:56:20 -07:00
Andy Wilkinson
075b5c1b18 Update war packaging tests following removal of jetty-jsp
See gh-2680
2015-03-30 15:16:30 +01:00
Andy Wilkinson
b1c0a7cda4 Upgrade Gradle plugin’s ID so it’s suitable for the Plugin Portal
Gradle’s plugin portal requires each plugin’s ID to be in a namespace.
Our existing ID, spring-boot, does not meet this requirement. This
commit changes the plugin’s ID to org.springframework.boot.spring-boot.
Note that, as is recommended [1], the plugin’s ID does not include
“gradle”.

See gh-1567

[1] http://plugins.gradle.org/submit
2015-03-19 14:25:07 +00:00
Andy Wilkinson
2c3c62d71c Replace basic Gradle dependency management with use of separate plugin
This commit replaces Spring Boot's basic dependency management support
with separate dependency management plugin. This has a number of
benefits including:

1. A Maven bom can be used rather than a custom properties file
2. Dependency management is applied transitively rather than only to
   direct dependencies
3. Exclusions are applied as they would be in Maven
4. Gradle-generated poms are automatically configured with the
   appropriate dependency management

Closes gh-2133
2015-03-19 13:23:40 +00:00
Phillip Webb
a57a88f5cf Move master to 1.3.0.BUILD-SNAPSHOT 2015-02-26 17:01:02 -08:00
Spring Buildmaster
8f0ad02237 Next development version 2015-02-26 15:26:53 -08:00
Phillip Webb
8e594c790e Fix eclipse errors and warnings
Fix some eclipse errors and warnings caused by XSD validation errors and
classes in the wrong place.
2015-02-24 12:44:19 -08:00
Phillip Webb
10257d96f2 Merge branch '1.1.x' 2015-02-23 18:02:23 -08:00
Phillip Webb
7ac8cac3b5 Reorganize integration tests
Make spring-boot-integration-tests a top level project and move the
existing gradle tests and security tests to be sub-modules.
2015-02-23 17:24:05 -08:00
Phillip Webb
f0ef882ff2 Filter integration tests to only pom folders
Update invoker configuration so that only folders with a pom.xml file
are invoked. This helps when switching between the 1.1.x and master
branches since empty folders left by git no longer fail the build.
2015-02-23 15:03:56 -08:00
Andy Wilkinson
a4b4b850d5 Remove duplicate deployment tests
Closes gh-2472
2015-02-12 16:44:06 +00:00
Phillip Webb
636898f9ad Polish 2015-02-09 11:39:48 -08:00
Andy Wilkinson
a88f27168a Add support to the Gradle plugin for disabling direct use of resources
The Maven plugin allows spring-boot:run to be configured so that
resources are loaded from their output location rather than from
src/main/resources. This commit adds an equivalent configuration
option to the Gradle plugin. To disable source resources from being
added to the classpath in place of those in the output location
the configure the bootRun tasks like this:

bootRun {
	addResources = false
}

Closes gh-2431
2015-02-03 10:52:10 +00:00
Phillip Webb
3328c1369f Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
2015-02-01 20:28:11 -08:00
Phillip Webb
555827cad7 Polish 2015-02-01 20:00:11 -08:00
Andy Wilkinson
2665ef0692 Merge branch '1.1.x' 2015-01-21 15:09:27 +00:00
Andy Wilkinson
93b2a17fb8 Make repackage depend on jar tasks from runtime project dependencies
By default, when building a project's jar its runtime dependencies
are not taken into account as they are not needed to successfully
compile the code that will be packaged in the jar. A side-effect of
this was that, if a project that was being repackaged had a runtime
dependency on another project, then the repackaged jar would not
include the jar of the project on which it has the runtime dependency
as the jar had not been built.

This commit updates Boot's repackage task to have a dependency on the
jar task of any project dependencies in the runtime configuration
thereby ensuring that those dependencies' jars will have been built
before the repackaging occurs.

Fixes gh-2344
2015-01-21 15:02:10 +00:00
Spring Buildmaster
60725cd8bd Next development version 2015-01-07 23:37:07 -08:00
Spring Buildmaster
63e6a25097 Next development version 2014-12-10 18:06:30 -08:00
Spring Buildmaster
1a788c1741 Next development version 2014-12-10 16:35:50 -08:00
Phillip Webb
44dde9fc12 Add deployment integration tests
Add deployment tests for Tomcat, TomEE and WildFly to ensure that
a basic Spring Boot application can be deployed to a traditional
Application server.

Since the deployment tests can be quite slow, they currently only
run in the "full" build profile.

Fixes gh-1736
2014-12-05 23:04:22 -08:00
Andy Wilkinson
90af8bf54a Add auto-configuration for Jetty 9's WebSocket support
Closes gh-1269
2014-11-19 14:44:54 +00:00
Andy Wilkinson
7a783f5a18 Merge branch '1.1.x' 2014-11-18 21:31:19 +00:00
Andy Wilkinson
863c099161 Add missing copyright headers 2014-11-18 21:29:54 +00:00
Spring Buildmaster
46b7738334 Next development version 2014-11-11 17:12:24 -08:00
Phillip Webb
3abd0e1956 Merge branch '1.1.x' 2014-11-07 09:50:12 -08:00
Phillip Webb
354389932a Move tomcat websocket dependency
Relocate tomcat-embed-websocket from spring-boot-starter-websocket
to spring-boot-starter-tomcat.

Fixes gh-1847
2014-11-07 09:49:47 -08:00
Phillip Webb
b6bacd5e8a Upgrade to Servlet 3.1, Tomcat 8 and Jetty 9
Upgrade to latest versions of Tomcat and Jetty and to the latest Servlet
API whilst will remaining compatible with Tomcat 7 and Jetty 8.

Fixes gh-1832, gh-369
2014-11-05 16:35:34 -08:00
Spring Buildmaster
3e71a21b30 Next development version 2014-10-10 15:19:47 -07:00
Andy Wilkinson
1f9515cd31 Merge branch '1.1.x' 2014-10-01 20:35:17 +01:00
Andy Wilkinson
f8477bd60e Add jar file that should have been included in bcd4c8ee 2014-10-01 20:34:57 +01:00
Andy Wilkinson
f2812afb19 Merge branch '1.1.x' 2014-10-01 19:20:28 +01:00
Andy Wilkinson
bcd4c8eee2 Produce a single library for multiple file dependencies on the same file
Previously, the Gradle plugin’s ProjectLibraries produced a new library
for every file dependency, even if the dependencies where on the same
file. This would lead to a repackaging failure due to multiple
libraries having the same name.

This commit updates ProjectLibraries to treat file dependencies on the
same file as a single library, thereby resolving the name clash.

Fixes gh-1646
2014-10-01 19:20:04 +01:00
Spring Buildmaster
edb4b7ed7d Next development version 2014-09-25 21:02:37 -07:00
Andy Wilkinson
b146e76b63 Merge branch '1.1.x' 2014-09-07 18:27:23 -05:00
Andy Wilkinson
06ffd9dd86 Fix configuration of Spring Loaded on Gradle 1.6
The applicationDefaultJvmArgs property was added in Gradle 1.7. This
commit updates RunPluginFeatures to access the property defensively
so that the plugin can be used with Gradle 1.6.

Fixes gh-1511
2014-09-07 18:23:16 -05:00
Spring Buildmaster
d63e4b4329 Next development version 2014-09-04 12:15:18 -07:00
Andy Wilkinson
2ed24ddcd5 Merge branch '1.1.x' 2014-08-21 16:26:52 +01:00
Andy Wilkinson
9717b7d840 Preserve JVM args when auto-configuring a Java agent in Gradle bootRun
Fixes #1411
2014-08-21 16:26:36 +01:00
Andy Wilkinson
c75782424c Add jar that should have been added as part of 69c61d0 2014-08-21 16:25:37 +01:00
Andy Wilkinson
0e7757decd Merge branch '1.1.x' 2014-08-21 15:38:13 +01:00
Andy Wilkinson
69c61d0e8e Include transitive file dependencies during Gradle repackaging
Previously, ProjectLibraries only considered a configuration's
direct file dependencies. This meant that a transitive file
dependency that should have been pulled in via a project dependency
was not included in the repackaged jar's lib directory.

ProjectLibraries has been updated to walk down the tree of project
dependencies and create libraries for any file dependencies that
are found.

Fixes gh-1368
2014-08-21 15:27:08 +01:00
Phillip Webb
7d4fbacecd Fix invoker to not download remote artifacts
Updates to prevent the maven-invoker-plugin from downloading remote
snapshot jars. Possibly caused by the recent changes to the
spring-boot-dependencies POM.

See gh-1413
2014-08-21 00:52:00 -07:00
Phillip Webb
fc7823bc42 Merge branch '1.1.x' 2014-08-18 17:55:21 -07:00
Phillip Webb
7685d18ed8 Add clean support for samples
Use ant-run to clean spring-boot-samples when `clean` is invoked on
the main project.
2014-08-18 17:29:50 -07:00
Phillip Webb
baec9f50a8 Merge branch '1.1.x' 2014-08-18 14:39:32 -07:00
Phillip Webb
2188e3553c Prevent tests from picking up empty starter dirs
Update StarterDependenciesIntegrationTests to only consider starter
folders that contain POM files.

Fixes gh-1395
2014-08-18 14:38:02 -07:00
Spring Buildmaster
74d0c5185a Next development version 2014-08-07 11:59:17 -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
fd3e5eceeb Polish 2014-07-08 01:05:56 -07:00
Phillip Webb
7455e4e86f Restore support for files gradle dependencies
Allow `compile files("$rootDir/vendor/foo.jar")` style declarations
with the jars repackaged from the gradle plugin.

Fixes gh-1215
2014-07-07 13:24:33 -07:00
Andy Wilkinson
4be688aa78 Fix Gradle repackaging so it is only performed on the desired jars
The logic that determined whether or not the repackaging action should
be applied to a particular jar task was broken and caused problems
when a custom RepackageTask was used in a project's build.

This commit updates the logic so that repackaging will be applied:

 - To the default jar task if RepackageTask.withJarTask is null
 - To a jar task if it is equal to RepackageTask.withJarTask
 - To a jar task if its name is equal to RepackageTask.withJarTask

Repackaging is not applied if:

 - RepackageTask.enabled is false

Numerous integration tests have been added to verify the repackaging
behaviour.

Fixes #1204
2014-07-03 11:42:11 +01:00
Phillip Webb
fa88c481a5 Remote trailing whitespace 2014-07-02 15:17:14 -07:00
Andy Wilkinson
53be0f8db7 Fix Gradle plugin logic for removing provided artifacts
The new ResolvedArtifact-based minus implementation was checking the
wrong Set when deciding whether or not a ResolvedArtifact should
be included in the result. This was leading to provided dependencies,
that should have only been packaging in WEB-INF/lib-provided also
being packaged in WEB-INF/lib.

The WarPackaging tests have been updated. In addition to checking that
WEB-INF/lib-provided does not contain anything that’s unexpected, they
also verify the contents of WEB-INF/lib

Fixes #1187
2014-07-01 10:06:47 +01:00
Dave Syer
7e24c8499a Add test for IO dependencies in gradle
See gh-1180
2014-06-27 12:30:48 +01:00
Spring Buildmaster
981669b7c0 Next development version 2014-06-26 14:09:54 -07:00
Phillip Webb
200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
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
Dave Syer
43cf95b845 Tidy up (remove unneeded property) RepackageTask 2014-06-25 13:33:26 +01:00
Spring Buildmaster
542f3cbda8 Next development version 2014-06-24 13:53:56 -07:00
Phillip Webb
c713c8091d Polish 2014-06-23 19:41:22 -07:00
Dave Syer
965c16d93f Add foo.jar to fix broken build 2014-06-23 21:54:22 +01:00