Commit Graph

266 Commits

Author SHA1 Message Date
Dave Syer c6c6524b40 Support custom fat jar layouts
Allow support for custom Lyout implementations with both the Maven
and Gradle plugin. Implementations of `LayoutFactory` can now be
specified to allow customization of the layout. In addition a
layout may now implement `CustomLoaderLayout` if it wishes to
write custom loader classes.

See gh-7263
2016-11-28 16:31:53 -08:00
Phillip Webb f5b03c81f3 Rework Repacakger timeout code
Pull up common timeout code into Repackager and remove the need for
custom subclasses.

See gh-7263
2016-11-28 16:15:39 -08:00
Stephane Nicoll 6e79521fff Expose skip property consistently
This commit makes sure that the `skip` command-line property can be used
for all goals of the maven plugin.

A dedicated sample for integration tests has also been added as this
change may confuse users, especially those who wish to skip a certain
goal and not the plugin execution altogether.

Closes gh-7313
2016-11-25 11:17:58 +01:00
Johnny Lim 8038882d46 Polish
Closes gh-7403
2016-11-16 13:36:51 -08:00
Phillip Webb 97fee46682 Revert Layout changes
This reverts commits:
- 974ec92ad6.
- 537e0c12c2.
- 500a3df6e9.
2016-10-31 21:08:15 -07:00
Johnny Lim 7bb63238ab Fix typo
Closes gh-7253
2016-10-31 11:37:52 +01:00
Dave Syer 537e0c12c2 Support for custom layout types to change loader classes
A layout can
also optionally change the loader jar that is unpacked in the root
of the repackaged archive by implementing a new method in Layout.
2016-10-30 11:24:29 +00:00
Dave Syer 500a3df6e9 Add LayoutFactory in spring.factories
Instead of a fixed enum of layout types, user can provide custom
layouts via implementations of LayoutFactory in spring.factories.
2016-10-30 11:24:29 +00:00
Stephane Nicoll 6186262ecc Switch `excludeDevtools` to true by default
Switch the default value of `excludeDevtools` from `false` to `true` as
it is more sensible to exclude such dependency by default.

Closes gh-7170
2016-10-17 17:52:12 +03:00
Phillip Webb d818a09ed8 Polish 2016-10-11 23:38:14 -07:00
Stephane Nicoll 28ed59ca6e Polish contribution
Closes gh-6645
2016-10-11 15:36:35 +02:00
Plamen Totev 3cccc732df Add workingDirectory option for Maven plugin run/start
Add configuration option that specifies the working directory to use to
run/start the application via the Maven plugin.

Closes gh-6243
2016-10-11 15:36:27 +02:00
Stephane Nicoll cdd59707fc Merge branch '1.4.x' into 1.5.x 2016-09-28 17:00:30 +02:00
Johnny Lim 30a677646f Polish
Closes gh-7030
2016-09-28 16:45:19 +02:00
Stephane Nicoll 9210bf0822 Merge branch '1.4.x' into 1.5.x 2016-09-27 10:14:37 +02:00
Johnny Lim 723b46ade4 Move Restarter in integration tests
Closes gh-7025
2016-09-27 10:04:38 +02:00
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Spring Buildmaster 7e9ed5e1a7 Next Development Version 2016-09-21 07:58:07 +00:00
Johnny Lim a994b11a73 Polish 2016-09-18 23:38:21 -07:00
Johnny Lim caa4c0800f Polish
Closes gh-6872
2016-09-13 09:25:06 +02:00
Phillip Webb 65b4f61a35 Polish 2016-09-01 18:02:00 +01:00
Phillip Webb 951f051df9 Polish 2016-09-01 14:39:29 +01:00
Stephane Nicoll ff48a88b91 Enable fork more when devtools is present
This commit improves the run goal to automatically fork the process when
devtools is present and log a warning when fork has been disabled via
configuration since devtools will not work on a non-forked process.

We don't want devtools to kick in for integration tests so the logic has
been placed in `RunMojo` requiring a couple of protected methods to
override.

Closes gh-5137
2016-08-31 12:10:35 +02:00
Stephane Nicoll cf07d19ed4 Polish
See gh-6792
2016-08-31 09:27:50 +02:00
Phillip Webb 850141c405 Merge branch '1.3.x' 2016-08-29 15:30:30 +01:00
Phillip Webb 69e96c6211 Polish 2016-08-29 15:29:54 +01:00
Stephane Nicoll afadac27bd Merge branch '1.3.x' 2016-08-27 12:34:05 +02:00
Stephane Nicoll 97f15d606d Auto-detect fork value in stop goal
So far, one has to set the "fork" value to both the start and stop
goals. Since they have the same name, sharing them in a global
configuration element does the trick. However, the plugin also supports
auto-detection of the fork value according to other parameters:
typically if an agent or jvm arguments are set, forking will be
automatically enabled. This is a problem since the stop goal is not aware
of that.

This commit transmits the value in a property attached to the
`MavenProject`. That way, the stop goal can retrieve that value and
apply the same defaults. This has the side effect that specifying the
fork value isn't necessary anymore.

Closes gh-6747
2016-08-27 12:33:44 +02:00
Andy Wilkinson 742657983b Improve the error message when additional build-info prop has null value
Closes gh-6724
2016-08-23 11:30:23 +01:00
Andy Wilkinson f41e629760 Provide M2E lifecycle mapping metadata for Maven plugin’s build-info goal
Previously, configuring the build-info goal in a pom would result in 
Eclipse reporting an error for the pom as it didn’t know if/when to
execute the build-info goal.

This commit adds lifecycle mapping metadata so that the goal is executed
on incremental builds. This ensures that the contents of the generated
file are kept up-to-date, reflecting the latest build time, etc.

Closes gh-6723
2016-08-23 11:30:23 +01:00
Andy Wilkinson b3e0b3a542 Consider mvn spring-boot:run that exits with 130 (SIGINT) to be successful
Previously, if mvn spring-boot:run with a forked JVM was killed with 
CTRL+C, the run would be considered unsuccessful. This commits updates
the run mojo to consider a forked JVM that exists with 130 (the exit
code produced when exiting due to SIGINT which is what CTRL+C sends) to
be successful.

Closes gh-6498
2016-08-15 11:23:49 +01:00
Andy Wilkinson 11ccc5785c Merge branch '1.3.x' 2016-08-12 12:08:25 +01:00
Andy Wilkinson ae6182a964 Update requiresUnpack documentation of unpack location
The unpack location is (largely) an implementation detail and the
Repackage Mojo was the only place where it was explicity documented.
Rather than updating the outdated location, this commit removes it
entirely to avoid encouraging people to rely on the location.

Closes gh-6624
2016-08-12 12:07:47 +01:00
Spring Buildmaster 334baaeffd Next development version 2016-07-28 19:54:01 +00:00
Spring Buildmaster a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Andy Wilkinson 8e669e2eef Merge branch '1.3.x 2016-07-11 17:03:16 +01:00
Andy Wilkinson 4963cfd67b Reset thread's interrupted flag when catching InterruptedException
Closes gh-6360
2016-07-11 16:46:05 +01:00
Spring Buildmaster 2216369348 Next Development Version 2016-07-04 14:15:02 +00:00
Andy Wilkinson 92bb24e365 Avoid synchronizing on this and use an internal monitor instead
Where possible, code that previously synchronized on this (or on the
class in the case of static methods) has been updated to use an
internal monitor object instead. This allows the locking model that's
employed to be an implementation detail rather than part of the
class's API.

Classes that override a synchronized method continue to declare
the overriding method as synchronized. This ensures that locking
is consistent across the superclass and its subclass.

Closes gh-6262
2016-07-01 10:44:23 +01:00
Stephane Nicoll cfe1fe8736 Merge branch '1.3.x' 2016-06-23 10:44:55 +02:00
Stephane Nicoll bffcb1aad2 Document available layouts
Closes gh-5524
2016-06-23 10:42:47 +02:00
Andy Wilkinson 7a5880c900 Merge branch '1.3.x' 2016-06-16 11:36:28 +01:00
Andy Wilkinson ec7d6381aa Update RunMojo to fail when forked JVM returned non-zero exit code
Closes gh-6172
2016-06-16 11:34:15 +01:00
Andy Wilkinson ac5afb142c Merge branch '1.3.x' 2016-05-25 17:42:51 +01:00
Andy Wilkinson a98d1a41a4 Run Maven Plugin's integration tests when full profile is active
Closes gh-6036
2016-05-25 17:42:08 +01:00
Andy Wilkinson fc1814919c Add jars that should have been commited in 6ed63a6 2016-05-25 17:41:12 +01:00
Stephane Nicoll 6ed63a6eff Add support of system-scoped dependencies
In Maven land, provided and system-scope dependencies are very similar,
the latter being an special kind that allows you to specify the path to
the artifact rather than using the repository to locate it.

Prior to this commit, the repackage goal of the maven plugin was
inconsistent as it would repackage provided-scope dependencies but would
ignore the system-scoped ones.

This commit adds an extra boolean flag, `includeSystemScope` to control
this behaviour. For backward compatibility reasons, its default value is
`false`.

Closes gh-2224
2016-05-24 16:25:54 +02:00
Tommy Ludwig bae567992d Polish Maven plugin doc
Closes gh-5938
2016-05-13 09:49:57 +02:00
Spring Buildmaster 819a9574a6 Next Development Version 2016-05-10 05:28:34 +00:00
Spring Buildmaster 376bbe68d8 Next Development Version 2016-05-06 11:23:57 +00:00