Commit Graph

63 Commits

Author SHA1 Message Date
Chris Beams b8f408ed5f Replace space indentation with tabs
Issue: SPR-9990
2013-01-11 15:44:00 +01:00
Glyn Normington 2df08bdfbd Rework split package detection code
Allow packages to be split across projects which will be merged into a
single JAR file.

Make split package detection a dependency of the 'check' task. This
is idiomatic gradle as well as allowing the 'test' task (another
dependency of 'check') to be executed without split packages being
detected.

Omit the project spring-instructment-tomcat from the check on the basis
of SPR-10150.

Issues: SPR-9990, SPR-10150

Conflicts:

	build.gradle
2013-01-07 13:49:44 +00:00
Rob Winch a27a3be76c Example SplitPackageDetectorPlugin 2013-01-07 13:48:17 +00:00
Glyn Normington 00a86c3722 Detect split packages at build time
Split packages are a well-known anti-pattern for OSGi and a blocker for
Eclipse Virgo (which prevents split packages being accessed via its
Import-Library construct).

Split packages are also unhelpful with a traditional linear classpath
as a split package name does not uniquely identify the Spring framework
JAR from which it came, thus complicating problem diagnosis and
maintenance.

Juergen Hoeller supports this position in the following comment in
SPR-9990:

>FWIW, I generally find split packages a bad practice, even without
>OSGi in the mix. For the Spring Framework codebase, I consider a
>split-package arrangement a design accident that we want to detect
>in any case - and that we're willing to fix if it happened.
>
>I'm actually equally concerned about the source perspective: After
>all, we want a package to be comprehensible from a single glance
>at the project, not requiring the developer to jump into several
>source modules to understand the overall layout of a package.

Split packages have crept into Spring framework twice in recent months
- see SPR-9811 and SPR-9988. Currently, they are only detected once
the Spring framework has been converted to OSGi bundles and these
bundles have been tested with Eclipse Virgo.

This commit adds a build-time check for split packages to the Spring
framework build.

Issue: SPR-9990

Conflicts:

	build.gradle
2013-01-07 13:47:44 +00:00
Chris Beams bd1db73a17 Merge branch 'share-test-classes' into cleanup-3.2.x
* share-test-classes:
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
2013-01-04 09:55:19 +01:00
Phillip Webb d52f883453 Add test dependencies sources for testCompile
Update the TestSourceSetDependenciesPlugin to consider testCompile
configurations.
2013-01-04 09:39:27 +01:00
Chris Beams a6eaf871f1 Fix Eclipse compilation error in Gradle plugin
Prior to this commit, the following compilation error presented itself
when importing buildSrc ('spring-build-src') into Eclipse:

    Groovy:missing type for constructor call @ line 36, column 49.

This commit replaces the use of the diamond operator with typical
generics syntax in order to work around the problem. It is assumed that
the underlying problem is to do with the Groovy compiler in use. This
change ensures that any contributor / committer importing
spring-framework into Eclipse has a straightforward experience without
being required to tweak Groovy settings.

If selection of the correct Groovy compilation settings can be made
automatic, then we should of course feel free to use Java 7-style syntax
there in the future.

Note that this was *not* a problem when importing buildSrc into IDEA 12.
2013-01-03 19:19:24 +01:00
Phillip Webb 0b2c305072 Recursively add test dependencies
Update TestSourceSetDependenciesPlugin to recursively search project
dependencies when adding test source sets.
2013-01-02 11:51:10 -08:00
Phillip Webb db2b00a2a5 Relocate MergePlugin package
Relocate the MergePlugin from org.springframework.build.gradle.merge
to org.springframework.build.gradle.
2013-01-01 17:38:06 -08:00
Phillip Webb 290aa5d647 Develop a gradle plugin to add test dependencies
Develop a gradle plugin to automatically update testCompile dependencies
to include the test source sets of project dependencies.

Allows the gradle build to more closely mirror the way that tests run
inside eclipse.
2013-01-01 17:30:28 -08:00
Rob Winch 455701d2ee Merge plugin copies exclude rules
Previously the 'merge from' project's configurations exclude rules were
not used in the dynamically created 'merge into' project configurations.
This meant that the pom generation for 'merge into' project did not
exclude the dependencies from the 'merge from' project's configuration
excludes.

Now the exclude rules are copied into the dynamically created
'merge into' project's configurations.
2012-12-10 13:29:10 -08:00
Phillip Webb 42bbcc3220 Move Merge plugin into a build package structure 2012-12-10 00:32:00 -08:00
Phillip Webb b206e6891f Renamed buildsrc to buildSrc
Rename buildsrc folder to buildSrc to follow Gradle conventions.
2012-12-09 23:13:23 -08:00