Commit Graph

188 Commits (07b2fe1d670c3d954577a3b498a1dec7df6781a2)

Author SHA1 Message Date
Phillip Webb 1e4d974ec0 Merge remote-tracking branch 'local12x/1.2.x' 9 years ago
Phillip Webb a79131f8d2 Organize imports with new settings
See gh-4234
9 years ago
Spring Buildmaster 2b38a861e3 Next Development Version 9 years ago
Phillip Webb d84889b03c Revert "Compile samples and integration tests with Java 8"
This reverts commit 09395f956a.
9 years ago
Phillip Webb f02c651e40 Rename `security-tests-*` to `security-test-*`
Update spring-boot-security-tests to use standard module names.

Fixes gh-4101
9 years ago
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
9 years ago
Phillip Webb c9fb9916b8 Reformat code using Eclipse Mars 9 years ago
Phillip Webb e473364e4e Merge branch '1.2.x' 9 years ago
Phillip Webb 6ab376e2e8 Reformat code use Eclipse Mars 9 years ago
Phillip Webb 47576354f7 Merge branch '1.2.x' 9 years ago
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.
9 years ago
Spring Buildmaster 9409c49c10 Next development version 9 years ago
Phillip Webb d09805fd75 Polish license headers 9 years ago
Phillip Webb 6e29ee4557 Polish 9 years ago
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
9 years ago
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
9 years ago
Spring Buildmaster 7ce391db4f Next development version 10 years ago
Andy Wilkinson 00d594dcda Replace GzipFilter and Tomcat compression with general purpose approach
Closes gh-3296
10 years ago
Phillip Webb 61fc4f3f12 Polish copyright headers 10 years ago
Phillip Webb a48ed907e4 Merge branch '1.2.x' 10 years ago
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
10 years ago
Spring Buildmaster 5d81c87b43 Next Development Version 10 years ago
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
10 years ago
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
10 years ago
Phillip Webb a8d099f6b8 Revert "Add start/stop goals to maven plugin"
This reverts commit 54e12a07e6.
10 years ago
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
10 years ago
Spring Buildmaster e03c11dda8 Next development version 10 years ago
Andy Wilkinson 075b5c1b18 Update war packaging tests following removal of jetty-jsp
See gh-2680
10 years ago
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
10 years ago
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
10 years ago
Phillip Webb a57a88f5cf Move master to 1.3.0.BUILD-SNAPSHOT 10 years ago
Spring Buildmaster 8f0ad02237 Next development version 10 years ago
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.
10 years ago
Phillip Webb 10257d96f2 Merge branch '1.1.x' 10 years ago
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.
10 years ago
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.
10 years ago
Andy Wilkinson a4b4b850d5 Remove duplicate deployment tests
Closes gh-2472
10 years ago
Phillip Webb 636898f9ad Polish 10 years ago
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
10 years ago
Phillip Webb 3328c1369f Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
10 years ago
Phillip Webb 555827cad7 Polish 10 years ago
Andy Wilkinson 2665ef0692 Merge branch '1.1.x' 10 years ago
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
10 years ago
Spring Buildmaster 60725cd8bd Next development version 10 years ago
Spring Buildmaster 63e6a25097 Next development version 10 years ago
Spring Buildmaster 1a788c1741 Next development version 10 years ago
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
10 years ago
Andy Wilkinson 90af8bf54a Add auto-configuration for Jetty 9's WebSocket support
Closes gh-1269
10 years ago
Andy Wilkinson 7a783f5a18 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 863c099161 Add missing copyright headers 10 years ago
Spring Buildmaster 46b7738334 Next development version 10 years ago
Phillip Webb 3abd0e1956 Merge branch '1.1.x' 10 years ago
Phillip Webb 354389932a Move tomcat websocket dependency
Relocate tomcat-embed-websocket from spring-boot-starter-websocket
to spring-boot-starter-tomcat.

Fixes gh-1847
10 years ago
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
10 years ago
Spring Buildmaster 3e71a21b30 Next development version 10 years ago
Andy Wilkinson 1f9515cd31 Merge branch '1.1.x' 10 years ago
Andy Wilkinson f8477bd60e Add jar file that should have been included in bcd4c8ee 10 years ago
Andy Wilkinson f2812afb19 Merge branch '1.1.x' 10 years ago
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
10 years ago
Spring Buildmaster edb4b7ed7d Next development version 10 years ago
Andy Wilkinson b146e76b63 Merge branch '1.1.x' 10 years ago
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
10 years ago
Spring Buildmaster d63e4b4329 Next development version 10 years ago
Andy Wilkinson 2ed24ddcd5 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 9717b7d840 Preserve JVM args when auto-configuring a Java agent in Gradle bootRun
Fixes #1411
10 years ago
Andy Wilkinson c75782424c Add jar that should have been added as part of 69c61d0 10 years ago
Andy Wilkinson 0e7757decd Merge branch '1.1.x' 10 years ago
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
10 years ago
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
10 years ago
Phillip Webb fc7823bc42 Merge branch '1.1.x' 10 years ago
Phillip Webb 7685d18ed8 Add clean support for samples
Use ant-run to clean spring-boot-samples when `clean` is invoked on
the main project.
10 years ago
Phillip Webb baec9f50a8 Merge branch '1.1.x' 10 years ago
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
10 years ago
Spring Buildmaster 74d0c5185a Next development version 10 years ago
Stephane Nicoll 249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 11 years ago
Spring Buildmaster 40327e1ae6 Next development version 11 years ago
Phillip Webb fd3e5eceeb Polish 11 years ago
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
11 years ago
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
11 years ago
Phillip Webb fa88c481a5 Remote trailing whitespace 11 years ago
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
11 years ago
Dave Syer 7e24c8499a Add test for IO dependencies in gradle
See gh-1180
11 years ago
Spring Buildmaster 981669b7c0 Next development version 11 years ago
Phillip Webb 200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
11 years ago
Spring Buildmaster 67189477fe Next development version 11 years ago
Phillip Webb 9632abf825 Formatting and cleanup 11 years ago
Dave Syer 43cf95b845 Tidy up (remove unneeded property) RepackageTask 11 years ago
Spring Buildmaster 542f3cbda8 Next development version 11 years ago
Phillip Webb c713c8091d Polish 11 years ago
Dave Syer 965c16d93f Add foo.jar to fix broken build 11 years ago
Dave Syer 1b97e8d921 Skip dependency exclusions if groupId is null
Fixes gh-1133
11 years ago
Phillip Webb 179e1558f6 Polish 11 years ago
Dave Syer 2433f721bc Add 'classifier' property to Gradle plugin
The default behaviour doesn't change with this commit, but now
the user has the option to specify a 'classifier' property
either in springBoot { classifier = 'exec' } (i.e. globally
for all repackage tasks) or in each repackage task, e.g.
bootRepackage { classifier = 'exec' }. In that case the original
archive is not overwritten but copied into <file>-<classifier>.jar
(or .war etc.) and then enhanced.

Fixes gh-1113, fixes gh-141 also I believe.
11 years ago
Dave Syer 4a40e8f833 Support for main class detection in installApp
I'm sure someone can do a better job of this, but here's a proposal
that works. It uses our FindMainTask to set the relevant properties
if theu are missing in the application plugin.

Fixes gh-1105
11 years ago
Phillip Webb 3a8a127285 Implement simpler exclusion logic for Gradle
Simplify the exclusion logic used in Gradle by implementing implicit
exclusions rather than trying to detect transitive excludes.

This commit reverts much of the code originally included to fix gh-1047
which adds far too much complexity to the build and still doesn't solve
the underlying issue.

Fixes gh-1103
11 years ago
Dave Syer 299311d71f Grab main class from "run" task if it exists
The test is a bit crap at the minute (no assertion), but the build
is successful and you can see from the log that the correct main
is used

Fixes gh-1099
11 years ago
Dave Syer 8b03834d79 Add integration test for "gradle install"
See gh-1105
11 years ago
Andy Wilkinson 6c4d9d7190 Add integration tests to check Gradle plugin's war packaging behaviour
There was a problem with the Gradle plugin packaging application
dependencies in WEB-INF/lib-provided when only the servlet container
and its dependencies should be packaged there. See #1064 for details.

This commit adds two tests, one for Tomcat and one for Jetty, to
verify that only the expected entries appear in WEB-INF/lib-provided.

Closes #1071
11 years ago
Spring Buildmaster 4ca26a21dc Next development version 11 years ago
Andy Wilkinson f5f3903538 Resolve versionManagement configuration lazily and preserve exclusions
Previously, the versionManagement configuration was resolved as part of
the Boot Gradle plugin being applied. This meant that no dependencies
could be added to it and attempting to do so would result in a failure:
“You can't change a configuration which is not in unresolved state”.
This commit updates ApplyExcludeRules to wrap its processing in a
before resolve action. This defers the resolution of the
versionManagement configuration until one of the project’s other
configurations is being resolved. Fixes #1077

In addition to the above, the transitive exclusions that the Gradle
plugin provides were being lost if custom version management provided
a version for the same dependency. This commit updates
AbstractDependencies to preserve the exclusions from an existing
dependency declaration while using the version from the newer
dependency. This ensures that the exclusions remain while allowing
versions to be overridden. Fixes #1079
11 years ago