Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
2dc4c291
Commit
2dc4c291
authored
Jan 21, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some clarifications to maven plugin README
Fixes gh-246
parent
02f6814d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
11 deletions
+37
-11
application.yml
docs/application.yml
+10
-5
README.md
spring-boot-tools/spring-boot-maven-plugin/README.md
+27
-6
No files found.
docs/application.yml
View file @
2dc4c291
...
...
@@ -59,7 +59,6 @@ spring:
test-on-return
validation-query
jpa
:
open-in-view
:
show-sql
:
...
...
@@ -71,14 +70,16 @@ spring:
cache-provider
:
ddl-auto
:
thymeleaf
thymeleaf
:
prefix
:
classpath:/templates/
suffix
:
.html
mode
:
HTML5
cache
:
true
view
:
prefix
:
suffix
:
# actuator
...
...
@@ -94,7 +95,11 @@ endpoints:
shutdown
trace
# (ManagementServerProperties)
management
:
port
port
:
# (SecurityProperties)
security
:
basic
:
enabled
:
true
\ No newline at end of file
spring-boot-tools/spring-boot-maven-plugin/README.md
View file @
2dc4c291
# Spring Boot - Maven Plugin
The Spring Boot Maven Plugin provides Spring Boot support in Maven, allowing you to
package executable jar or war archives and run an application in-place.
# Spring Boot - Maven Plugin
The Spring Boot Maven Plugin provides Spring Boot support in Maven,
allowing you to package executable jar or war archives and run an
application in-place. To use it you must be using Maven 3 (or better).
## Including the plugin
To use the Spring Boot Maven Plugin simply include the appropriate XML in the
`plugins`
...
...
@@ -16,12 +18,12 @@ section of your `pom.xml`
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-
package
-maven-plugin
</artifactId>
<artifactId>
spring-
boot
-maven-plugin
</artifactId>
<version>
{{project.version}}
</version>
<executions>
<execution>
<goals>
<goal>
package
</goal>
<goal>
re
package
</goal>
</goals>
</execution>
</executions>
...
...
@@ -31,6 +33,25 @@ section of your `pom.xml`
</project>
```
This configuration will repackage a JAR or WAR that is built in the
"package" phase of the Maven lifecycle, so
```
$ mvn package
$ ls target/*.jar
target/myproject-1.0.0.jar target/myproject-1.0.0.jar.original
```
will reveal the result. If you don't include the
`<execution/>`
configuration as above you can run the plugin on its own, but only if
the package goal is used as well, e.g.
```
$ mvn package spring-boot:repackage
```
will have the same effect as above.
If you are using a milestone or snapshot release you will also need to add appropriate
`pluginRepository`
elements:
...
...
@@ -48,7 +69,7 @@ If you are using a milestone or snapshot release you will also need to add appro
```
## Packaging executable jar and war files
Once
`spring-
package
-maven-plugin`
has been included in your
`pom.xml`
it will
Once
`spring-
boot
-maven-plugin`
has been included in your
`pom.xml`
it will
automatically attempt to rewrite archives to make them executable using the
`spring-boot:repackage`
goal. You should configure your project to build a jar or war
(as appropriate) using the usual
`packaging`
element:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment