Commit Graph

751 Commits (01f73d257fa903dce10fd35cf196dd0c1ba7745e)

Author SHA1 Message Date
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
Phillip Webb bdb0eb29a3 Cache JarURLConnection absoluteFile lookups
Update JarURLConnection.getNormalizedFileUrl so that expensive absolute
file lookups are cached.

See gh-6177
See gh-6109
9 years ago
Phillip Webb b03d8a5914 Skip antlib integration tests on -DskipTests 9 years ago
Stephane Nicoll cfe1fe8736 Merge branch '1.3.x' 9 years ago
Stephane Nicoll bffcb1aad2 Document available layouts
Closes gh-5524
9 years ago
Andy Wilkinson a395679b95 Fix JarURLConnectionTests on Windows
Closes gh-6109
9 years ago
Andy Wilkinson 02dbd6e4a7 Allow JarURLConnection to be created with a relative URL
Previously, JarURLConnection assumed that that URL with which it was
created would contain the absolute path of the underlying jar file.
This meant that when it was created with a relative URL, it could fail
to find an entry or throw a StringIndexOutOfBoundsException.

This commit updates the logic for normalizing the input URL so that
both absolute and relative URLs are supported.

Closes gh-6109
9 years ago
Phillip Webb 7446235ff4 Polish 9 years ago
Stephane Nicoll 5407cf5f7a Prevent several registration of the same config pojo
This commit detects case where the same set of keys are exposed several
times and prevents the compilation to complete. Previously, duplicate
keys were silently added to the meta-data.

Closes gh-5939
9 years ago
Andy Wilkinson 7a5880c900 Merge branch '1.3.x' 9 years ago
Andy Wilkinson ec7d6381aa Update RunMojo to fail when forked JVM returned non-zero exit code
Closes gh-6172
9 years ago
Andy Wilkinson af20dc6cc4 Merge branch '1.3.x' 9 years ago
Andy Wilkinson 159ef8f189 Ensure that URL returned from ExplodedArchive.getURL() is encoded
Closes gh-5971
9 years ago
Andy Wilkinson fc78a8de90 Merge branch '1.3.x' 9 years ago
Andy Wilkinson c808de0021 Allow custom repackage task to be used without a global main class
Closes gh-5956
9 years ago
Dave Syer 9e8beb7323 Merge remote-tracking branch 'origin/1.3.x' 9 years ago
Dave Syer e4b544bd39 Create PID_FOLDER if it doesn't exist
In fact the folder was already created if the app is running as
a different user, but not if running as the current user, so it
was just a question of moving one line out of an if block.

Fixes gh-5986
9 years ago
Phillip Webb e27bc9ddea Merge branch '1.3.x' 9 years ago
Phillip Webb f27bdcb737 Prevent APT crashes on older Java versions
Update TypeUtils to guard against the use of older Java versions.
Both `Collection` and `Map` type lookups now fallback to generic free
versions of the classes.

Prior to this commit using `xmlbeans-maven-plugin` in combination with
Spring Boot's annotation processor could result in
`IllegalArgumentException: Incorrect number of type arguments`.

Fixes gh-6122
9 years ago
Stephane Nicoll f9288a3af1 Revert "Polish maven repositories definition"
This commit reverts 62fa602fea

See gh-6031
9 years ago
Stephane Nicoll 62fa602fea Polish maven repositories definition
Previously, Maven repositories definition was specified in a profile that
is active by default. It means that as soon as any profile is enabled by
the user, said profile is no longer enabled. This has the nasty
consequences of having copy/paste in several places to make sure our own
profiles still have the proper repositories definition.

This commit creates a single "repositories" profile that is always active
unless a given property is explicitely specified. This allows to remove
the duplication and make things more consistent.

Some Gradle-specific repositories were also hard-coded in two modules
without any profile at all, meaning they were polluting the build of
anybody using it. While the impacted modules are gradle specific, that
repository has been shared in the new "repositories" profile as well.

Closes gh-6031
9 years ago
Phillip Webb 77f6b4c983 Formatting 9 years ago
Andy Wilkinson 436b58acbf Merge branch '1.3.x' 9 years ago
Andy Wilkinson 3772d9f937 Update JarURLConnection to only require file read permission
Previously, JarURLConnection didn't override getPermission(). This
meant that it required all permissions. This was at odds with the
Oracle JVM's concrete sun.net.www.protocol.jar.JarURLConnection which
overrides getPermission to return a FilePermission with the read
action for the path of the underlying jar.

This commit updates our JarURLConnection to align its behaviour with
sun.net.www.protocol.jar.JarURLConnection.

Closes gh-5411
9 years ago
Andy Wilkinson ac5afb142c Merge branch '1.3.x' 9 years ago
Andy Wilkinson a98d1a41a4 Run Maven Plugin's integration tests when full profile is active
Closes gh-6036
9 years ago
Andy Wilkinson fc1814919c Add jars that should have been commited in 6ed63a6 9 years ago
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
9 years ago
Andy Wilkinson 183613a5ca Merge branch '1.3.x' 9 years ago
Andy Wilkinson 4c65e5e704 Always handle quoted arguments correctly in the launch script
Previously, arguments passed to the script were handled in one way
if a service was being started using start-stop-daemon and in another
way if start-stop-daemon wasn’t available or the application is being
launched in run mode. This meant that quoted arguments were only 
handled correctly when the application was being started using
start-stop-daemon.

This commit updates the launch script so that argument handling is
the same across all three different way that the application can be
launched.

Closes gh-5942
9 years ago
Tommy Ludwig bae567992d Polish Maven plugin doc
Closes gh-5938
9 years ago
Andy Wilkinson e561cc1997 Don't use a separate thread in the launcher to call app's main method
Using a separate thread to call the application's main method is
unnecessary – the context class loader of the current thread can be
updated instead – and makes exception and exit code handling more
complicated than it needs to be.

This commit updates the Launcher so that it calls the main method
runner using the current (main) thread. As a result, any exception
that's thrown will be caught by the JVM and result in a non-zero exit
code being returned from the process.

Closes gh-5922
9 years ago
Phillip Webb 6575ca6ff8 Merge branch 1.3.x 9 years ago
Phillip Webb 7fb545d26c Polish 9 years ago
Christian Flamm 6bbd50e084 Update launch script to canonicalize jarfolder
Previously, if the folder which contained the jar was a symlink the
launch script would use the symlinked folder's name when determining
the default identity.

This commit updates the launch script so that symlinks are resolved
and the canonical name of the folder which contains the jar is used
when determining the script's default identity. The behaviour when
APP_NAME has been set is unchanged.

Closes gh-5679
Closes gh-5733
9 years ago
Spring Buildmaster 819a9574a6 Next Development Version 9 years ago
Spring Buildmaster 376bbe68d8 Next Development Version 9 years ago