Commit Graph

45 Commits

Author SHA1 Message Date
Brian Clozel 35b7f3bf34 Unpublish Gradle metadata
See gh-23503
2019-12-02 16:43:02 +01:00
Brian Clozel d8f7ed133f Puslish Gradle metadata
Closes gh-23503
2019-11-28 10:48:13 +01:00
Sam Brannen fd95646a04 Polish contribution
See gh-23869
2019-10-25 15:26:20 +02:00
Johnny Lim 46a31bc656 Extract build cache settings to a dedicated file
Closes gh-23869
2019-10-25 15:08:11 +02:00
Andy Wilkinson 3b0b173353 Enable local build cache for buildSrc and main project 2019-09-30 15:04:14 +02:00
Brian Clozel e435f642bc Temporarily disable Gradle metadata publication
See gh-23503
2019-09-30 10:23:30 +02:00
Brian Clozel 1b6814402c Publish Gradle metadata
This commit enables the publishing of Gradle metadata with Spring
Framework artifacts. This feature will be enabled by default with Gradle
6.0, so Spring Framework will consistently push this information in the
5.2.x generation.

Fixes gh-23503
2019-09-03 16:17:06 +02:00
Brian Clozel 84f9c150de Move Gradle plugin repos declaration to settings
See gh-23282
2019-08-23 17:05:31 +02:00
Brian Clozel e45a3f4738 Rename non-Framework project modules
Prior to this commit, the Spring Framework build would mix proper
framework modules (spring-* modules published to maven central) and
internal modules such as:
* "spring-framework-bom" (which publishes the Framework BOM with all
modules)
* "spring-core-coroutines" which is an internal modules for Kotlin
compilation only

This commit renames these modules so that they don't start with
"spring-*"; we're also moving the "kotlin-coroutines" module under
"spring-core", since it's merged in the resulting JAR.

See gh-23282
2019-08-21 14:32:25 +02:00
Brian Clozel 998f6af290 Move integration tests to dedicated module
This commit moves the dependency management and test source files
related to integration tests to a dedicated module.
This allows us to focus the root project on building the Spring
Framework.

See gh-23282
2019-08-19 10:55:44 +02:00
Brian Clozel 4e5c780b99 Move TestSourcesPlugin to a Java Gradle plugin
This commit moves the existing "test sources" Gradle plugin from Groovy
to Java and updates the "buildSrc" build file to prepare for additional
plugins in the Spring Framework build.

The plugin itself looks, for a given Spring Framework module, at all the
project dependencies for the following scopes: "compile", "testCompile",
"api", "implementation" and "optional" (to be supported by a different
plugin).

See gh-23282
2019-08-13 16:23:59 +02:00
Sebastien Deleuze 88a2729fba Introduce spring-core-coroutines module
This commit introduces the spring-core-coroutines module
in order to avoid referencing Kotlin code from Java one,
which is currently not supported by Eclipse.

During the build, spring-core-coroutines is merged into
spring-core, so this change is expected to have no impact
for end users.

This module contains functions accessible from Java via
the CoroutinesUtils class to adapt Coroutines and Deferred
instances to and from Mono.

See gh-19975
2019-03-25 21:57:53 +01:00
Juergen Hoeller 04d2d1da0d Consistently use double quotes (even if no interpolation needed)
Includes upgrade to Hibernate ORM 5.3.5, EclipseLink 2.7.3, Selenium HtmlUnit Driver 2.32.1, Jetty 9.4.12 RC2.
2018-08-16 15:32:44 +02:00
sdeleuze f1727bfbdb Cleanup settings.gradle pluginManagement configuration 2018-04-04 11:08:13 +02:00
sdeleuze ac00d8a215 Use JCenter first to resolve plugins
This is a workaround for Kotlin/dokka#146.
2017-12-11 12:07:17 +01:00
Juergen Hoeller 9190b76ab9 Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2) 2017-09-23 11:28:19 +02:00
Brian Clozel 41cbc4670f Refactor the spring-beans build
This commit merges back the "spring-beans-groovy" module into the main
"spring-beans" one. The build is configured so:

* Java and Groovy sources are jointly compiled
* Kotlin sources are compiled after

With this change, the `MergePlugin` is not used anymore in the project
build and therefore is removed.
The `DetectSplitPackagesPlugin` wasn't applied so it's been removed as
well.

Issue: SPR-15885
2017-08-21 14:41:46 +02:00
Brian Clozel 2e50ea7eb4 Move plugin declarations to plugin syntax
Note: this syntax automatically applies the plugin to the root project.
Adding `apply false` in the plugin declaration disables that.

Issue: SPR-15885
2017-08-21 14:41:28 +02:00
Brian Clozel 11418d8d28 Allow dedicated build files for subprojects
With this change, each subproject can configure its
build in a dedicated file like:

```
spring-core/spring-core.gradle
spring-web/spring-web.gradle
```

Issue: SPR-15885
2017-08-21 14:40:35 +02:00
Juergen Hoeller 4d86515fa5 Overridable Commons Logging bridge in separate spring-jcl jar
Issue: SPR-14512
2017-05-03 20:29:05 +02:00
Rossen Stoyanchev fafd2d20e1 Rename spring-web-reactive to spring-webflux
Issue: SPR-15190
2017-02-01 17:02:52 -05:00
Stephane Nicoll dcade06fa0 Support for candidate components index
This commit adds a "spring-context-indexer" module that can be added to
any project in order to generate an index of candidate components defined
in the project.

`CandidateComponentsIndexer` is a standard annotation processor that
looks for source files with target annotations (typically `@Component`)
and references them in a `META-INF/spring.components` generated file.

Each entry in the index is the fully qualified name of a candidate
component and the comma-separated list of stereotypes that apply to that
candidate. A typical example of a stereotype is `@Component`. If a
project has a `com.example.FooService` annotated with `@Component` the
following `META-INF/spring.components` file is generated at compile time:

```
com.example.FooService=org.springframework.stereotype.Component
```

A new `@Indexed` annotation can be added on any annotation to instructs
the scanner to include a source file that contains that annotation. For
instance, `@Component` is meta-annotated with `@Indexed` now and adding
`@Indexed` to more annotation types will transparently improve the index
with additional information. This also works for interaces or parent
classes: adding `@Indexed` on a `Repository` base interface means that
the indexed can be queried for its implementation by using the fully
qualified name of the `Repository` interface.

The indexer also adds any class or interface that has a type-level
annotation from the `javax` package. This includes obviously JPA
(`@Entity` and related) but also CDI (`@Named`, `@ManagedBean`) and
servlet annotations (i.e. `@WebFilter`). These are meant to handle
cases where a component needs to identify candidates and use classpath
scanning currently.

If a `package-info.java` file exists, the package is registered using
a "package-info" stereotype.

Such files can later be reused by the `ApplicationContext` to avoid
using component scan. A global `CandidateComponentsIndex` can be easily
loaded from the current classpath using `CandidateComponentsIndexLoader`.

The core framework uses such infrastructure in two areas: to retrieve
the candidate `@Component`s and to build a default `PersistenceUnitInfo`.
Rather than scanning the classpath and using ASM to identify candidates,
the index is used if present.

As long as the include filters refer to an annotation that is directly
annotated with `@Indexed` or an assignable type that is directly
annotated with `@Indexed`, the index can be used since a dedicated entry
wil be present for that type. If any other unsupported include filter is
specified, we fallback on classpath scanning.

In case the index is incomplete or cannot be used, The
`spring.index.ignore` system property can be set to `true` or,
alternatively, in a "spring.properties" at the root of the classpath.

Issue: SPR-11890
2016-09-01 15:30:47 +02:00
Rossen Stoyanchev cb798726bd Update build for spring-web-reactive module 2016-07-14 12:18:39 -04:00
Juergen Hoeller f38a4b9040 Build update for pruned modules 2016-07-04 23:38:25 +02:00
Juergen Hoeller 57b3ee324f Tiles 2 support back for Spring 4.3 (to be eventually removed for 5.0 now)
Issue: SPR-13229
2015-12-21 22:15:22 +01:00
Juergen Hoeller b75f5faf88 Remove Tiles 2 support
Issue: SPR-13229
2015-12-17 17:18:21 +01:00
Juergen Hoeller f9c3910341 Support for Hibernate ORM 5.0 Beta 2
Issue: SPR-11694
2015-05-09 17:55:18 +02:00
Sebastien Deleuze a26b1ef8d9 Make Tiles 3 the default implementation in spring-webmvc
Move spring-webmvc-tiles3 content to spring-webmvc, and
create a spring-webmvc-tiles2 module with Tiles 2 support.

Its allows View Resolution to configure Tiles 3 instead of Tiles 2.

Issue: SPR-7093
2014-07-12 17:23:47 -04:00
Phillip Webb 92e144a8a8 Add a 'bill of materials' project for Maven users
Add 'spring-framework-bom' meta-project that contains the other projects
in a dependencyManagement section.

Issue: SPR-11138
2013-12-02 11:55:22 -08:00
Rossen Stoyanchev 2e57cf8bfc Fold spring-test-mvc sources into spring-test
With spring-test compiling against Servlet 3.0 it is no longer required
to compile Spring MVC Test sources separately (from spring-test).
2013-11-05 11:44:13 -05:00
Juergen Hoeller 8d6406bbae Groovy-based bean definitions
Formerly known as the Grails BeanBuilder, now in Spring proper. Based on https://github.com/spring-projects/spring-framework/pull/355 but heavily refactored and restructured.

Issue: SPR-7123
2013-10-17 19:24:08 +02:00
Rossen Stoyanchev d3cecfc6cc Create spring-messaging module
Consolidates new, messaging-related classes from spring-context and
spring-websocket into one module.
2013-07-12 13:44:41 -04:00
Rossen Stoyanchev 4e67f809fb Add spring-websocket module 2013-04-15 11:03:23 -04:00
Juergen Hoeller 28aa34f7ff Removed build reference to spring-struts module 2013-03-19 23:16:22 +01:00
Phillip Webb 65fb26f847 Move spring-build-junit into spring-core
Move code from spring-build-junit into spring-core/src/test along with
several other test utility classes. This commit removes the temporary
spring-build-junit project introduced in commit
b083bbdec7.
2013-01-01 19:49:45 -08:00
Phillip Webb 57d68b070e Expose Gradle buildSrc for IDE support
Create 'spring-build-src' Gradle module that exposes the buildSrc
folder as an IDE project.
2013-01-01 14:53:42 -08:00
Phillip Webb b083bbdec7 Introduce 'spring-build-junit' subproject
Introduce new 'spring-build-junit' subproject containing shared
JUnit utilities and classes to be used by other test cases. This
project is for internal use within the framework, and therefore
creates no artifacts to be published to any repository.

The initial code includes support for JUnit Assumptions that can
be used to determine when a test should run. Tests can be skipped
based on the running JDK version, logging level or based on specific
'groups' that have activated via a Gradle property.

It is intended that sources within the spring-build-junit project be
folded into spring-core/src/test/java, pending some Gradle work that
will facilitate sharing test output across subprojects; therefore this
commit should be seen as a temporary solution.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Phillip Webb 90cfdbb040 Polish quote styles in gradle files
Replace singe quote-marks with double quote-marks when possible for a
more consistent style.
2012-12-09 21:32:27 -08:00
Rob Winch d7bf56df49 Remove reflection usage in orm.hibernate4.*
Previously reflection was required when interacting with Hibernate 4 in
order to support both Hibernate 3 and Hibernate 4 since there were
non-passive changes in the APIs. Now that the Spring build uses Gradle
it is trivial to support multiple Hibernate versions.

This commit removes the reflection usage in orm.hibernate4.* by
creating a spring-orm-hibernate4 module that uses
gradle/merge-artifacts.gradle to build a single artifact but keep
distinct classpaths.

Issue: SPR-10039
2012-11-26 22:47:10 +01:00
Rossen Stoyanchev 2a11007a04 Add Spring Framework integration with Tiles 3
Tiles 3 has modified packages and classes as well as additional
dependencies, notably "tiles-request-api", which is a request/response
abstraction independent of Servlet and JSP APIs.

In order to have both Tiles 2 and Tiles 3 integrations, the source for
the Tiles 3 integration is in a separate project spring-webmvc-tiles3.
The build process merges the compiled Tiles 3 integration classes into
the spring-webmvc module so in effect it contains both the Tiles 2 and
the Tiles 3 integrations.

This change originated as a pull request at spring-framework-issues:
https://github.com/SpringSource/spring-framework-issues/pull/30

And was additionally updated:
1f64be4aa5

Issue: SPR-8825
2012-11-20 12:24:08 -05:00
Rob Winch 22bcb54ab6 Add Spring MVC Test framework
This commit adds the spring-test-mvc project [1] to the Spring
Framework as part of the spring-test module.

The sources are added as a root-level project called "spring-test-mvc"
instead of under "spring-test" because the new sources need to be
compiled with Servlet 3 while the current "spring-test" sources require
Servlet 2.5 and the Eclipse IDE does not support having different
classpaths for the same project.

The Gradle build produces a single spring-test jar that contains
sources from both "spring-test" and "spring-test-mvc". This merge is
made possible through merge-dist.gradle as follows:

- jar tasks of the "from" project execute tasks of the "to" project
- "to" project is added to the classpath of the "from" project
- "to" project pom is updated with entries from the "from" project

For further details see documentation in merge-dist.gradle.

Special thanks to everyone who contributed to the initial development
of the Spring MVC Test framework:

 Arjen Poutsma <poutsma@mac.com>
 Craig Walls <cwalls@vmware.com>
 Frans Flippo <fransflippo@utopia.orange11.nl>
 Harry Lascelles <harry@firstbanco.com>
 Irfan <mail.urfi@gmail.com>
 Jörg Rathlev <joerg.rathlev@s24.com>
 Keesun Baik <whiteship2000@gmail.com>
 Keesun Baik <whiteship@epril.com>
 Matthew Reid <matthew.reid@nakedwines.com>
 Nils-Helge Garli Hegvik <Nils-Helge.Hegvik@telenor.com>
 Rob Winch <rwinch@vmware.com>
 Scott Frederick <sfrederick@vmware.com>
 Sven Filatov <sven.filatov@gmail.com>
 Thomas Bruyelle <thomas.bruyelle@gmail.com>
 youngm <youngm@gmail.com>

[1]: https://github.com/SpringSource/spring-test-mvc

Issue: SPR-9859, SPR-7951
2012-10-05 12:02:25 -04:00
Chris Beams c16f18a5fd Remove spring-asm and inline ASM 4 into spring-core
ASM 4.0 is generally compatibile with Java 7 classfiles, particularly
including 'invokedynamic' instructions. This is important when
considering that Spring's component-scanning support is internally
ASM-based and it is increasingly likely that component classes having
invokedynamic instructions may be encountered and read by ASM.
This upgrade, then, is primarily preventive in nature.

Changes include:

 - upgrade from ASM 2.2.3 to ASM 4.0

 - adapt to ASM API changes as necessary throughout spring-core,
   resulting in no impact to the public Spring API.

 - remove dedicated spring-asm module

 - use new :spring-core:asmRepackJar task to repackage
   org.objectweb.asm => org.springframework.asm as per usual and write
   repackaged classes directly into spring-core jar

The choice to eliminate the spring-asm module altogether and instead
inline the repackaged classes directly into spring-core is first to
eliminate an otherwise unnecessary second jar. spring-core has a
non-optional dependency on spring-asm meaning it is always on the
application classpath. This change simplifies that situation by
consoliding two jars into one. The second reason for this choice is in
anticipation of upgrading CGLIB to version 3 and inlining it into
spring-core as well. See subsequent commit for details.

Issue: SPR-9669
2012-08-10 00:36:49 +02:00
Chris Beams 02a4473c62 Rename modules {org.springframework.*=>spring-*}
This renaming more intuitively expresses the relationship between
subprojects and the JAR artifacts they produce.

Tracking history across these renames is possible, but it requires
use of the --follow flag to `git log`, for example

    $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history up until the renaming event, where

    $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history for all changes to the file, before and after the
renaming.

See http://chrisbeams.com/git-diff-across-renamed-directories
2012-01-31 14:37:10 +01:00
Chris Beams 0a07a0ed92 Move integration tests => src/test
This commit eliminates the 'integration-tests' subproject in favor of
managing these sources under the root project's own 'src' directory.

This helps to avoid special-case handling for integration-tests in the
Gradle build, e.g. avoiding publication of jars to Artifactory /
Maven Central.

It is also semantically more correct. This is not a Spring Framework
subproject so much as it is a collection of integration tests that
span functionality across many subprojects. In this way, it makes
sense to place them directly under the root project.

Issue: SPR-8116
2012-01-31 14:32:14 +01:00
Chris Beams f79c514920 Introduce Gradle-based build
- Use recent Gradle 1.0-milestone-8 snapshot
 - Add initial cut of build.gradle able to compile/test all modules
 - Update .gitignore
 - Generate Gradle wrapper scripts
 - Remove all Eclipse metadata files
 - Temporarily @Ignore tests that do not pass under Gradle
2012-01-31 14:31:04 +01:00