Commit Graph

398 Commits (4802640399eccc70431f50c6a121cfd863837f10)

Author SHA1 Message Date
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
Andy Wilkinson ca69156afd Merge branch '1.1.x' 10 years ago
Andy Wilkinson bbd2486c04 Run invoker plugin with a single thread to avoid build failures
Running the invoker plugin with multiple threads against an empty
Maven cache results in strange build failures where Maven claims that
it cannot find a jar or pom file for an artifact that it should be
able to find. It would appear that Maven is unable to cope with
concurrent writes to its cache.

This commit removes the usage of multiple threads that was introduced
in 4e907f1.

Fixes gh-2389
10 years ago
Andy Wilkinson 606ea4979a Add a test to cover the merging of an additional metadata file
This test covers the code path that caused gh-2361 and also checks that,
when an additional metadata file is found, it’s correctly merged with
the other metadata.

Closes gh-2361
10 years ago
Kris De Volder 65acaf885b Remove incorrect assumption that output will be in folder named classes
When running in Eclipse, by default Gradle builds its output into a
folder named bin. This commit update the annotation processor to remove
the failure assumption that the output will always be located beneath
a folder named classes.

Closes gh-2369
See gh-2361
10 years ago
Dave Syer 1be12ee945 Merge branch '1.1.x' 10 years ago
Dave Syer 4e907f19ce Carefully add nested archives from JAR in PropertiesLauncher
If user runs an executable archive then it and its lib directory will be
on the classpath. Entries from loader.path take precedence in a way that
should make sense to users (earlier wins like in CLASSPATH env var).

Also added new integration tests to verify the behaviour (big improvement
on the old ones, which probably aought to be beefed up to the same
standard).

Fixes gh-2314
10 years ago
Spring Buildmaster 60725cd8bd Next development version 10 years ago
Phillip Webb 3cd40e2488 Update getSupportedSourceVersion() logic
Use SourceVersion.latestSupported() rather than @SupportedSourceVersion
since we might build with an earlier JDK.

Fixes gh-2302
10 years ago
Phillip Webb 358ad0df37 Log stacktrace on additional metadata merge fail
See gh-2288
10 years ago
Phillip Webb 10177fb754 Update @SupportedSourceVersion to RELEASE_8
Update the @SupportedSourceVersion annotation to RELEASE_8 since it
should indicate "the latest source version an annotation processor
supports".

Fixes gh-2302
10 years ago
Phillip Webb 64b9066661 Refine additional metadata detection logic
Update the additional metadata detection logic to deal with Gradle
folder layouts.

Fixes gh-2271
10 years ago
Kris De Volder 2dfa424246 Don't fail build on merge failure
Be more lenient when processing additional metadata json files.

Fixes gh-2287
Closes gh-2288
10 years ago
Phillip Webb 7c29c96da6 Change additional metadata file lookup logic
Update ConfigurationMetadataAnnotationProcessor to find the additional
metadata json file using createResource rather than getResource. Prior
to this commit the file could be skipped when multiple files were
contained on the classpath.

Fixes gh-2271
10 years ago
Phillip Webb 1f775793ee Use Collections.addAll(...) instead of for loops
Replace various for loops which add items to collections with calls
to Collections.addAll(...).

Fixes gh-2277
10 years ago
Phillip Webb d7a12a8791 Remove superfluous semi-colons 10 years ago
Phillip Webb 22bb6f7598 Fix accidental fork logic change
Fix accidental change from commit b42c7fca.
10 years ago
Phillip Webb 45c5e25a05 Polish 10 years ago
Domingo Suarez Torres dbb795298c Restore proper use of the fork parameter
Previously, disabling forking was not possible if JVM arguments or an
agent are specified, even if the fork attribute is explicitly set to
`false`.

The  fork attribute is now detected as it should and forking is disabled
when the fork attribute is set to false, even if JVM arguments or an
agent is either specified or discovered.

Fixes gh-2220
10 years ago
Andy Wilkinson 843ee14cea Merge branch '1.1.x' 10 years ago
Andy Wilkinson 5c67e6f141 Update war layout to package custom scope dependencies in WEB-INF/lib/
Fixes gh-2187
10 years ago
Andy Wilkinson ff714f6c17 Update module layout to package custom scope dependencies in lib/
Fixes gh-2187
10 years ago
Phillip Webb f2af8b30b0 Code formatting 10 years ago
Stephane Nicoll 77427f53cc Support of Lombok annotated ConfigurationProperties
Previously, no configuration properties were discovered on a class using
lombok instead of regular getters/setters.

This commit adds a support for some of the lombok annotations,
specifically that is @Data, @Getter and @Setter. Provides the same
semantic as what lombok is generating.

Closes gh-2114
10 years ago
Phillip Webb f4fbc3e339 Fix Maven Spring Loaded detection logic
Ensure that the Maven plugin RunMojo attempts to detect the Spring
Loaded agent before deciding if the JVM should be forked.

Fixes gh-2140
10 years ago
Phillip Webb 5dd40e6999 Polish 10 years ago
Stephane Nicoll 8f6f25f88e Improve property target name
Previously, non camel case properties were wrongly resolved, i.e.
getFOO() leading to a 'f-o-o'. While unusual, underscores can also be
added to a property name. In that case, the hyphen should not be added
as the binder consider this to be a single "word". Typically setFoo_Bar
on the "something" prefix is mapped using "something.foo_bar".

All these cases are now handled properly, generating the target name that
the binder expects.

Fixes gh-2118
10 years ago
Spring Buildmaster 63e6a25097 Next development version 10 years ago
Spring Buildmaster 1a788c1741 Next development version 10 years ago
Phillip Webb 3523bca79b Polish 10 years ago
Stephane Nicoll 16164b30a9 Do not exclude Flyway's MigrationVersion
flyway.init and flyway.target are two options that are missing from the
meta-data following the change in f0bc3c0. It turns out that both these
properties have an additional setter taking a String so they shouldn't be
excluded after all

Closes gh-2088
10 years ago
Phillip Webb 4b7c6f61b4 Polish 10 years ago
Phillip Webb f0bc3c08e1 Add additional ElementExcludeFilter items
Fixes gh-2088
10 years ago
Stephane Nicoll f4fb9ddfe6 Fix wrong file name 10 years ago
Phillip Webb ba67e16258 Formatting 10 years ago
Stephane Nicoll 509201907c Polish default value for arrays
See gh-1996
10 years ago
Stephane Nicoll 7d57cb7081 Add default value for arrays
Previously, a property holding an array did not have a proper default
value in the meta-data even though the related field was initialized
properly.

An explicit support for arrays has been added. The "defaultValue" now
holds the default value for singular properties or an array of values for
array-based properties. If the value is initalized with an empty array,
the default value is an empty array as well.

Closes gh-1996
10 years ago
Stephane Nicoll 3922808de0 Add exclusion for well-known property types
Previously, any valid property was added to the meta-data of the current
group. This can be annoying for types that are not meant to be bound from
a simple string value. ClassLoader is one example.

A list of well-known types has been added: if the property type matches
an element of this list, it is ignored.

Fixes gh-2012
10 years ago
Phillip Webb 09dac5ff00 Apply formatting and cleanup rules 10 years ago
Stephane Nicoll 20bb9c0305 Remove warnings for expected deprecation usage 10 years ago
Stephane Nicoll e507c61481 polish 10 years ago
Stephane Nicoll 5b231e600b Also flag deprecated properties in a @Deprecated class
Previously, any property defined in a @Deprecated class were not marked
as deprecated as only the getter or field was inspected for the
annotation.

An additional check on the class has been added to handle this case.

Fixes gh-2014
10 years ago
Phillip Webb e56a1ba561 Refine inner class detection algorithm
Update the ConfigurationMetadataAnnotationProcessor nested class
algorithm to prevent inner classes being added as both groups and
properties.

Fixes gh-1975
10 years ago
Phillip Webb 2a9a749329 Polish 10 years ago
Phillip Webb 5220f584db Revert spring-boot-configuration-metadata for now
See gh-1970
10 years ago
Stephane Nicoll 2b19955cee Remove useless System.out.println 10 years ago
Stephane Nicoll 32efff3f30 Avoid creating a nested group for an Enum
Previously, an Enum that is defined as an inner class of a
@ConfigurationProperties pojo was wrongly detected as an nested group.

This case is now handled explicitly and covered by a test.

Fixes gh-1971
10 years ago
Stephane Nicoll 5f673c9e84 Fix usage of putIfAbsent 10 years ago
Stephane Nicoll 0f64a04780 Add easy way to consume configuration metadata
Add a companion module that IDE developers can use to read configuration
metadata from multiple sources into a single repository.

ConfigurationMetadataRepository provides access to groups and items as
well as an harmonized view on "sources" (that is the POJOs that have
contributed to a given group).

Closes gh-1970
10 years ago