Skip to content

Commit a7fbfe6

Browse files
committed
Add macros to support Maven focused guides
1 parent a4ad607 commit a7fbfe6

4 files changed

+30
-0
lines changed

build_system_intro_maven.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
:linkattrs:
3+
4+
First you set up a basic build script. You can use any build system you like when building apps with Spring, but the code you need to work with https://maven.apache.org[Maven] is included here. If you're not familiar with Maven, refer to link:/guides/gs/maven[Building Java Projects with Maven].
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:linkattrs:
2+
3+
ifndef::java_version[:java_version: 1.6]
4+
5+
- About 15 minutes
6+
- A favorite text editor or IDE
7+
- http://www.oracle.com/technetwork/java/javase/downloads/index.html[JDK {java_version}] or later
8+
- http://maven.apache.org/download.cgi[Maven 3.0+]
9+
- You can also import the code from this guide as well as view the web page directly into link:/guides/gs/sts[Spring Tool Suite (STS)] and work your way through it from there.

run_the_application_with_maven.adoc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:link_attrs:
2+
3+
ifndef::module[:module: service]
4+
5+
== Run the {module}
6+
Run your {module} at the command line:
7+
8+
[subs="attributes", role="has-copy-button"]
9+
....
10+
mvn spring-boot:run
11+
....

spring-boot-maven-plugin.adoc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The https://github.com/spring-projects/spring-boot/tree/master/spring-boot-tools/spring-boot-maven-plugin[Spring Boot Maven plugin] provides many convenient features:
2+
3+
- It collects all the jars on the classpath and builds a single, runnable "über-jar", which makes it more convenient to execute and transport your service.
4+
- It searches for the `public static void main()` method to flag as a runnable class.
5+
- It provides a built-in dependency resolver that sets the version number to match https://github.com/spring-projects/spring-boot/blob/master/spring-boot-dependencies/pom.xml[Spring Boot dependencies]. You can override any version you wish, but it will default to Boot's chosen set of versions.
6+

0 commit comments

Comments
 (0)