Commit Graph

456 Commits

Author SHA1 Message Date
Phillip Webb
1a475102de Polish 2014-05-22 20:33:08 +01:00
Phillip Webb
794808b6b8 Various improvements to the Gradle plugin
Refactor and rework several areas of the Gradle plugin:

- Refactor package structure into functional areas and configure each
  area separately via a new PluginFeatures interface.
- Convert BootRunTask to extend RunTask rather than attempting to
  find existing RunTasks.
- Simplify agent integration by no longer needing specific BootRunTask
  code.
- Update the repackage task to consider the `mainClassName` property
  in addition to `springBoot.mainClass`.
- Automatically set `mainClassName` when calling `run` or `runBoot`
  from `springBoot.mainClass` if there is one.
- Ensure that explicitly defined `main` options on JavaExec tasks always
  take precedence.

Fixes gh-547, gh-820, gh-886, gh-912
2014-05-22 18:08:22 +01:00
Andy Wilkinson
ee08667e81 Exclude Java agent jars from class path of launching class loader
ExecutableArchiveLauncher creates a ClassLoader that is used by the
Launcher to load an application’s classes. During the creation of this
ClassLoader URLs from another ClassLoader are copied over. This was
resulting in Java agents that are added to the system class loader
via the -javaagent launch option being available on both the system
class loader and the created class loader. Java agents are intended to
always be loaded by the system class loader. Making them available on
another class loader breaks this model.

This commit updates ExecutableArchiveLauncher so that it skips the URLs
of any Java agents (found by examining the JVM’s input arguments) when
copying URLs over to the new classloader, thereby ensuring that Java
agents are only ever loaded by the system class loader.

Fixes #863
2014-05-21 13:37:05 +01:00
Phillip Webb
4fd4744724 Add spring-boot-versions project
Add a new maven project containing a versions.properties file and
an effective POM. Rework existing projects to use the versions
artifacts.

Partially reverts 307fbba9e4

Fixes gh-913
2014-05-20 23:55:31 +01:00
Phillip Webb
8bcda1bcbe Polish 2014-05-20 18:26:56 +01:00
Andy Wilkinson
307fbba9e4 Use spring-boot-dependencies as spring-boot-dependency-tools' parent
Previously spring-boot-dependency-tools used spring-boot-tools as its
parent. This meant that it inherited spring-boot-parents' dependency
management that we did not want to expose to applications. The
solution to this was to generate the effective pom and then filter
out any thing that did not appear in spring-boot-dependencies' pom.
This filtering had to unwanted side-effect of breaking bom imports:
the effective pom would contain the dependency management from the
imported bom, but this would be filtered out as the entries didn't
appear in spring-boot-dependencies' pom.

This commit updates spring-boot-dependency-tools to use
spring-boot-dependencies as its parent. This means that its effective
pom contains the desired dependency management and nothing more,
allowing the filtering logic to be removed.

The use of Spring Security's bom has been reinstated as it will now
work as intended and versions for its modules will be available in the
CLI and via the Gradle plugin.

Closes #825
Fixes #838
2014-05-20 14:33:19 +01:00
Mark Ingram
dd83b58b05 Exact match for groupId excludes
Previous to this commit, any groupId starting with one of the
configured exclude would be excluded as well. This potentially
leads to unintentional dependency filtering: for example the
GroupIdFilter with an exclusion of "org.springframework"
also removes "org.springframework.boot" dependencies.

Add MatchingGroupIdFilter that uses an exact match instead.

See #649
2014-05-19 15:39:12 +02:00
Phillip Webb
2cadf4165f Merge branch '1.0.x'
Conflicts:
	spring-boot-dependencies/pom.xml
	spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java
2014-05-16 14:53:32 +01:00
Phillip Webb
6a644e2e23 Protect against malformed URLs on Windows
Update JarFile to correctly create system independent URLs to prevent
potential URISyntaxExceptions when running on Windows.

Fixes gh-836
2014-05-16 14:51:06 +01:00
Dave Syer
845a86d548 Monkey with JarUrlConnection to make it work when LANG unset
The problem all along has been in AsciiBytes, so the fix in
commit ce3aaf was just a stop gap for a system where multi-byte
characters are supported but the default encoding is not UTF-8 (e.g.
most Windows systems). The real solution is not to leave it to
chance and always pick an encoding for the JarEntry names (i.e.
in AsciiBytes).

(Cherry picked from commit 06e364a9ff)

Fixes gh-764
2014-05-16 14:50:11 +01:00
Phillip Webb
7b170368e5 Require single main class
Update run tasks to ensure that only a single main class is required
when performing a class search.

See gh-886
2014-05-16 10:45:17 +01:00
Phillip Webb
01fcf61140 Polish 2014-05-15 09:51:16 +01:00
Stephane Nicoll
158b6a5c07 Skip the execution of repackage in parent projects
If an execution of the repackage goal is present in a project with
'pom' packaging, it is now skipped. This allows to configure the
plugin in the parent.

Fixes gh-867
2014-05-15 10:36:41 +02:00
Shawn Clark
4021ad43f7 Fix wrong closing tag
Fixes gh-874
2014-05-15 10:02:01 +02:00
Stephane Nicoll
dacad22fd3 Fix jvmArgs usage example
The  configuration within an execution is only applied when that
particular execution is invoked as part of the build. It is not
applied when the plugin is invoked on the command line (i.e.
mvn spring-boot:run).

This commit clarifies the situation so that users can safely copy/paste
those bits and get the expected behavior.

 Fixes gh-875
2014-05-15 09:59:46 +02:00
Stephane Nicoll
a93784207e Add jvmArguments property to maven plugin
The maven plugin now forks a new process when it starts a boot app. This
makes remote debugging of the app impossible without the ability to pass
extra JVM arguments.

This commit adds a "jvmArguments" attribute to the RunMojo that defines
additional JVM arguments to set on the forked process.

Fixes gh-848
2014-05-14 13:26:11 +02:00
Phillip Webb
506c0f50b9 Allow meta-data driven version overrides in Gradle
Add a `versionManagement` gradle configuration which can be used to
provide alternative version meta-data. Primarily added so that the
Spring IO platform can provide version overrides without causing a
cyclic build dependency.

Fixes gh-750
2014-05-08 14:37:42 +01:00
Dave Syer
894482df1a Initialize logback is it is present in CLI
This (empirically) fixes gh-726 using a new utility
(LogbackInitializer) in the loader tools. If anyone has enough
Gradle fu to understand where to put it (after the classpath is established
but before compilation) we could do the same thing in the Gradle plugin
(and that would fix gh-724).
2014-05-07 07:21:48 -07:00
Phillip Webb
32d2fc25c7 Polish 2014-05-07 11:01:02 +01:00
Stephane Nicoll
15501eaafb Exclude support in the maven plugin
This commit provides several options to exclude one or more
dependencies:

* excludes allows to specify an arbitrary number of exclude sub
  element defining the groupId and artifactId of the dependency
  to exclude
* excludedGroupIds defines the comma separated list of groupIds
  to exclude
* excludeArtifactIds defines the comma separated list of artifactIds
  to exclude

While any artifact can be excluded, this is designed to exclude
provided-scoped dependencies that should not be bundled in the
executable jar/war.

The outcome of java -jar myapp.jar should be consistent with the run
goal: these exclusions are therefore applied to the classpath that
the run goal computes to launch the application.

This commit also adds some integration tests and updates the
plugin's documentation

Fixes gh-649, gh-650 and gh-674
2014-05-06 15:15:28 +02:00
Stephane Nicoll
a0166076e0 Fix wrong import 2014-05-06 14:56:24 +02:00
Stephane Nicoll
33082fd56d Harmonized maven dependency management
This commit harmonizes the dependency management of internal modules
so that versions can be omitted everywhere. Update the maven coordinates
to provide the full groupId for consistency
2014-05-05 14:29:01 +01:00
Phillip Webb
34b7bb20fd Add maven implicit plugin group ID
Add previously implicit <groupId>org.apache.maven.plugins</groupId>
to plugin declarations.
2014-05-02 23:03:31 +01:00
Phillip Webb
7f41dbd677 Resore code formatting 2014-05-02 22:53:25 +01:00
Stephane Nicoll
bf4b347a96 Fix build failure
Commit e26e06d5dd broke the full build as the generated zip file for
the size is not generated. Actually, the site plugin has a jar goal that
is exactly meant for what we need to do.

This commit removes the use of the assembly plugin and invokes the
jar goal of the site plugin when the full profile is enabled.

Relates to #749
2014-05-02 22:21:43 +02:00
Dave Syer
1b7d8d9ade Add SignalUtils to handle OS interrupts
Extract into a utility to be shared between Shell and RunMojo

Fixes gh-773
2014-05-02 20:17:22 +01:00
Stephane Nicoll
888703cf26 Add maven plugin documentation
This commit adds the generated site for the maven plugin alongside
the developer guide and javadoc. The maven plugin is available in
the "/maven-plugin" context.

The advanced information described in the developer guide have
been migrated to the plugin site as most the information is taken
from the code itself, which avoids duplication.

Fixes #749
2014-05-02 17:12:56 +01:00
Dave Syer
06e364a9ff Monkey with JarUrlConnection to make it work when LANG unset
The problem all along has been in AsciiBytes, so the fix in
commit ce3aaf was just a stop gap for a system where multi-byte
characters are supported but the default encoding is not UTF-8 (e.g.
most Windows systems). The real solution is not to leave it to
chance and always pick an encoding for the JarEntry names (i.e.
in AsciiBytes).

Fixes gh-764
2014-05-02 15:03:16 +01:00
Dave Syer
8b251e546a Monkey with process forking for Windoze
There were several problems to fix. 1) a bug in the
JDK (1.7 up to 7_60):

https://bugs.openjdk.java.net/browse/JDK-8023130

which we can work around by detecting buggy VMs and not trying
to use inheritIO. 2) File<->URL conversion is platform dependent
and we shouldn't make any assumptions. The problem in this case
was that file URLs contain a ":" so they can 't be added to a
path in UNIX, but on Windows you need the absolute path with the
colon. Solution: use Files on the classpath for spring-boot:run.

Hopefully also fixes gh-767
2014-05-02 12:55:13 +01:00
Dave Syer
329010d29e Normalize paths in JvmUtils
Fixes problem in Windoze where file paths cannot be so easily
converted to URLs.

Fixes gh-767
2014-05-02 11:45:45 +01:00
Dave Syer
b04304b691 Add @since 2014-05-02 11:22:19 +01:00
Dave Syer
438cff252d Allow multiple agents to be attached 2014-05-01 09:48:05 +01:00
Dave Syer
b884a73396 Share RunProcess with CLI 2014-05-01 09:48:05 +01:00
Dave Syer
240788862e Make RunMojo fork a new process
By forking a new process we get to attach the agent
much earlier and JPA can co-exist.

Fixes gh-648
2014-05-01 09:48:05 +01:00
Phillip Webb
f53ee406c1 Merge branch '1.0.x' 2014-04-30 22:06:24 +01:00
Artem Bilan
471e6af2af Make loader Windows compatible
The encoding of UTF-8 (et al.) chars in the
JarUrlConnection has to be made explicit, otherwise
Wdinows apparently does not pick the default(?).

Fixes gh-711, Fixes gh-753
2014-04-30 22:05:47 +01:00
Phillip Webb
6025f45aa0 Polish 2014-04-30 21:53:24 +01:00
Dave Syer
689eb3e148 Add URLs from parent classloader in executable jar
$ (cd spring-boot-tools; mvn clean install -DskipTests=true)
$ (cd spring-boot-samples/spring-boot-sample-simple/; mvn clean package)
$ java -jar spring-boot-samples/spring-boot-sample-simple/target/spring-boot-sample-simple-1.1.0.BUILD-SNAPSHOT.jar

(vanilla executable jar archive: works)

$ java -cp spring-boot-samples/spring-boot-sample-simple/target/spring-boot-sample-simple-1.1.0.BUILD-SNAPSHOT.jar:spring-boot-tools/spring-boot-loader/src/test/resources/jars/app.jar org.springframework.boot.loader.JarLauncher

(jar archive plus vanilla plugin: works)

$ (cd spring-boot-samples/spring-boot-sample-simple/target; rm -rf app && mkdir $_ && cd $_ && jar -xf ../*.jar)
$ java -cp spring-boot-samples/spring-boot-sample-simple/target/app/ org.springframework.boot.loader.JarLauncher

(exploded directory: works)

$ java -cp spring-boot-tools/spring-boot-loader/s:spring-boot-tools/spring-boot-loader/src/test/resources/jars/app.jar org.springframework.boot.loader.JarLauncher

(exploded directory with plugin jar: works)

Potential fix for gh-529
2014-04-30 15:28:04 +01:00
Artem Bilan
da5eae3ca5 Make loader Windows compatible
The encoding of UTF-8 (et al.) chars in the
JarUrlConnection has to be made explicit, otherwise
Wdinows apparently does not pick the default(?).

Fixes gh-711, Fixes gh-753
2014-04-30 13:08:12 +01:00
sopov.ivan
174b654faf minor test fixes
Reverting arguments in assertEquals where constant was placed on
the "actual" place. Replacing assertEquals with assertFalse, assertTrue
and assertNull where applicable.

Fixes gh-735
2014-04-26 14:14:05 +01:00
sopov.ivan
10d82e28ff minor - correcting modifiers order 2014-04-25 18:20:09 +04:00
Phillip Webb
64a835e91a Move master to 1.1.0.BUILD-SNAPSHOT 2014-04-24 12:45:20 +01:00
Spring Buildmaster
d3954a1703 Next development version 2014-04-24 02:24:28 -07:00
Phillip Webb
fad5ce45db Polish 2014-04-23 12:35:33 +01:00
Dave Syer
34604a9602 Add assertion about non-special resource 2014-04-22 09:25:45 +01:00
Dave Syer
2d16c59147 Clarify usage of run.arguments with Maven plugin 2014-04-17 04:42:31 -07:00
Andy Wilkinson
283f1b169f Ensure that local file dependencies are packaged by the Gradle plugin
Prior to this commit, a dependency on a local file was not being
packaged by the Gradle plugin. This was a regression from the behaviour
in 0.5.0.M6 caused by the move to using a ResolvedConfiguration and
ResolvedArtifacts (4f677bec) to gain access to an artifact's type so
that non-jar artefacts could be filtered out. Since then, the approach
to filtering has been changed (38585bf3) and access to an artifact's
type is no longer needed.

This commit updates ProjectLibraries to restore its use of a
FileCollection rather than a ResolvedConfiguration when getting hold of
the files in a configuration. This means that the resulting jar will
now include dependencies that aren't resolved, such as those that are
provided as local files. The filtering that is applied to the files
is unaffected by this change and only files that are zip files will be
included.

Fixes #672
2014-04-15 15:44:54 +01:00
Dave Syer
620d8eb87e Re-order if blocks in RunMojo
Avoids loading a class if not needed, but doesn't seem to solve
any actual problems. I'll leave it in in case it helps later.

Testing gh-648
2014-04-11 16:48:00 +01:00
Dave Syer
bc7c6aa40c Print MAVEN_OPTS=-noverify for copy-pasters 2014-04-11 06:53:04 +01:00
Spring Buildmaster
a5864ebcd0 Next development version 2014-04-06 22:43:18 -07:00
Phillip Webb
2bb0f744e0 Polish 2014-04-06 21:49:12 -07:00
Dave Syer
2b616fb7d9 Extract logic for duplicate file removal so it can be shared
.. between Maven and Gradle plugins. Also fixed bug in recursive
scanning logic.

Really fixes gh-614
2014-04-02 11:02:06 +01:00
Dave Syer
ea2c491d1f Do not delete duplicate directories from main classpath
Before this change we were too aggressive in deleting duplicate resources
since directories might not have identical contents, and yet they were
being deleted anyway.

Fixes gh-614
2014-04-01 17:36:43 +01:00
Spring Buildmaster
15e9dbe98b Next development version 2014-04-01 03:05:51 -07:00
Phillip Webb
1e68b7e0a9 Remove superfluous <packaging> tags from POMs 2014-04-01 02:07:43 -07:00
Phillip Webb
0af7f7e347 Add missing POM info 2014-04-01 02:07:42 -07:00
Phillip Webb
488b03387f Polish POM formatting 2014-04-01 02:07:36 -07:00
Phillip Webb
6f9bb233ad Revert "Next development version"
This reverts commit b67bb70ee3.
2014-04-01 00:38:48 -07:00
Spring Buildmaster
b67bb70ee3 Next development version 2014-03-31 22:38:42 -07:00
Phillip Webb
ac4cdd33c3 Revert "Next development version"
This reverts commit 1d0eea12eb.
Returning to 1.0.0.BUILD-SNAPSHOT for an updated release.
2014-03-31 17:14:30 -07:00
Spring Buildmaster
1d0eea12eb Next development version 2014-03-28 11:47:09 -07:00
Phillip Webb
beaddb2362 Polish 2014-03-26 13:29:26 -07:00
Phillip Webb
54a5718b98 Minor polish 2014-03-25 22:20:43 -07:00
Martin Lau
53cb8ccde2 Escape URL characters in JAR URLs
Update the spring-boot-loader JarURLConnection class to decode entry
names in the same way as the stock JDK class. This allows encoded
entry names in the form `%c3%ab` to be loaded.

Fixes gh-556
2014-03-24 22:41:05 -07:00
Phillip Webb
e23bcdbe29 Update OSX Java 1.6 compatibility fix for plugins
Change the initial fix for OSX Java 1.6 compatibility by removing the
need for a direct `tools.jar` dependency.

It appears that `system` dependencies are always pulled in when
used in a Maven plugin. This makes the the dependency on `tools.jar`
particularly brittle since we need to make assumptions about where
the jar is located.

Since the tools jar is *only* needed for Spring Loaded support, the
plugin has now been updated to locate the jar programmatically and
call it via reflection. This should reduce the risk of problems when
using the plugin and at the very least isolate them to Spring Loaded
support.

(See original commit b8c4720)

Fixes gh-497
2014-03-18 12:05:35 -07:00
Phillip Webb
ca0a12cedb Polish 2014-03-18 10:23:54 -07:00
Phillip Webb
f55ca99214 Polish zip file detection 2014-03-18 10:23:54 -07:00
Dave Syer
ae512193bf Add missing test mannifest 2014-03-18 16:37:53 +00:00
Dave Syer
935131cdab Clarification regarding format of loader.path 2014-03-18 15:31:45 +00:00
Dave Syer
a1d3bac7c8 More changes to teh way ExplodedArchive works in non-recursive mode
It is sufficient for most purposes (e.g. the ones PropertieLauncher needs)
to only read the META-INF directory (not the whole file tree). So a quick
fix is to make META-INF a special case when initializing non-recursive
entries.

Fixes gh-520
2014-03-18 14:28:23 +00:00
Dave Syer
2c60449836 Be defensive with File.listFiles() 2014-03-18 14:28:23 +00:00
Andy Wilkinson
38585bf3b6 Omit any file that is not a zip when repackaging
When repackaging an archive, the files in the resulting lib directory
must be zip files. If they're not zip files, the resulting archive
may fail to run (#324).

The previous approach was to consider an artifact's type when deciding
whether or not it should be packaged. The type is a string and, while
there are a number of well-known values, it can essentially be anything.
This caused a problem with an artifact incorrectly being identified as
being unsuitable for inclusion (#489).

This commit changes the approach. Rather than looking at an artifact's
type, it looks at the first four bytes  of the archive's file. Only if
these header bytes matche that of a zip file is the artifact included.
This is a better match for the requirement that all files in lib be zip
files.

Fixes #489
2014-03-18 10:03:38 +00:00
Trevor Menagh
b8c472007a Make Spring Boot work in Java 1.6 on Mac OS X
Currently Spring Boot fails in Java 1.6 on Mac OS X due to the
"tools.jar" being integrated into classes.jar in the Apple version of
Java 6.

Apple fixed this with Java 7, but we should still support Java 6. We had
to roll back to maven-plugin-plugin 3.1 to make this work with Java 6
and 7.

All tests pass with Java 6 and Java 7.
2014-03-17 12:12:29 +00:00
Phillip Webb
c5ee3c7eba Remove duplicate documentation
Remove README files that have been since been migrated to the reference
documentation. Also updated remaining markdown files to asciidoctor to
save having a mix of different formats.

Fixed gh-503
2014-03-16 23:00:12 -07:00
Phillip Webb
80ac1fb0cd Polish 2014-03-15 13:02:01 -07:00
Dave Syer
a71c9b5de7 Add escape hatch for ClassLoader.findResource() for invalid path
The source of the exception is in sun.misc (so hard to track down precisely)
but it's clear that the LaunchedJarURLClassLoader needs to be more
defensive and return null from findResource() if it can't find it.

Fixes gh-486
2014-03-13 09:03:11 +00:00
Dave Syer
4d172ca742 Remove duplicate resources from classpath
We had been making a special case for logback.xml anyway, so
extending that to simply deleting recursively all of
src/main/resources (or equivalent) from target/classes (or
equivalent) seems like it's perfectly justifiable.

Fixes gh-451
2014-03-10 17:04:44 +00:00
Dave Syer
8168e8a327 Special case for root of classpath resource in archive
This turns out to affect JPA, but only because it looks for a URL for the
root of the classpath using ClassLoader.getResource("") which barfs in
an app launched from an executable JAR. It's easy to make a special case
for "" in the class loader, so I went ahead and did that. Possibly need
to think what the implication of getResources("") is as well (not
tested in an app yet).

Fixes gh-420
2014-03-06 11:36:47 +00:00
Spring Buildmaster
b0d4e8ae69 Next development version 2014-03-03 22:46:12 -08:00
Spring Buildmaster
cb8668a151 Release version 1.0.0.RC4 2014-03-03 22:46:05 -08:00
Dave Syer
6b5828a820 Be defensive if there is no main/classes 2014-02-27 10:55:23 +00:00
Dave Syer
f0f73a4ead Current directory (lodaer.path=.) pathology workaround
It turns out that loader.path=. was pathological and before this
change ended up making the classpath empty (loader.path=.,lib/
would have fixed it). With this change the old behaviour is still
supported, but if the only user-supplied path entry is "." (or
empty) then it is now kept, and translates into the root of the
current archive if running as "java -jar ...".

Fixes gh-270
2014-02-25 12:38:25 +00:00
Phillip Webb
865c51d7ac Revert "Omit jar: prefix from jarFileUrl"
Restore previous behavior where JarFile URLs are always prefixed with
"jar:". I believe that the prefix is required in order to remain
compatible with standard JAR URLs.

This reverts commit 825fc2f7df.
2014-02-24 13:44:09 -08:00
Dave Syer
511fff05bb Check for a mainClass in "run" task if there is one
If there is a run task with an explicit main it can be used
by the repackage task (assuming its own native setting is
not used).

Fixes gh-389
2014-02-24 08:54:04 +00:00
Dave Syer
825fc2f7df Omit jar: prefix from jarFileUrl 2014-02-19 13:59:05 +00:00
Dave Syer
ed15345df1 Try to make Jetty scan TLDs in nested JARs
Jetty apparently does it differently (different version of
Jasper maybe), so you need a unique jarFileURL for each
nested JAR (previously they were all set to the parent
archive URL).

Also added the root of the main archive as a valid
document root.

For gh-367
2014-02-19 13:41:09 +00:00
Phillip Webb
b69c659d8f Polish 2014-02-18 21:58:09 -08:00
Dave Syer
77bac876ce Add support for Spring Loaded in Maven and Gradle
Requires Loaded 1.1.5 (or better).

For Maven you can just add springloaded to the dependencies of the
spring-boot plugin (and also set MAVEN_OPTS=-noverify).

For Gradle add springloaded to the build dependencies (-noverify
can be added by the plugin).

In both cases there is also support for adding an arbitrary java agent
via configuration. Samples are provided in
spring-boot-sample-[simple,web-ui].

The ApplicationPlugin is only added if there is no JavaExec task
already present, and additionally it computes its own man class if
none is provided. So "gradle run" and "gradle bootRun" look
superficially similar, but "bootRun" has extra options, including
the agent and Loaded support.

Fixes gh-251, gh-183
2014-02-18 10:05:28 +00:00
Spring Buildmaster
1367d57e8c Next development version 2014-02-13 13:19:12 -08:00
Spring Buildmaster
eaff1677a7 Release version 1.0.0.RC3 2014-02-13 13:18:56 -08:00
Phillip Webb
dfe6de8c1f Fallback to JVM URL handler on exception
Update the executable JAR `Handler` to fallback to the JVM handler if
the jar cannot be opened. This prevents exceptions when trying to
open URLs in the form "jar:jndi:/localhost...".

Fixes gh-347
2014-02-13 11:12:46 -08:00
Phillip Webb
5863795e10 Polish 2014-02-11 12:39:55 -08:00
Andy Wilkinson
4f677bec08 Filter non-jar artifacts when packaging libs in Gradle plugin
Previously, the Gradle plugin would package all of a project's
dependencies in the jar's lib directory, irrespective of each
dependency's type. This led to non-jar artifacts being packaged in
the lib directory where only jar dependencies are expected. See #334
for an example failure.

This commit updates the Gradle plugin such that it only packages
dependencies of type jar, ejb, ejb-client, test-jar, or bundle. This
brings the Gradle plugin into line with the Maven plugin.

Fixes #334.
2014-02-10 15:51:29 +00:00
Phillip Webb
5e7d6e608d Update copyright header 2014-02-07 10:12:54 -08:00
Phillip Webb
d4f5cf4496 Filter non 'jar' types from nested libs
Update the `ArtifactsLibraries` used by the maven plugin to filter
based on artifact types. This prevent `.pom` files from accidentally
being packaged in `/libs` and ultimately resulting in 'Unable to find
ZIP central directory records' errors.

Fixes gh-324
2014-02-07 10:10:03 -08:00
Phillip Webb
d137bcd80d Polish gradle repackage task formatting 2014-02-05 23:16:37 -08:00
Janne Valkealahti
32453b27d3 Add mainClass option for Repackage task
Add `mainClass` property option to the Repackage task. If the property
is defined within a task, it works in the same way as if it defined
within the springBoot{} 'ext' properties section.

Option is valid only for that specific task where it is defined, and
will override option defined in springBoot{} ext properties.

Fixes gh-283
2014-02-05 22:54:47 -08:00
Phillip Webb
ed9735361e Apply source cleanup and formatting 2014-02-05 22:53:28 -08:00
Adam Brodziak
f67b165f5a Prevent 404s in README.md links
Fix links to ensure that they don't cause 404 errors when published to
Github Pages.

Fixes gh-304
2014-02-05 21:22:57 -08:00
Phillip Webb
1552759584 Fix package tangle by moving AsciiBytes 2014-02-03 17:26:10 -08:00
Phillip Webb
3e7af3ddb8 Improve exception messages on nested jar failure
Updates gh-284
2014-01-29 23:00:20 -08:00
Phillip Webb
14bc06a387 Pull-up duplicated code to Launcher 2014-01-29 22:46:39 -08:00
Phillip Webb
c852fb5a79 Update packaged JARs to use standard JarLauncher
Change CLI generated JARs to use the standard `JarLauncher` instead of
a custom `JarRunner`. The `PackagedSpringApplicationLauncher` is used
as the `Start-Class` which in turn calls `SpringApplication.run()`.
2014-01-29 16:01:50 -08:00
Andy Wilkinson
96e10104e4 Add a command to produce a self-contained executable JAR for a CLI app
A new command, jar, has been added to the CLI. The command can be
used to create a self-contained executable JAR file from a CLI app.

Basic usage is:

spring jar <jar-name> <source-files>

For example:

spring jar my-app.jar *.groovy

The resulting jar will contain the classes generated by compiling the
source files, all of the application's dependencies, and entries
on the application's classpath.

By default a CLI application has the current working directory on
its classpath. This can be overridden using the --classpath option.
Any file that is referenced directly by the classpath is always
included in the jar. Any file that is found a result of being
contained within a directory that is on the classpath is subject to
filtering to determine whether or not it should be included. The
default includes are public/**, static/**, resources/**,
META-INF/**, *. The default excludes are .*, repository/**, build/**,
target/**. To be included in the jar, a file must match one of the
includes and none of the excludes. The filters can be overridden using
the --include and --exclude options.

Closes #241
2014-01-29 14:05:15 +00:00
Phillip Webb
ef2eb8af6c Fix URL from String creation to work on Windows
Fixed the nested jar URLHandler to correctly deal with files on
Windows.

Fixes gh-269
2014-01-27 21:24:10 -08:00
Phillip Webb
0afdb71345 Better getRootJar exception capturing 2014-01-27 19:59:57 -08:00
Dave Syer
91998d5942 Add loader.args to PropertiesLauncher
Also new section of README for propery keys used by the
launcher.
2014-01-27 13:20:36 +00:00
Phillip Webb
01550fcec6 Allow new URL(String) with nested JARs
Update JarFile to allow the custom registration of a JAR
`URLStreamHandler` that allows `jar:` URLs to be constructed from
Strings. This removes the previous requirement that all nested JAR URLs
be created with a 'context'.

To supported nested JARs the `java.protocol.handler.pkgs` system
property is changed so that our custom URLHandler is picked for 'jar'
protocols in preference to the Java default.

Fixes gh-269
2014-01-26 22:55:22 -08:00
Phillip Webb
c1f8fd2bac Fix some compile warnings 2014-01-26 22:55:07 -08:00
Phillip Webb
49ef1cd236 Update CLI to use spring-boot-dependency-tools
Update `GroovyCompiler` and `AetherGrapeEngineFactory` to use the
recently added `spring-boot-dependency-tools` in favor of loading
dependency information from a generated properties file.
2014-01-24 22:51:40 -08:00
Phillip Webb
ab4baa3c43 Allow gradle builds without version numbers
Add a gradle `ResolutionStrategy` that resolves missing version numbers
using the `spring-boot-dependencies` POM.

This commit also introduces a new `spring-boot-dependency-tools` module
that provides programmatic access to the `dependencyManagement` section
of the dependencies POM.

Fixed gh-262
2014-01-24 22:48:49 -08:00
Dave Syer
aef7bd60d1 Add layout docs to plugin READMEs 2014-01-24 09:08:21 +00:00
Phillip Webb
43e54d38f7 Make fields private where possible 2014-01-21 16:29:07 -08:00
Phillip Webb
0160760568 Apply latest eclipse cleanup rules 2014-01-21 16:28:26 -08:00
Phillip Webb
ac54d7fe3c Final polish before 1.0.0.RC1 2014-01-21 16:28:17 -08:00
Phillip Webb
853b0a8027 Fix some maven warnings 2014-01-21 10:56:09 -08:00
Phillip Webb
cdda330acd Update copyright header for files changed in 2014 2014-01-21 10:27:10 -08:00
Phillip Webb
72dc09cb56 Strip trailing whitespace 2014-01-21 10:22:00 -08:00
Dave Syer
2dc4c291ff Add some clarifications to maven plugin README
Fixes gh-246
2014-01-21 12:18:13 +00:00
Phillip Webb
68293f34af Upgrade version to 1.0.0.BUILD-SNAPSHOT
Fixes fg-243
2014-01-21 00:43:54 -08:00
Phillip Webb
c41a3fd5db Fail builds if multiple main classes are found
Update the maven and gradle plugins to fail the build if a single
unique main class cannot be found. Additionally plugins will warn
if the search is taking too long.

Fixes gh-210
2014-01-16 12:33:16 -08:00
Phillip Webb
4fc9dfc2d5 Revert "Add launcher.count as useful performance testing aid"
This reverts commit e1605b4691.
2014-01-15 10:31:08 -08:00
Dave Syer
5592023f16 Add support for reloading resources in Gradle plugin
Usage:

$ gradle bootRun
...

Edit files in src/main/resources and see the changes live in a web app
(e.g. static resources in /static).

The old functionality of bootRun has been replaced (since it didn't add
a lot of value and also didn't expose any JMV argument setters of anything).
This new feature set is backed by any existing "run" task configuration.

In addition autodetects a main class if there is one in the project
sources, so no need for mainClassName = '...' in build.gradle.

Applies the 'application' plugin (so no need to declare that either).

Fixes gh-225
2014-01-15 11:26:33 +00:00
Dave Syer
e1605b4691 Add launcher.count as useful performance testing aid 2014-01-14 13:03:16 +00:00
Phillip Webb
d125357bf6 Protect against JARs with different local headers
Fix JarEntryData to re-read the local header, rather than relying on
the central directory record.

This protects against the situation where a JAR file is written with an
'Extra Field Length' that is different in the local header to the
central directory header.

This appears to be the case with aspectj 1.7.4 which contains the
following central directory file header for ProceedingJoinPoint:

	50 4B 01 02     signature
	14 03           version made by
	0A 00           version required
	00 00           general
	08 00           compress methods
	0E 40 59 43     last modified
	2D 59 20 70     crc
	EC 00 00 00     csize
	8D 01 00 00     size
	2A 00           fname len
	00 00           ext field len
	00 00           file comment len
	00 00           disk num
	00 00           int file att
	00 00 A4 81     ext file att
	97 F3 00 00     relative offset of the local file header
	...             file name

and the following local header:

	50 4B 03 04     signature
	0A 00           version required
	00 00           general
	08 00           compress method
	0E 40 59 43     last modified
	2D 59 20 70     crc
	EC 00 00 00     csize
	8D 01 00 00     size
	2A 00           fname len
	14 00           ext field len
	...             file name
	...             extra field

Note that the 'ext field len' is 0x00 in the central record but 0x14 in
the local record.

Fixes gh-203
2014-01-10 16:57:51 -08:00
Phillip Webb
47da8a817a Polish 2014-01-10 13:06:54 -08:00
Dave Syer
51f9189923 Prevent 404 in gh-pages 2014-01-09 14:30:06 +00:00
Dave Syer
7b58718453 Add missing YAML file for test 2014-01-08 07:30:58 +00:00
Dave Syer
4e1245d9ee Restore changes from 0332501 (fix class loader test failure) 2014-01-08 07:30:09 +00:00
Dave Syer
bf69da3983 Ignore failing test as short term measure 2014-01-07 19:48:56 +00:00
Janne Valkealahti
780397bd6b Fix for wildcard recursive classpath handling
Previous fix for handling wildcard entries in a classpath
imposed a new problem in a case where entry is a directory
with a jar files but also contains a lot of nested directories.

For example entry "./*" resulted for scanning whole disk starting
from "/". In case of default hadoop classpath, it scanned everything
under hadoop's installation. On some cases this deep scan was hidden
and was revealed by NPE's for file access exceptions.

When we want to support wildcard entries we only want to get
jar files from that directory, while boot itself have a need
to travel recursively to find classfiles from an expoded archive.

We handle this case by using recursive(true by default) flag in
ExplodedArchive and this flag is set to false in PropertiesLauncher
if we match wildcard.
2014-01-07 18:05:10 +00:00
Dave Syer
8fe696944a Delete duplicate logback.xml if running from Maven plugin
Fixes gh-143
2014-01-06 17:28:22 +00:00
Dave Syer
033250195b Allow user to specify classLoader as loader property
PropertiesLauncher now supports creating its own class loader
from looader.classLoader property. It will succeed if the
implementation specified has a default constructor or one
that takes a parent class loader, or one that takes a URL[]
and a parent class loader (like URLClassLoader).
2014-01-06 11:40:20 +00:00
Phillip Webb
1bcd3de7b5 Polish 2014-01-02 12:10:37 -08:00
Janne Valkealahti
da889efde7 Fix PropertiesLauncher for wildcard entries in parent classpath
This small change now plays nice with wildcard classpath
entries coming from a parent classloader as its urls.
2013-12-31 12:01:53 +00:00
Dave Syer
3c7361fb3e Support for wildcard paths in PropertiesLauncher 2013-12-30 16:14:10 +00:00
Dave Syer
ea59976277 Extract package discovery to separate method 2013-12-30 14:24:54 +00:00
Guo Du
2a10503167 fixed ExplodedArchive which fail on windows
* when run 'java org.springframework.boot.loader.JarLauncher'

Fixes gh-176
2013-12-22 09:35:34 +00:00
Phillip Webb
513c6a1de2 Polish 2013-12-16 14:38:52 -08:00
Janne Valkealahti
9ffa6bced5 Readme updates for gradle plugin 2013-12-16 15:10:09 +00:00
Dave Syer
99fd32d408 Attempt to make URL comparison windoze proof 2013-12-16 07:02:45 +00:00
Dave Syer
e55e8f9863 Add build.gradle samples and rename runJar->bootRun 2013-12-10 11:10:04 +00:00
Janne Valkealahti
4c9c2b8dcf Tweaks for boot gradle plugin
Fixes gh-152.

... to ease excluding dependencies
eckage changed to bootRepackage

- Register BootRepackage order to use task foo(type: BootRepackage){}
- Allow user to use customConfiguration

configurations {
  hadoopruntime.exclude group: 'log4j'
  hadoopruntime.exclude group: 'org.slf4j'
  hadoopruntime.exclude group: 'org.apache.hadoop'
  hadoopruntime.exclude group: 'org.apache.hive'
  hadoopruntime.exclude group: 'commons-logging'
  hadoopruntime.exclude group: 'org.codehaus.jettison'
  hadoopruntime.exclude group: 'com.thoughtworks.xstream'
}
dependencies {
  compile "org.springframework.batch:spring-batch-core:$springBatchVersion"
  compile "org.springframework.batch:spring-batch-infrastructure:$springBatchVersion"
  compile "org.springframework.data:spring-yarn-batch:$springDataVersion"
  compile "org.springframework.data:spring-yarn-boot:$springDataVersion"
  runtime "org.springframework.data:spring-data-hadoop:$springDataVersion"
  runtime "org.springframework.data:spring-data-hadoop-core:$springDataVersion"
  runtime "log4j:log4j:$log4jVersion"
  runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"
  testCompile "org.springframework.data:spring-yarn-test:$springDataVersion"
  testCompile "org.hamcrest:hamcrest-core:$hamcrestVersion"
  testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
  hadoopruntime configurations.runtime
}

springBoot {
  backupSource = true
  customConfiguration = 'hadoopruntime'
}

task appmasterJar(type: Jar) {
  appendix = 'appmaster'
  from sourceSets.main.output
  exclude('**/*Container*')
  exclude('**/*Client*')
}

task clientJar(type: Jar) {
  appendix = 'client'
  from sourceSets.main.output
  exclude('**/*Appmaster*')
  exclude('**/*Container*')
}

task clientBoot(type: BootRepackage, dependsOn: clientJar) {
  withJarTask = clientJar
}

task appmasterBoot(type: BootRepackage, dependsOn: appmasterJar) {
  customConfiguration = "hadoopruntime"
  withJarTask = appmasterJar
}

//jar.enabled = false
//bootRepackage.enabled = false

task bootJars
bootJars.dependsOn = [clientBoot,containerBoot,appmasterBoot]

build.dependsOn(clientBoot)
build.dependsOn(containerBoot)
build.dependsOn(appmasterBoot)
//build.dependsOn(bootJars)
2013-12-10 11:09:39 +00:00
Dave Syer
f39b044cf7 Fix packaging for Layout.NONE
Fixes gh-139
2013-12-02 14:10:56 +00:00
Dave Syer
3f1cfbf241 Add JSTL to JSP sample 2013-11-26 10:00:50 +00:00
Dave Syer
c0bcb5e8e9 Add layout=NONE to packaging tools 2013-11-20 12:08:40 +00:00
Phillip Webb
64f32893bb Source format and clean-up 2013-11-16 00:08:18 -08:00
Phillip Webb
883fd9162f Polish 2013-11-16 00:08:17 -08:00
Phillip Webb
d2678e08de Improve startup performance for nested JARs
Refactor spring-boot-loader to work directly with low level zip data
structures, removing the need to read every byte when the application
loads.

This change was initially driven by the desire to improve tab-completion
time when working with the Spring CLI tool. Local tests show CLI
startup time improving from ~0.7 to ~0.22 seconds.

Startup times for regular Spring Boot applications are also improved,
for example, the tomcat sample application now starts 0.5 seconds
faster.
2013-11-15 16:15:47 -08:00
Phillip Webb
202e32425e Reinstate git commit ID in loader tools manifest
Add Spring-Boot-Commit-Id to MANIFEST.MF of spring-boot-loader-tools.
The reinstates functionality of 498ca07698
but does not cause issues in eclipse.
2013-11-07 11:03:51 -08:00
Dave Syer
8cb0211dce Add "integration" profile in Maven build
By default it is on, but you can switch it
off (`-P '!integration'`) to ignore integration tests
and get a faster build.

.travis.yml uses this feature so that it doesn't keep
failing on a timeout.
2013-11-06 09:43:58 +00:00
Phillip Webb
18147b24c0 Revert "Re-add Spring-Boot-Commit-Id to MANIFEST.MF of created jars"
This reverts commit 498ca07698.

Removed due to eclipse failures.
2013-11-05 10:05:57 -08:00
Phillip Webb
d784cb6a88 Apply eclipse-formatter conventions 2013-11-04 10:25:27 -08:00
Christian Dupuis
498ca07698 Re-add Spring-Boot-Commit-Id to MANIFEST.MF of created jars 2013-11-04 17:22:02 +01:00
Dave Syer
fc40ad4b48 Add short description of launchers 2013-11-04 14:45:08 +00:00
Phillip Webb
a9c9c383f4 Polish pom.xml
Aplly consistent formatting, drop JDK 8 support and cleanup repo
locations to use spring.io.
2013-10-28 07:37:02 -07:00
Andy Wilkinson
bde98defa5 Update Gradle plugin to only repackage main jar
Previously, Repackage would attempt to repackage every jar in the
project. This would cause it to incorrectly attempt to repackage source
and javadoc jars.

This commit updates Repackage so that it ignores any jar with a
classifier. Hopefully this is a reasonable approximation for ignoring
'special' jars that should not be repackaged such as sources and
javadoc.
2013-10-25 16:29:59 +01:00
Dave Syer
f8d5802230 Fix typo in gradle plugin 2013-10-24 18:04:21 -04:00
Andy Wilkinson
629a77c3e2 Remove ASM dependency and use Spring Core's instead
Depending on ASM itself can cause problems as it can clash with other
libraries' dependency on it. This commit updates
spring-boot-loader-tools to depend upon spring-core and use its
repackaged copy of ASM instead. Depending on spring-core also brings
with it the advantage of giving access to its various bits of utility
code.

spring-boot-maven-plugin has been updated to remove its ASM
exclusions as they will no longer clash with the version from
spring-boot-loader-tools

(59483608)
2013-10-24 14:38:22 +01:00
Andy Wilkinson
c0ae78f3ec Isolate Aether in a separate class loader
Prior to this commit, the Aether-based GrapeEngine was loaded in the
same class loader as the rest of Boot. This led to Aether's and its
dependencies' types polluting the application's class path. Most
notably, this caused problems with logging as the logging framework
could be permaturely initialized.

This commit isolates AetherGrapeEngine, Aether and its dependencies
into a separate class loader. This is done by customizing the
packaging of the CLI's jar file with the internal directory housing
all of the types that will be loaded by the separate class loader.
2013-10-22 17:13:20 +01:00
Andy Wilkinson
b0c6d8060c Remove Git plugin from Spring Boot tools
The Git plugin was primarily being used to provide version information
that Boot's maven plugin can add into the MANIFEST.MF of the uber-jars
that it creates under the Spring-Boot-Commit-Id attribute.

This commit removes the Git plugin from Boot's own projects, but
leaves it in the spring-boot-starter-parent for use by Spring
Boot-based applications.

The attribute in the uber-jars' MANIFEST.MF has been replaced with a
Spring-Boot-Version attribute. The value of this attribute is the
implementation version of Repackager class's package.
2013-10-22 15:54:05 +01:00
Phillip Webb
6220aba983 Allow 'java -jar' to work with signed nested jars
Fix RandomAccessJarFile to correctly read certificate information as
jar entries are loaded. This change allows signed nested jars to be
used as JCE providers.
2013-10-17 17:19:51 -07:00
Phillip Webb
5c6dd52e9a Polish 2013-10-17 14:12:42 -07:00
Dave Syer
fede0d1c98 Add profiles to /env 2013-10-16 13:42:13 -04:00
Dave Syer
47cd5dd679 Tooling for PropertiesLauncher in JAR archives
To use PropertiesLauncher instead of JarLauncher in an
executable JAR we have provided tooling support. In Maven
(using the starter parent to default some of the settings):

    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <configuration>
        <layout>ZIP</layout>
      </configuration>
    </plugin>

in Gradle:

    apply plugin: "spring-boot"
    springBoot {
        layout = 'ZIP'
      }
    }

[Fixes #58837492] [bs-330] Add tooling for PropertiesLauncher
2013-10-16 08:49:51 -04:00
Dave Syer
ea11dafcbd Extend PropertiesLauncher to load nested archives
PropertiesLauncher can now be used to run an executable jar, and by
default it will pick up nested archives in lib/ (where the Boot
tools puts them). User can provide loader.path (colon-separated)
to change the nested path.

[#58837492] [bs-330] Add tooling for PropertiesLauncher
2013-10-15 11:08:45 -04:00
Dave Syer
d4d9ebcabd Small re-org of PropertiesLauncher 2013-10-15 09:56:52 -04:00
Dave Syer
be1263500d Ensure env vars are consulted for PATH 2013-10-14 16:07:50 -04:00
Dave Syer
281c650251 Add git commit id to MANIFEST in boot tools repackager 2013-10-14 16:06:32 -04:00
Dave Syer
b0c54a6588 Add parent class loader entries if possible
...otherwise you can see cryptic NoClassDefFound errors
because the application class was loaded from the parent
on the file system, but then it doesn't have access to the
child loaders nested jars.
2013-10-14 16:02:04 -04:00
Dave Syer
114b7a5e95 Ensure UPPER_CASE overrides work in PropertiesLauncher 2013-10-14 11:16:40 -04:00
Phillip Webb
35ff983b40 Prevent duplicate resource enumeration form loader
Fix LaunchedURLClassLoader to only enumerate resources from the
rootLoader and the URLs.

Commit cd2c189 (Support javaagent instrumentation with loader) added
a parent classloader and used filtering in the loadClass() method
to ensure classes were loaded from the appropriate location. The change
in parent means that locally packaged resources are found twice, once
from the parent, and once from the self archive URL.

LaunchedURLClassLoader now overrides getResource and getResources to
filter out the parent classloader and instead only add resources from
the root classloader and the URLs.

Issue: #56232870
2013-10-09 11:09:03 -07:00
Phillip Webb
af0d08c998 Polish 2013-10-08 21:17:39 -07:00
Phillip Webb
b772f7c2e4 Polish
Minor formatting and consistent copyright header.
2013-10-08 20:30:45 -07:00
dave noel
a1517de6db Add gradle runJar 2013-10-01 14:57:56 -04:00
Phillip Webb
15bc25dc29 Further re-organization of launcher code 2013-09-24 15:31:24 -07:00
Dave Syer
0e0eb7d3fa Add loader.system (flag to copy properties to System) 2013-09-24 09:23:44 +01:00
Dave Syer
a3af83cf96 Add internal property replacement
E.g. in application.properties (for launcher)

foo: Application
loader.main: my.${foo}
loader.path: etc
2013-09-24 09:15:30 +01:00
Dave Syer
a70d293c87 Re-organize the Launcher code a bit 2013-09-24 08:52:04 +01:00
Phillip Webb
e9fd7c96b8 Loader changes 2013-09-24 08:52:04 +01:00
Dave Syer
053c072155 Add some tests for PropertiesLauncher 2013-09-24 08:52:04 +01:00
Dave Syer
f83fd47184 Add PropertiesLauncher 2013-09-24 08:52:03 +01:00
Phillip Webb
fd9e258d12 Replace 'springsource.org' with 'spring.io'
Replace all references to 'springsource.org' with the new 'spring.io'
domain.
2013-09-23 14:44:59 -07:00
Dave Syer
8a1e39c4dc Remove unused annotation 2013-09-05 17:15:16 -07:00
Phillip Webb
e2b3c03fc4 Refine LaunchedURLClassLoader load order
Refine the loading order of LaunchedURLClassLoader to consider the
root loader before locally bundled classes.

The prevents classes from locally bundled JARs from replacing system
classes.

Issue: #56232870
2013-09-05 17:15:15 -07:00
Phillip Webb
680741fdc8 Fix LaunchedURLClassLoader Java 1.6 compatibility 2013-09-05 17:15:15 -07:00
Phillip Webb
cd2c18965e Support javaagent instrumentation with loader
Update spring-boot-loader to allow `-javaagent` instrumentation when
running from executable jars.

Prior to this commit the `Launcher` skipped the application classloader
and instead used the system classloader as a parent. This was to ensure
that locally packaged classes were always loaded by the classloader
that had access to nested jars.  Unfortunately when using the
`-javaagent` option, it is the application classloader that is modified.

The `Launcher` class now uses the application classloader as parent
and `LaunchedURLClassLoader` has been updated to always search local
URLs before delegating to the parent. This is very similar to the way
that most application servers handle the loading of war files.

Issue: #56232870
2013-09-05 17:15:15 -07:00
Dave Syer
38e565e920 Back to SNAPSHOT for dev 2013-09-05 17:15:15 -07:00
Dave Syer
b634b3bde6 Update to 0.5.0.M2 2013-09-05 17:15:15 -07:00
Phillip Webb
5b7d56895b Provide accurate InputStream.available() results
Provide accurate InputStream.available() results by using the size
attribute of the ZipEntry. This helps improve performance with
CGLib and also fixes issues where libraries expect that a non-zero
result from available() indicates that read() will not return -1.
2013-09-05 17:14:16 -07:00
Biju Kunjummen
29afcb7898 Added an @Execute annotation to RunMojo
Update RunMojo to include an @Execute annotation. Allows the use of
`mvn spring-boot:run` without having to compile/package first. Now a
command like `mvn clean spring-boot:run` works.

The phase for @Execute annotation is along the lines of what is used
for the `jetty:run` plugin.
2013-09-05 17:14:15 -07:00
Phillip Webb
c999541fd3 Set source/target version to 1.6 for int. tests 2013-09-05 17:14:14 -07:00
Phillip Webb
e6d9922cbc Stream maven-invoker-plugin logs 2013-09-05 17:14:14 -07:00
Daniel L. Buchko
7ecb99757b Prevent test failures under Windows
Cleaned up file separators to prevent tests failing on Windows.
2013-09-05 17:14:14 -07:00
Daniel L. Buchko
3c5fa0daa0 Fixed handling of spaces in file paths
Update Launcher to correctly handle spaced in file paths.
2013-09-05 17:14:14 -07:00
Phil Webb
3690ab16ba Fix README.md typo 2013-09-05 17:14:08 -07:00
Phillip Webb
878ff13620 Documentation updates 2013-08-09 15:34:04 -07:00
Phillip Webb
ce5e145afa Add Libraries.NONE static final 2013-08-09 15:33:37 -07:00
Phillip Webb
0b7256e7f9 Fix compile failure on JDK 6 2013-08-09 13:01:39 -07:00
Phillip Webb
cf655945aa Polish 2013-08-09 12:28:54 -07:00
Phillip Webb
e773db2401 Remove unused test resources 2013-08-06 00:22:02 -07:00
Phillip Webb
4e11ae1671 Documentation
Various updates to README.md files.
2013-08-05 22:36:22 -07:00
Phillip Webb
1db22aca5c Rework POM structure
Rework main build POM to be an aggregator pom that does not inherit
from any parent. Introduce new spring-boot-dependencies module to
act as a parent for both spring-boot-starter-parent and
spring-boot-parent.
2013-08-02 21:58:24 -07:00
Dave Syer
413658fbca Change parent for tools poms 2013-08-02 12:14:11 +01:00
Dave Syer
4bb5de02e7 Switch back to SNAPSHOT for dev 2013-08-02 12:00:14 +01:00
Dave Syer
19a880dff6 Move tools modules under spring-boot-tools 2013-08-02 12:00:14 +01:00