Commit Graph

787 Commits (503d735fddbfa2cde5024877cebc50562aeb6a3f)

Author SHA1 Message Date
Johnny Lim 30a677646f Polish
Closes gh-7030
8 years ago
Johnny Lim 723b46ade4 Move Restarter in integration tests
Closes gh-7025
8 years ago
Andy Wilkinson e1d53b65ba Remove redundant git-commit-id-plugin configuration from loader-tools
Closes gh-7007
8 years ago
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 8 years ago
Andy Wilkinson 5afd610855 Merge branch '1.3.x 8 years ago
Andy Wilkinson 93ab01263c Change the ownership of the pid folder when using a sub-folder
This is an alternative to the fix made in 3b52909 which removed the
chown call entirely.

Prior to 3b52909, the ownership of $PID_FOLDER was always changed even
when its value was /var/run. This was problematic as it could prevent
other services from creating their pid folder or file.

When a sub-folder is used, changing its ownership so that it’s owned by
the user that will run the app is desirable as it limits access to the
folder. Rather than removing the chown call entirely, this commit
ensures that it only happens when a sub-folder is being used to hold the
pid file.

Closes gh-6532
8 years ago
Johnny Lim a994b11a73 Polish 8 years ago
Phillip Webb 825dd0a26c Merge branch '1.3.x' 8 years ago
Phillip Webb 3b52909fc2 Don't change ownership of PID_FOLDER
Update the launch script so that it no longer changes ownership of the
PID_FOLDER.

Commit b24e736cfe had changed the chown
line from:
	chown "$run_user" "$PID_FOLDER/${identity}"
to:
	chown "$run_user" "$PID_FOLDER"

This meant that it was possible for the launch script to change
ownership of `/var/run` and prevent later processes from writing to
the folder.

Since PID_FOLDER is created before the chown statement, and that
the `checkPermissions` function runs to ensure that the PID file can
be written, it appears that the chown is not even required.

Fixes gh-6532
8 years ago
Johnny Lim caa4c0800f Polish
Closes gh-6872
8 years ago
Phillip Webb 56544c8dd5 Polish 8 years ago
Phillip Webb 65b4f61a35 Polish 8 years ago
Phillip Webb 951f051df9 Polish 8 years ago
Andy Wilkinson 7841af50ef Merge branch '1.3.x' 8 years ago
Andy Wilkinson eb1c349f97 Polish “Avoid null handler package in JarFile protocol handler registration”
See gh-6759
8 years ago
hengyunabc 33a81e87d1 Avoid null handler package in JarFile protocol handler registration
Closes gh-6759
8 years ago
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
8 years ago
Stephane Nicoll cf07d19ed4 Polish
See gh-6792
8 years ago
Phillip Webb 850141c405 Merge branch '1.3.x' 8 years ago
Phillip Webb 69e96c6211 Polish 8 years ago
Stephane Nicoll afadac27bd Merge branch '1.3.x' 8 years ago
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
8 years ago
Andy Wilkinson 742657983b Improve the error message when additional build-info prop has null value
Closes gh-6724
8 years ago
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
8 years ago
Andy Wilkinson 984a6da262 Polising
Fix botched merge
8 years ago
Andy Wilkinson e2ceece525 Merge branch '1.3.x' 8 years ago
Andy Wilkinson 85c0b44dcb Test that LaunchedURLClassLoader works when thread is interrupted
Previously, RandomAccessDataFile used a semaphore and acquired it
interruptibly. This meant that an interrupted thread was unable to
access the file. Notably, this would prevent LaunchedURLClassLoader from
loading classes or resources on an interrupted thread.

The previous commit (937f857) updates RandomAccessDataFile to acquire
the semaphore uninterruptibly. This commit adds a test to
LaunchedURLClassLoader to verify that it can now load a resource from
an interrupted thread.

Closes gh-6683
8 years ago
hengyunabc 937f85765c Ensure that LaunchedURLClassLoader works when thread is interrupted
See gh-6683
8 years ago
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
8 years ago
Andy Wilkinson 11ccc5785c Merge branch '1.3.x' 8 years ago
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
8 years ago
Andy Wilkinson b47da0d265 Fix spellcheck warning introduced in 6bbd50e0
Closes gh-6628
8 years ago
Andy Wilkinson 8c106af384 Allow default value for CONF_FOLDER to be set at build time
Closes gh-6549
8 years ago
Andy Wilkinson 899b851c6f Remove META-INF/INDEX.LIST when repackaging a jar file
META-INF/INDEX.LIST files are pointless in an executable jar and
moving application classes from the root of the jar to
BOOT-INF/classes breaks the index, resulting in an
InvalidJarIndexException being thrown.

This commit updates the Repackager to automatically remove a
META-INF/INDEX.LIST file from a jar file that is being repackaged.

Closes gh-6601
8 years ago
Spring Buildmaster 334baaeffd Next development version 8 years ago
Spring Buildmaster a89ef5df6e Next Development Version 8 years ago
Andy Wilkinson 8b987e29c1 Fix spring-boot-gradle-plugin package tangle
Relocate `SpringBootPlugin` to fix a package tangle.

Fixes gh-6355
8 years ago
Andy Wilkinson 8e669e2eef Merge branch '1.3.x 8 years ago
Andy Wilkinson 4963cfd67b Reset thread's interrupted flag when catching InterruptedException
Closes gh-6360
8 years ago
Spring Buildmaster 2216369348 Next Development Version 8 years ago
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
9 years ago
Phillip Webb 266445aaf0 Polish 9 years ago
Stephane Nicoll e9fb51bdd7 Fix test 9 years ago
Stephane Nicoll 6631136f91 Merge branch '1.3.x' 9 years ago
Stephane Nicoll 17f8a244de Fix property names with successive capital letters
Previously, if a property name had successive capital letters, the
generated meta-data would clean it in such a way it is defined as a
regular word. For instance a `myFOO` property would be written as
`my-foo` in the meta-data.

It turns out this decision is wrong as the binder has no way to compute
back the name of the property and therefore `my-foo` wouldn't bind to
`setMyFOO` as it should.

This commit updates the meta-data name generation algorithm to properly
identify such cases: `myFOO` now translates to `my-f-o-o`. While the
generated name is a bit ugly, it now provides a consistent binding
experience.

Closes gh-5330
9 years ago
Phillip Webb a5cddf79a8 Reduce JarURLConnection allocations
Update JarURLConnection & Handler so that a shared static final
connection is returned for entries that cannot be found.

See gh-6215
9 years ago
Phillip Webb c22a0e90a2 Polish 9 years ago
Andy Wilkinson 0d207d438a Improve the performance of JarURLConnection
This commit improves the performance of JarURLConnection. There are two
main changes:

Firstly, the way in which the spec is determined has been changed so
that it’s no longer necessary to create an absolute file. Instead,
the JarFile’s pathFromRoot is used to extract the spec from the URL
relative to the JarFile.

Secondly, the number of temporary Objects that are created has been
reduced, for example by tracking an index as we process a String
rather than creating a new substring for each iteration.

See gh-6215
9 years ago
Andy Wilkinson 9788a7bdda Merge branch '1.3.x' 9 years ago
Andy Wilkinson 8d491f278b Create FilePermission lazily in JarURLConnection
JarURLConnection is very performance sensitive. The change in 3772d9f
meant that every JarURLConnection would create a FilePermission,
irrespective of whether it was actually used.

This commit updates JarURLConnection to create its FilePermission
lazily. When there is no security manager a permission will no longer
be created at all.

Closes gh-5411
See gh-6215
9 years ago