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
93ceb980
Commit
93ceb980
authored
Jul 19, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recommend against using compileOnly in favour of providedRuntime
Closes gh-5461
parent
409f1601
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
build-tool-plugins.adoc
spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc
+2
-6
howto.adoc
spring-boot-docs/src/main/asciidoc/howto.adoc
+5
-0
No files found.
spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc
View file @
93ceb980
...
...
@@ -267,8 +267,8 @@ To build and run a project artifact, you can type the following:
----
To build a war file that is both executable and deployable into an external container,
you need to mark the embedded container dependencies as belonging to
a configuration
named "`providedRuntime`", e.g
:
you need to mark the embedded container dependencies as belonging to
the war plugin'
s
`
providedRuntime
`
configuration
,
e
.
g
.
:
[
source
,
groovy
,
indent
=
0
,
subs
=
"verbatim,attributes"
]
----
...
...
@@ -285,10 +285,6 @@ named "`providedRuntime`", e.g:
maven
{
url
"http://repo.spring.io/libs-snapshot"
}
}
configurations {
providedRuntime
}
dependencies
{
compile
(
"org.springframework.boot:spring-boot-starter-web"
)
providedRuntime
(
"org.springframework.boot:spring-boot-starter-tomcat"
)
...
...
spring-boot-docs/src/main/asciidoc/howto.adoc
View file @
93ceb980
...
...
@@ -2917,6 +2917,11 @@ And if you're using Gradle:
}
----
NOTE: If you are using a version of Gradle that supports compile only dependencies (2.12
or later), you should continue to use `providedRuntime`. Among other limitations,
`compileOnly` dependencies are not on the test classpath so any web-based integration
tests will fail.
If you're using the <<build-tool-plugins.adoc#build-tool-plugins, Spring Boot build tools>>,
marking the embedded servlet container dependency as provided will produce an executable war
file with the provided dependencies packaged in a `lib-provided` directory. This means
...
...
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