Commit Graph

320 Commits

Author SHA1 Message Date
Andy Wilkinson 7211571969 Fix some grammar issues in docs
Closes gh-1695
2014-10-13 13:18:24 +01:00
Eric Dahl 16937746a0 Fix some grammar issues in docs 2014-10-13 12:22:14 +01:00
Spring Buildmaster 3e71a21b30 Next development version 2014-10-10 15:19:47 -07:00
Phillip Webb 509c3aef4e Merge branch '1.1.x' 2014-10-09 19:23:57 -07:00
Phillip Webb 6028d92a4e Support Windows UNC paths with fat jars
Update `Launcher` and `JarFile` to correctly deal with Windows UNC
paths.

Fixes gh-1641
2014-10-09 19:06:28 -07:00
Andy Wilkinson f2812afb19 Merge branch '1.1.x' 2014-10-01 19:20:28 +01:00
Andy Wilkinson bcd4c8eee2 Produce a single library for multiple file dependencies on the same file
Previously, the Gradle plugin’s ProjectLibraries produced a new library
for every file dependency, even if the dependencies where on the same
file. This would lead to a repackaging failure due to multiple
libraries having the same name.

This commit updates ProjectLibraries to treat file dependencies on the
same file as a single library, thereby resolving the name clash.

Fixes gh-1646
2014-10-01 19:20:04 +01:00
Andy Wilkinson 316e5f78f9 Merge branch '1.1.x' 2014-10-01 10:12:19 +01:00
Andy Wilkinson f7d1f968b9 Improve error message when JarFile encounters a compressed nested jar
Closes gh-1643
2014-10-01 10:09:30 +01:00
Spring Buildmaster edb4b7ed7d Next development version 2014-09-25 21:02:37 -07:00
Phillip Webb 565e449d89 Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/howto.adoc
2014-09-15 11:37:50 -07:00
Phillip Webb 5ba86a103d Polish 2014-09-15 11:35:16 -07:00
Andy Wilkinson 9b719ac58e Merge branch '1.1.x' 2014-09-15 15:45:18 +01:00
Andy Wilkinson 3c815f4014 Provide group in ResolvedArtifactLibrary to enable discrimination
The fix for gh-1475 introduced the use of an artifact's group to
discriminate between two libraries with the same name (artifact id)
and version. However, in the case of Gradle, a group name was not
provided for libraries that have been resolved from a repository.

This commit updates ResolvedArtifactLibrary to use the group obtained
from the underlying ResolvedArtifact as its discriminator.

Fixes gh-1543
2014-09-15 15:40:29 +01:00
Andy Wilkinson b146e76b63 Merge branch '1.1.x' 2014-09-07 18:27:23 -05:00
Andy Wilkinson 06ffd9dd86 Fix configuration of Spring Loaded on Gradle 1.6
The applicationDefaultJvmArgs property was added in Gradle 1.7. This
commit updates RunPluginFeatures to access the property defensively
so that the plugin can be used with Gradle 1.6.

Fixes gh-1511
2014-09-07 18:23:16 -05:00
Spring Buildmaster d63e4b4329 Next development version 2014-09-04 12:15:18 -07:00
Phillip Webb 9cc893cd35 Merge branch '1.1.x'
Conflicts:
	spring-boot/src/test/java/org/springframework/boot/bind/RelaxedPropertyResolverTests.java
2014-09-04 09:41:58 -07:00
Phillip Webb eaa3bd040d Apply eclipse formatting rules 2014-09-04 09:39:58 -07:00
Phillip Webb 6f62fc854b Merge branch '1.1.x' 2014-09-03 11:45:54 -07:00
Stephane Nicoll f46fe32264 Add group discriminant in case of conflict
Prior to this commit, the repackage goal silently ignored the case of
two libraries having the same name and version but a different group.
As a result, the second library was overwriting the first one in the
repackaged jar.

This commit adds support for custom Library names and updates the
Maven and Gradle plugins so that the name includes the group ID
when there would otherwise be a duplicate.

Fixes gh-1475
2014-09-03 11:22:53 -07:00
Stephane Nicoll a98c7613bf Merge branch '1.1.x' 2014-09-02 15:55:13 +02:00
Stephane Nicoll 9a8d05bd43 Clarify addResources parameter description
This commit clarifies the role of the 'addResources' flag and makes
it explicit that any duplicate found in the target directory are
actually removed

Fixes gh-1479
2014-09-02 15:54:40 +02:00
Phillip Webb 0dc389f5b3 1.Z -> 1.2 2014-08-28 17:57:25 -07:00
Phillip Webb fdd79907e9 Polish 2014-08-26 09:43:27 -07:00
Phillip Webb 1381fe172e Polish 2014-08-26 09:40:33 -07:00
Andy Wilkinson 2b47d608f3 Merge branch '1.1.x' 2014-08-26 17:06:53 +01:00
Andy Wilkinson 28f7cf4487 Convert URL to File using a URI so that URL-encoding is removed
Fixes #1429
2014-08-26 17:04:50 +01:00
Stephane Nicoll d1f4fd0ecb Add skip parameter to repackage goal
This commit adds a 'skip' parameter to the 'repackage' goal that is
false by default. When this parameter is enabled, the repackage goal
does not run at all.

This can be used when repackaging should occur conditionally or
when a particular module in a hierarchy should not use this feature.

Fixes gh-1424
2014-08-23 10:02:08 +02:00
Andy Wilkinson 2ed24ddcd5 Merge branch '1.1.x' 2014-08-21 16:26:52 +01:00
Andy Wilkinson 9717b7d840 Preserve JVM args when auto-configuring a Java agent in Gradle bootRun
Fixes #1411
2014-08-21 16:26:36 +01:00
Andy Wilkinson 0e7757decd Merge branch '1.1.x' 2014-08-21 15:38:13 +01:00
Andy Wilkinson 69c61d0e8e Include transitive file dependencies during Gradle repackaging
Previously, ProjectLibraries only considered a configuration's
direct file dependencies. This meant that a transitive file
dependency that should have been pulled in via a project dependency
was not included in the repackaged jar's lib directory.

ProjectLibraries has been updated to walk down the tree of project
dependencies and create libraries for any file dependencies that
are found.

Fixes gh-1368
2014-08-21 15:27:08 +01:00
Dave Syer 399238384f Merge branch '1.1.x' 2014-08-19 14:16:44 +01:00
Dave Syer 8e84151f8f Normalize search path in PropertiesLauncher
* Windows: allow absolute file paths without file:/// prefix
* All: only add nested archives (not directories), so loader.path=lib/*
behaves the same as -classpath=lib/* (except for adding zip files)

Fixes gh-1352
2014-08-19 14:16:10 +01:00
Dave Syer ccfc47091c Fix URL filtering when loading from a directory
The ExplodedArchive would erroneously always attempt to filter
its contents (and thereby shield them from a classloader that wrapped
it) even if they haven't been explicitly provided.

See gh-1352
2014-08-19 14:16:10 +01:00
Phillip Webb 54625cc2a0 Make LaunchedURLClassLoader lock provider static
Fixes gh-1380
2014-08-18 20:08:03 -07:00
Spring Buildmaster 74d0c5185a Next development version 2014-08-07 11:59:17 -07:00
Phillip Webb 7641f23f71 Merge branch '1.1.x' 2014-08-06 12:26:29 -07:00
Phillip Webb 92899474ac Polish 2014-08-06 09:10:23 -07:00
Andy Wilkinson be2803a776 Merge branch '1.1.x' 2014-07-30 11:10:56 +01:00
Andy Wilkinson 6f8d4778ad Prevent a jar from being repackaged more than once
Previously, Repackager would repackage a jar file as many times as
it was asked to do so. This lead to problems if a user made a mistake
when using Maven that led to the package phase being driven twice,
for example by running "mvn clean install package".

This commit updates Repackager so that a repackage call becomes a
no-op if the source jar's manifest already contains the
Spring-Boot-Version attribute which is added by repackaging.

Fixes #1251
2014-07-30 11:07:41 +01:00
Phillip Webb 4f440fcbb9 Java 7 ClassLoader performance improvements
Use Java 7 `registerAsParallelCapable` and `getClassLoadingLock` methods
when possible. This should improve performance when running on JDK 7+
whilst still remaining JDK 6 compatible.

Closes gh-1284
2014-07-29 14:12:52 -07:00
Dave Syer fc9b160a72 Merge branch '1.1.x' 2014-07-17 09:04:44 +01:00
Dave Syer 8853c7c352 Ensure properties that are not enumerable can be resolved from placeholders
Before this change a property whose key was in a non-enumerable property source would
not resolve placeholders, leading to ${style} values in @ConfigurationProperties beans
even if the placeholders ere resolvable.
2014-07-17 09:02:04 +01:00
Stephane Nicoll 249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 2014-07-11 10:44:05 +02:00
Spring Buildmaster 40327e1ae6 Next development version 2014-07-08 02:33:36 -07:00
Phillip Webb 7455e4e86f Restore support for `files` gradle dependencies
Allow `compile files("$rootDir/vendor/foo.jar")` style declarations
with the jars repackaged from the gradle plugin.

Fixes gh-1215
2014-07-07 13:24:33 -07:00
Andy Wilkinson 1ffdc90f04 Further enhancements to Gradle repackaging logic
This commit refines the changes made under 4be688aa. 4be688aa made the
default jar task a special case which broke repackaging of the archive
produced by the default war task.

This commit refines RepackageTask’s logic so that, when it’s enabled,
it will repackage a jar task’s archive if:

- The jar task is equal to RepackageTask.withJarTask
- The name of the jar task is equal to RepackageTask.withJarTask
- RepackageTask.withJarTask is null, the jar task is not referenced
  by another RepackageTask’s withJarTask, and the jar task has an
  empty classifier

The last of these three is the default case and ensures the, when the
Spring Boot plugin is applied, default jar and war artifacts are
repackaged. The classifier check is required to prevent default source
and javadoc artifacts from being repackaged.

Fixes #1204
2014-07-03 13:33:32 +01:00
Andy Wilkinson 4be688aa78 Fix Gradle repackaging so it is only performed on the desired jars
The logic that determined whether or not the repackaging action should
be applied to a particular jar task was broken and caused problems
when a custom RepackageTask was used in a project's build.

This commit updates the logic so that repackaging will be applied:

 - To the default jar task if RepackageTask.withJarTask is null
 - To a jar task if it is equal to RepackageTask.withJarTask
 - To a jar task if its name is equal to RepackageTask.withJarTask

Repackaging is not applied if:

 - RepackageTask.enabled is false

Numerous integration tests have been added to verify the repackaging
behaviour.

Fixes #1204
2014-07-03 11:42:11 +01:00