Commit Graph

520 Commits (2dc3660a3260726d543f4f70b634c1283e11f308)

Author SHA1 Message Date
Andy Wilkinson c4f756daee Fix MavenSettings’ handling of profiles activated by a file
Previously, MavenSettings used a FileProfileActivator with no
PathTransformer. If a settings.xml file contains a file-activated
profile this would result in an NPE within Maven. This was made worse
by the NPE not being included in the resulting failure message which
hampered diagnosis of the problem.

This commit updates MavenSettings to configure its FileProfileActivator
with a PathTransformer. It also improves the failure message that’s
created from any problems that are reported by Maven while determining
the active profiles to include a problem’s exception if it has one.

Closes gh-4826
9 years ago
Andy Wilkinson 93ef795159 More use entrySet() rather than using keySet() and get(key)
This commit replaces some more occurrances of keySet() and get(key)
with more efficient usage of the map's entry set.

See gh-4813
9 years ago
Phillip Webb 7397dbaf57 Allow ExitCodeGenerator to be used on Exceptions
Update exit code support to allow the ExitCodeGenerator interface to
be placed on an Exception. Any uncaught exception implementing the
interface and returning a non `0` status will now trigger a System.exit
with the code.

Fixes gh-4803
9 years ago
Spring Buildmaster 8db59059a5 Next Development Version 9 years ago
Kirill Vlasov 786aacf2e9 Use Collections.isEmpty() instead of .size() == 0
Ensure that Collections.isEmpty() is used to check if there are no
elements in a collections. This is more explicit and can be faster than
calling .size().

Closes gh-4783
9 years ago
Phillip Webb 0489a3b4de Polish 9 years ago
Andy Wilkinson 2efc4b8332 Add tests to verify improved exception message formatting 9 years ago
mnhock bb35d18080 Improve exception messages to properly include specified sources
Closes gh-4687
9 years ago
Johnny Lim efff4a0051 Polish
Closes gh-4554
9 years ago
Johnny Lim da16d6d306 Polishing
Closes gh-4503
9 years ago
Spring Buildmaster 3f6f57a80e Next Development Version 9 years ago
Johnny Lim 1e4f8fdd8e Polish 9 years ago
Matt Benson 5e7376fb3c Interpolate property values for repositories
Update RepositoryConfigurationFactory to apply a RegexBasedInterpolator
to repository IDs and URLs.

Fixes gh-4318
Closes gh-4319
9 years ago
Phillip Webb c614446d43 Merge branch '1.2.x' 9 years ago
Phillip Webb 49a5587558 Fully support `-cp` arguments
The CLI application advertises `-cp` support but it appears that only
`--cp` is really supported. The fix for gh-178 forgot to update the
call to `getParser().parse(...)`.

See gh-178
9 years ago
Stephane Nicoll ce73dec992 Merge branch '1.2.x' 9 years ago
Stephane Nicoll 6d90188a27 Fix Maven/Gradle wrapper executable flag
Spring Initalizr now bundles a wrapper script for the build system. While
that wrapper has the necessary execute flag in the zip archive, that flag
is lost as the zip abstraction does not honor those.

The init command now makes sure to restore the execute flag on `mvnw`
and `gradlew` if necessary.

Unfortunately, this can't be tested as the Windows build would fail to
assert that the executable flag has been propertly set.

Closes gh-4392
9 years ago
Phillip Webb 9be0020f7b Fix package tangle in CLI 9 years ago
Phillip Webb 634bb770b2 Organize imports with new settings
See gh-4234
9 years ago
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 b0d287356c Revert "Increase PermGen for CLI integration tests"
This reverts commit 4c26b0c194.
9 years ago
Phillip Webb 4c26b0c194 Increase PermGen for CLI integration tests 9 years ago
Andrey Stolyarov 9a63e574b6 Add `spring war` command
Add a `war` command to the CLI to generate WAR archives.

Fixes gh-925
Closes gh-4168
9 years ago
Phillip Webb 04074fece1 Merge branch '1.2.x' 9 years ago
Phillip Webb 94736719f1 Reformat package-info.java files with Eclipse Mars 9 years ago
d10xa d5e3e991fa Fix typo
Closes gh-4120
9 years ago
Phillip Webb c525689b0f Polish 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
Stephane Nicoll 4ccbca259b Properly escape command line arguments
Closes gh-3841
9 years ago
Dave Syer 5d8ccbacdf Add a convenience AstTransformation base class for BOMs
Plugin authors can extend this class, provide missing methods,
and specify a BOM to add to the dependency management lookup
(i.e. dependencies by artifactId)
9 years ago
Dave Syer 44c1348094 Fix DependencyResolutionContext for multiple boms
The problem was that it was not accumulating DependencyManagement
instances. It was throwing away the old ones and replacing with
only the latest.
9 years ago
Andy Wilkinson 26324f68b9 Make system props available when building model for CLI dep mgmt bom
Certain Maven profile activator’s require access to System properties
to determine whether or not a profile should be activated.
JdkVersionProfileActivator is one such activator.

Prior to this commit, the presence of a Maven profile that was activated
based on the JDK in a bom imported using @DependencyManagementBom in the
CLI would trigger a failure as the JdkVersionProfileActivator could not
determine the version of Java on which it was running.

This commit updates the CLI to pass the JVM’s System properties to the
request to build a bom’s model so that those system properties can be
used by JdkVersionProfileActivator (and any other activators which need
them).
9 years ago
Dave Syer ddbbd37718 Change order of bom transformation to allow others earlier 9 years ago
Spring Buildmaster 9409c49c10 Next development version 9 years ago
Phillip Webb e674d751de Polish Javadoc 9 years ago
Phillip Webb e07df7e4c6 Remove redundant modifiers 9 years ago
Phillip Webb d09805fd75 Polish license headers 9 years ago
Phillip Webb 6e29ee4557 Polish 9 years ago
Phillip Webb 67402405db Reformat code 9 years ago
Phillip Webb 2615990ffb Organize imports 9 years ago
Phillip Webb 0335053139 Merge branch '1.2.x' 9 years ago
Phillip Webb 15686ed4fd Reformat code 9 years ago
Phillip Webb 0f6b60d8c8 Organize imports 9 years ago
Phillip Webb 690da89c82 Fix warnings 9 years ago
Phillip Webb 6193b640a4 Polish 9 years ago
Stephane Nicoll 6f3cc712bf Merge branch '1.2.x' 9 years ago