Commit Graph

175 Commits (4248665fcdb3128c33f6f4cf7ac5626bc7ecab5b)

Author SHA1 Message Date
Dave Syer 438cff252d Allow multiple agents to be attached 11 years ago
Dave Syer b884a73396 Share RunProcess with CLI 11 years ago
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
11 years ago
Phillip Webb f53ee406c1 Merge branch '1.0.x' 11 years ago
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
11 years ago
Phillip Webb 6025f45aa0 Polish 11 years ago
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
11 years ago
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
11 years ago
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
11 years ago
sopov.ivan 10d82e28ff minor - correcting modifiers order 11 years ago
Phillip Webb 64a835e91a Move master to 1.1.0.BUILD-SNAPSHOT 11 years ago
Spring Buildmaster d3954a1703 Next development version 11 years ago
Phillip Webb fad5ce45db Polish 11 years ago
Dave Syer 34604a9602 Add assertion about non-special resource 11 years ago
Dave Syer 2d16c59147 Clarify usage of run.arguments with Maven plugin 11 years ago
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
11 years ago
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
11 years ago
Dave Syer bc7c6aa40c Print MAVEN_OPTS=-noverify for copy-pasters 11 years ago
Spring Buildmaster a5864ebcd0 Next development version 11 years ago
Phillip Webb 2bb0f744e0 Polish 11 years ago
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
11 years ago
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
11 years ago
Spring Buildmaster 15e9dbe98b Next development version 11 years ago
Phillip Webb 1e68b7e0a9 Remove superfluous <packaging> tags from POMs 11 years ago
Phillip Webb 0af7f7e347 Add missing POM info 11 years ago
Phillip Webb 488b03387f Polish POM formatting 11 years ago
Phillip Webb 6f9bb233ad Revert "Next development version"
This reverts commit b67bb70ee3.
11 years ago
Spring Buildmaster b67bb70ee3 Next development version 11 years ago
Phillip Webb ac4cdd33c3 Revert "Next development version"
This reverts commit 1d0eea12eb.
Returning to 1.0.0.BUILD-SNAPSHOT for an updated release.
11 years ago
Spring Buildmaster 1d0eea12eb Next development version 11 years ago
Phillip Webb beaddb2362 Polish 11 years ago
Phillip Webb 54a5718b98 Minor polish 11 years ago
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
11 years ago
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
11 years ago
Phillip Webb ca0a12cedb Polish 11 years ago
Phillip Webb f55ca99214 Polish zip file detection 11 years ago
Dave Syer ae512193bf Add missing test mannifest 11 years ago
Dave Syer 935131cdab Clarification regarding format of loader.path 11 years ago
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
11 years ago
Dave Syer 2c60449836 Be defensive with File.listFiles() 11 years ago
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
11 years ago
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.
11 years ago
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
11 years ago
Phillip Webb 80ac1fb0cd Polish 11 years ago
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
11 years ago
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
11 years ago
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
11 years ago
Spring Buildmaster b0d4e8ae69 Next development version 11 years ago
Spring Buildmaster cb8668a151 Release version 1.0.0.RC4 11 years ago
Dave Syer 6b5828a820 Be defensive if there is no main/classes 11 years ago