Commit Graph

326 Commits (efdf451e6ed779ffdceede35ee9663850d4c800a)

Author SHA1 Message Date
Phillip Webb c9fb9916b8 Reformat code using Eclipse Mars 9 years ago
Phillip Webb e473364e4e Merge branch '1.2.x' 9 years ago
Phillip Webb 6ab376e2e8 Reformat code use Eclipse Mars 9 years ago
Spring Buildmaster 9409c49c10 Next development version 9 years ago
Phillip Webb e674d751de Polish Javadoc 9 years ago
Phillip Webb e07df7e4c6 Remove redundant modifiers 9 years ago
Phillip Webb d09805fd75 Polish license headers 9 years ago
Phillip Webb 6e29ee4557 Polish 9 years ago
Phillip Webb 67402405db Reformat code 9 years ago
Phillip Webb 0335053139 Merge branch '1.2.x' 9 years ago
Phillip Webb 15686ed4fd Reformat code 9 years ago
Dave Syer 25ac258d22 Clarify plugin documentation for requiresUnpack 9 years ago
Stephane Nicoll 057824aca7 Fix maven plugin configuration
Closes gh-3601
9 years ago
Stephane Nicoll 94405455dd Fix maven plugin configuration
Closes gh-3601
9 years ago
Stephane Nicoll e033daed0f Use standard name for main thread
DevTools look for a main thread named "main". The maven plugin is
actually using a different value and there is no real reason to. This
change fixes DevTools support as long as forking is enabled.

See gh-3315
9 years ago
Stephane Nicoll 97634e85ac Remove unnecessary keyword 9 years ago
Phillip Webb 0cf6efca4f Polish 10 years ago
Stephane Nicoll e307fe3137 Honor outputDirectory properly
Previously, if the repackaged file was different from the main artifact
of the build, the maven plugin wrongly considered that it should attach
the file with a classifier.

The outputDirectory is honored properly now, regardless of the fact a
classifier is defined or not.

Fixes gh-3177
10 years ago
Spring Buildmaster 7ce391db4f Next development version 10 years ago
Phillip Webb 61fc4f3f12 Polish copyright headers 10 years ago
Phillip Webb 2f16a01dd5 Polish 10 years ago
Daniel Young and Mathew Johnson e3c2fb7287 Add useTestClassPath to run/start maven goals
Add `useTestClasspath` flag to add test dependencies to the classpath of
the application. Works with both the `start` and `run` goals.

Closes gh-2792
10 years ago
Phillip Webb d87f2713af Merge branch '1.2.x' 10 years ago
Phillip Webb 135e9d10a6 Polish 10 years ago
Stephane Nicoll f87b2be2f9 Update default JMX name used by Maven plugin
Closes gh-3124
10 years ago
Stephane Nicoll e0787cbaf0 Polish
Review 105039c that still refer to "lifecycle" instead of "admin". In
particular, harmonized the configuration properties.

Closes gh-3124
10 years ago
Stephane Nicoll 18c65f6e63 Merge branch '1.2.x' 10 years ago
Lugi Cardito a37e983296 Create output directory if necessary
If the `repackage` goal defines an output directory that does not exist,
the maven plugin now creates it.

Closes gh-3136
10 years ago
Phillip Webb 105039cdb2 Rename SpringApplicationLifecycle => Admin
Rename SpringApplicationLifecycle JMX beans to SpringApplicationAdmin
and relocate to a dedicated package.

Fixes gh-3124
10 years ago
Phillip Webb 316b07d3b9 Change the embedded script default to disabled
Update the Maven and Gradle repackage tasks so that the embedded
startup script is no longer included by default. This change is
primarily due to the `cf` command line not currently accepting
the unusual jar format.

Fixes gh-3045
10 years ago
Phillip Webb bce4bb8860 Polish start stop support 10 years ago
Spring Buildmaster 5d81c87b43 Next Development Version 10 years ago
Stephane Nicoll 4ec519fd08 Merge branch '1.2.x' 10 years ago
Stephane Nicoll f25ce8a381 Fix artifact extension retrieval
Do not rely on the packaging type to figure out what the extension of the
main artifact will be. So far, using `jar` and `war` packaging for `.jar`
and `.war` files worked by chance.

We know retrieve the actual extension as provided by Maven's
`ArtifactHandler`.

Fixes gh-2762
10 years ago
Andy Wilkinson b7a02feda8 Make the Maven plugin’s start and stop tests more robust
- Verify that isReady has been called
 - When forking, use a random port for JMX
 - Don’t wait for application termination as it introduces a race
   condition and verifying that shutdown has been requested is
   sufficient

See gh-2525
10 years ago
Stephane Nicoll e0dfe9fb86 Add start/stop goals to maven plugin
SpringApplicationLifecycle provides basic lifecycle operations on the
current Spring Boot application (that is checking if the application has
fully started and gracefully terminate the app). It can be registered as
an MBean of the platform MBean server if a specific property is set.

The Maven plugin uses that MBean to check that the application is ready
before ending the "start" phase. It uses it to trigger a proper shutdown
of the application during the "stop" phase.

If the process has to be forked, the platform MBean server is exposed on
a configurable port so that the maven plugin can connect to it.

Such change permits the maven plugin to integrate a classical integration
test scenario where the "start" goal is invoked during the
pre-integration phase and the "stop" goal during the post-integration
phase.

Closes gh-2525
10 years ago
Phillip Webb a8d099f6b8 Revert "Add start/stop goals to maven plugin"
This reverts commit 54e12a07e6.
10 years ago
Stephane Nicoll 54e12a07e6 Add start/stop goals to maven plugin
SpringApplicationLifecycle provides lifecycle operations on the current
Spring Boot application. It can be registered as an MBean of the platform
MBean server if a specific property is set. Besides, the JMX name can
also be customized via a property in case more than one Spring Boot
application is started in the same process.

The Maven plugin uses that MBean to check that the application is ready
before ending the "start" phase. It uses it to trigger a proper shutdown
of the application during the "stop" phase.

If the process has to be forked, the platform MBean server is exposed on
a configurable port so that the maven plugin can connect to it.

Such change permits the maven plugin to integrate a classical integration
test scenario where the "start" goal is invoked during the
pre-integration phase and the "stop" goal during the post-integration
phase.

Closes gh-2525
10 years ago
Phillip Webb 793481843c Support embedded jar initialization scripts
Update the Maven and Gradle plugin to generate fully executable jar
files on Unix like machines. A launcher bash script is added to the
front of the jar file which handles execution.

The default execution script will either launch the application or
handle init.d service operations (start/stop/restart) depending on if
the application is executed directly, or via a symlink to init.d.

See gh-1117
10 years ago
Spring Buildmaster e03c11dda8 Next development version 10 years ago
Andy Wilkinson 6a32519aa8 Merge branch '1.2.x' 10 years ago
Andy Wilkinson f761916b51 Honor unpack for war files
Previously repackaging of an archive was performed in three steps:

1. Write the manifest
2. Write entries from the source archive into the destination
3. Write any libraries into the destination if they’re not already there

This worked fine for jar files, but not for war files. In the war file
case the libraries are already in the source archive’s WEB-INF/lib
directory so they’re copied into the destination in step 2. This means
that step 3 largely becomes a no-op and, crucially, the UNPACK comment
is not applied to any libraries that require it.

This commit reorders steps 2 and 3 so that the libraries are copied into
the destination first (allowing the UNPACK comment to be written, if
required) and then any entries in the source are written into the
destination if they’re not already there.

Fixes gh-2588
10 years ago
Phillip Webb 0174476ff1 Merge branch '1.1.x' into 1.2.x 10 years ago
Phillip Webb 50e1f80581 Remove .factorypath files 10 years ago
Phillip Webb 561ed99b5b Merge branch '1.1.x' into 1.2.x 10 years ago
Phillip Webb a57a88f5cf Move master to 1.3.0.BUILD-SNAPSHOT 10 years ago
Spring Buildmaster 8f0ad02237 Next development version 10 years ago
Phillip Webb 8a49218e82 Fixup version numbers following release 10 years ago
Spring Buildmaster aea68f0c32 Next development version 10 years ago
Phillip Webb ccdbfd274f Fix Java 8 Javadoc compatibility
Update Javadocs to fix errors caused by Java 8 aggressive linting.

Fixes gh-2233
10 years ago
Spring Buildmaster 60725cd8bd Next development version 10 years ago
Phillip Webb 22bb6f7598 Fix accidental fork logic change
Fix accidental change from commit b42c7fca.
10 years ago
Phillip Webb 45c5e25a05 Polish 10 years ago
Domingo Suarez Torres dbb795298c Restore proper use of the fork parameter
Previously, disabling forking was not possible if JVM arguments or an
agent are specified, even if the fork attribute is explicitly set to
`false`.

The  fork attribute is now detected as it should and forking is disabled
when the fork attribute is set to false, even if JVM arguments or an
agent is either specified or discovered.

Fixes gh-2220
10 years ago
Phillip Webb f4fbc3e339 Fix Maven Spring Loaded detection logic
Ensure that the Maven plugin RunMojo attempts to detect the Spring
Loaded agent before deciding if the JVM should be forked.

Fixes gh-2140
10 years ago
Spring Buildmaster 63e6a25097 Next development version 10 years ago
Spring Buildmaster 1a788c1741 Next development version 10 years ago
Phillip Webb 09dac5ff00 Apply formatting and cleanup rules 10 years ago
Andy Wilkinson 7a783f5a18 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 863c099161 Add missing copyright headers 10 years ago
Phillip Webb e0a0af436f Add 'module' repacker layout
Add a 'module' layout for the repackager which includes all 'compile'
and 'runtime' scope dependencies and does not require a main class.

Fixes gh-1941
10 years ago
Phillip Webb f6074ff2f5 Merge branch '1.1.x' 10 years ago
Phillip Webb 608b1e65a1 Relax servlet check
Relax the servlet version check in Maven integration tests.

See gh-1797
10 years ago
Phillip Webb 3030ad42fc Merge branch '1.1.x'
Conflicts:
	pom.xml
	spring-boot-actuator/pom.xml
	spring-boot-autoconfigure/pom.xml
	spring-boot-cli/pom.xml
	spring-boot-dependencies/pom.xml
	spring-boot-docs/pom.xml
	spring-boot-full-build/pom.xml
	spring-boot-integration-tests/pom.xml
	spring-boot-parent/pom.xml
	spring-boot-samples/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-log4j/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-noweb/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-ui/pom.xml
	spring-boot-samples/spring-boot-sample-actuator/build.gradle
	spring-boot-samples/spring-boot-sample-actuator/build.xml
	spring-boot-samples/spring-boot-sample-actuator/pom.xml
	spring-boot-samples/spring-boot-sample-amqp/pom.xml
	spring-boot-samples/spring-boot-sample-aop/pom.xml
	spring-boot-samples/spring-boot-sample-batch/pom.xml
	spring-boot-samples/spring-boot-sample-data-elasticsearch/pom.xml
	spring-boot-samples/spring-boot-sample-data-gemfire/pom.xml
	spring-boot-samples/spring-boot-sample-data-jpa/pom.xml
	spring-boot-samples/spring-boot-sample-data-mongodb/pom.xml
	spring-boot-samples/spring-boot-sample-data-redis/pom.xml
	spring-boot-samples/spring-boot-sample-data-rest/pom.xml
	spring-boot-samples/spring-boot-sample-data-solr/pom.xml
	spring-boot-samples/spring-boot-sample-flyway/pom.xml
	spring-boot-samples/spring-boot-sample-hornetq/pom.xml
	spring-boot-samples/spring-boot-sample-integration/pom.xml
	spring-boot-samples/spring-boot-sample-jetty/pom.xml
	spring-boot-samples/spring-boot-sample-liquibase/pom.xml
	spring-boot-samples/spring-boot-sample-parent-context/pom.xml
	spring-boot-samples/spring-boot-sample-profile/build.gradle
	spring-boot-samples/spring-boot-sample-profile/pom.xml
	spring-boot-samples/spring-boot-sample-secure/pom.xml
	spring-boot-samples/spring-boot-sample-servlet/pom.xml
	spring-boot-samples/spring-boot-sample-simple/build.gradle
	spring-boot-samples/spring-boot-sample-simple/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-jsp/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-multi-connectors/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-ssl/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat/pom.xml
	spring-boot-samples/spring-boot-sample-traditional/pom.xml
	spring-boot-samples/spring-boot-sample-velocity/pom.xml
	spring-boot-samples/spring-boot-sample-web-freemarker/pom.xml
	spring-boot-samples/spring-boot-sample-web-groovy-templates/pom.xml
	spring-boot-samples/spring-boot-sample-web-jsp/pom.xml
	spring-boot-samples/spring-boot-sample-web-method-security/pom.xml
	spring-boot-samples/spring-boot-sample-web-secure-custom/pom.xml
	spring-boot-samples/spring-boot-sample-web-secure-jdbc/pom.xml
	spring-boot-samples/spring-boot-sample-web-secure/pom.xml
	spring-boot-samples/spring-boot-sample-web-static/build.gradle
	spring-boot-samples/spring-boot-sample-web-static/pom.xml
	spring-boot-samples/spring-boot-sample-web-ui/build.gradle
	spring-boot-samples/spring-boot-sample-web-ui/pom.xml
	spring-boot-samples/spring-boot-sample-web-velocity/pom.xml
	spring-boot-samples/spring-boot-sample-websocket/pom.xml
	spring-boot-samples/spring-boot-sample-ws/pom.xml
	spring-boot-samples/spring-boot-sample-xml/pom.xml
	spring-boot-starters/pom.xml
	spring-boot-starters/spring-boot-starter-actuator/pom.xml
	spring-boot-starters/spring-boot-starter-amqp/pom.xml
	spring-boot-starters/spring-boot-starter-aop/pom.xml
	spring-boot-starters/spring-boot-starter-batch/pom.xml
	spring-boot-starters/spring-boot-starter-data-elasticsearch/pom.xml
	spring-boot-starters/spring-boot-starter-data-gemfire/pom.xml
	spring-boot-starters/spring-boot-starter-data-jpa/pom.xml
	spring-boot-starters/spring-boot-starter-data-mongodb/pom.xml
	spring-boot-starters/spring-boot-starter-data-rest/pom.xml
	spring-boot-starters/spring-boot-starter-data-solr/pom.xml
	spring-boot-starters/spring-boot-starter-freemarker/pom.xml
	spring-boot-starters/spring-boot-starter-groovy-templates/pom.xml
	spring-boot-starters/spring-boot-starter-hornetq/pom.xml
	spring-boot-starters/spring-boot-starter-integration/pom.xml
	spring-boot-starters/spring-boot-starter-jdbc/pom.xml
	spring-boot-starters/spring-boot-starter-jetty/pom.xml
	spring-boot-starters/spring-boot-starter-log4j/pom.xml
	spring-boot-starters/spring-boot-starter-logging/pom.xml
	spring-boot-starters/spring-boot-starter-mobile/pom.xml
	spring-boot-starters/spring-boot-starter-parent/pom.xml
	spring-boot-starters/spring-boot-starter-redis/pom.xml
	spring-boot-starters/spring-boot-starter-remote-shell/pom.xml
	spring-boot-starters/spring-boot-starter-security/pom.xml
	spring-boot-starters/spring-boot-starter-social-facebook/pom.xml
	spring-boot-starters/spring-boot-starter-social-linkedin/pom.xml
	spring-boot-starters/spring-boot-starter-social-twitter/pom.xml
	spring-boot-starters/spring-boot-starter-test/pom.xml
	spring-boot-starters/spring-boot-starter-thymeleaf/pom.xml
	spring-boot-starters/spring-boot-starter-tomcat/pom.xml
	spring-boot-starters/spring-boot-starter-velocity/pom.xml
	spring-boot-starters/spring-boot-starter-web/pom.xml
	spring-boot-starters/spring-boot-starter-websocket/pom.xml
	spring-boot-starters/spring-boot-starter-ws/pom.xml
	spring-boot-starters/spring-boot-starter/pom.xml
	spring-boot-tools/pom.xml
	spring-boot-tools/spring-boot-dependency-tools/pom.xml
	spring-boot-tools/spring-boot-gradle-plugin/pom.xml
	spring-boot-tools/spring-boot-loader-tools/pom.xml
	spring-boot-tools/spring-boot-loader/pom.xml
	spring-boot-tools/spring-boot-maven-plugin/pom.xml
	spring-boot-versions/pom.xml
	spring-boot/pom.xml
10 years ago
Phillip Webb 3a9d6242ea Sync up versions used in Maven integration tests
Fixes gh-1797
10 years ago
Spring Buildmaster 46b7738334 Next development version 10 years ago
David Turanski c12ffe76be Add "include filter" support for the Maven plugin
Update AbstractDependencyFilterMojo to support include filters as
well as exclude filters.

Fixes gh-1824
10 years ago
David Liu 9bf1c89750 Add fork option for mvn spring-boot:run
Update RunMojo to include a `fork` option and change the default
to only fork if agent or jvmArguments are specified.

Fixes gh-1412
10 years ago
Spring Buildmaster 3e71a21b30 Next development version 10 years ago
Spring Buildmaster edb4b7ed7d Next development version 10 years ago
Spring Buildmaster d63e4b4329 Next development version 10 years ago
Phillip Webb 6f62fc854b Merge branch '1.1.x' 10 years ago
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
10 years ago
Stephane Nicoll a98c7613bf Merge branch '1.1.x' 10 years ago
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
10 years ago
Phillip Webb 0dc389f5b3 1.Z -> 1.2 10 years ago
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
10 years ago
Spring Buildmaster 74d0c5185a Next development version 10 years ago
Stephane Nicoll 249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 11 years ago
Spring Buildmaster 40327e1ae6 Next development version 11 years ago
Phillip Webb fa88c481a5 Remote trailing whitespace 11 years ago
Spring Buildmaster 981669b7c0 Next development version 11 years ago
Phillip Webb 200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
11 years ago
Spring Buildmaster 67189477fe Next development version 11 years ago
Spring Buildmaster 542f3cbda8 Next development version 11 years ago
Phillip Webb f30b962ff9 Add support for unpacking nested JARs
Update the executable JAR code to automatically unpack any entries
which include an entry comment starting `UNPACK:` to the temp folder.
The existing Maven and Gradle plugins have been updated with new
configuration options and the `spring-boot-tools` project has been
updated to write the appropriate entry comment based on a flag passed
in via the `Library` class.

This support has been added to allow libraries such a JRuby (which
assumes that `jruby-complete.jar` is always accessible as file) to work
with Spring Boot executable jars.

Fixes gh-1070
11 years ago
Phillip Webb 5f8fbfd73a Add Library abstraction
Add a Library class update the LibraryCallback interface and
implementations to use it. This change is in preparation for
an addition `unpack` flag that will be required to allow the
automatic unpacking of certain nested jars.

See gh-1070
11 years ago
Spring Buildmaster 4ca26a21dc Next development version 11 years ago
Spring Buildmaster 05ed7b3bcd Next development version 11 years ago
Phillip Webb 3007a777d0 Roll back to 1.1.0.BUILD-SNAPSHOT 11 years ago
Spring Buildmaster c650f2391e Next development version 11 years ago
Phillip Webb d4d3ffa93c Unify versions in POMs started by the invoker
Unify the versions used in integration tests launched by the
maven-invoker-plugin. Allows for already cached local copies to be
used, hopefully speeding up the build.
11 years ago
Phillip Webb 8bcda1bcbe Polish 11 years ago
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
11 years ago
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
11 years ago
Phillip Webb 01fcf61140 Polish 11 years ago
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
11 years ago
Shawn Clark 4021ad43f7 Fix wrong closing tag
Fixes gh-874
11 years ago
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
11 years ago
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
11 years ago
Phillip Webb 32d2fc25c7 Polish 11 years ago
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
11 years ago
Stephane Nicoll a0166076e0 Fix wrong import 11 years ago
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
11 years ago
Phillip Webb 34b7bb20fd Add maven implicit plugin group ID
Add previously implicit <groupId>org.apache.maven.plugins</groupId>
to plugin declarations.
11 years ago
Phillip Webb 7f41dbd677 Resore code formatting 11 years ago
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
11 years ago
Dave Syer 1b7d8d9ade Add SignalUtils to handle OS interrupts
Extract into a utility to be shared between Shell and RunMojo

Fixes gh-773
11 years ago
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
11 years ago
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
11 years ago
Dave Syer 438cff252d Allow multiple agents to be attached 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 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 2d16c59147 Clarify usage of run.arguments with Maven plugin 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 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
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 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
Spring Buildmaster b0d4e8ae69 Next development version 11 years ago
Spring Buildmaster cb8668a151 Release version 1.0.0.RC4 11 years ago
Phillip Webb b69c659d8f Polish 11 years ago
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
11 years ago
Spring Buildmaster 1367d57e8c Next development version 11 years ago
Spring Buildmaster eaff1677a7 Release version 1.0.0.RC3 11 years ago
Phillip Webb 5e7d6e608d Update copyright header 11 years ago
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
11 years ago
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
11 years ago
Dave Syer aef7bd60d1 Add layout docs to plugin READMEs 11 years ago
Phillip Webb 43e54d38f7 Make fields private where possible 11 years ago
Phillip Webb 0160760568 Apply latest eclipse cleanup rules 11 years ago
Phillip Webb 853b0a8027 Fix some maven warnings 11 years ago
Phillip Webb 72dc09cb56 Strip trailing whitespace 11 years ago
Dave Syer 2dc4c291ff Add some clarifications to maven plugin README
Fixes gh-246
11 years ago
Phillip Webb 68293f34af Upgrade version to 1.0.0.BUILD-SNAPSHOT
Fixes fg-243
11 years ago
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
11 years ago
Dave Syer 8fe696944a Delete duplicate logback.xml if running from Maven plugin
Fixes gh-143
11 years ago
Dave Syer c0bcb5e8e9 Add layout=NONE to packaging tools 11 years ago
Phillip Webb 883fd9162f Polish 11 years ago
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.
11 years ago
Phillip Webb a9c9c383f4 Polish pom.xml
Aplly consistent formatting, drop JDK 8 support and cleanup repo
locations to use spring.io.
11 years ago
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)
11 years ago
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.
11 years ago
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.
11 years ago
Dave Syer fede0d1c98 Add profiles to /env 11 years ago
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
11 years ago
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
11 years ago
Dave Syer d4d9ebcabd Small re-org of PropertiesLauncher 11 years ago
Dave Syer 281c650251 Add git commit id to MANIFEST in boot tools repackager 11 years ago
Phillip Webb fd9e258d12 Replace 'springsource.org' with 'spring.io'
Replace all references to 'springsource.org' with the new 'spring.io'
domain.
11 years ago
Dave Syer 38e565e920 Back to SNAPSHOT for dev 11 years ago
Dave Syer b634b3bde6 Update to 0.5.0.M2 11 years ago
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.
11 years ago
Phillip Webb e6d9922cbc Stream maven-invoker-plugin logs 11 years ago
Phillip Webb 878ff13620 Documentation updates 11 years ago
Phillip Webb 4e11ae1671 Documentation
Various updates to README.md files.
11 years ago
Dave Syer 413658fbca Change parent for tools poms 11 years ago
Dave Syer 4bb5de02e7 Switch back to SNAPSHOT for dev 11 years ago
Dave Syer 19a880dff6 Move tools modules under spring-boot-tools 11 years ago