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
03d54fa1
Commit
03d54fa1
authored
Oct 15, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
4eefd92e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
AbstractRunMojo.java
.../java/org/springframework/boot/maven/AbstractRunMojo.java
+6
-9
No files found.
spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java
View file @
03d54fa1
...
...
@@ -53,8 +53,6 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
private
static
final
String
SPRING_LOADED_AGENT_CLASSNAME
=
"org.springsource.loaded.agent.SpringLoadedAgent"
;
private
static
final
String
ACTIVE_PROFILES_PROPERTY
=
"spring.profiles.active"
;
/**
* The Maven project.
* @since 1.0
...
...
@@ -104,8 +102,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* The spring profiles to activate. Convenience shortcut of specifying the
* 'spring.profiles.active' argument. On command line use commas to separate
*
multiple
profiles.
* 'spring.profiles.active' argument. On command line use commas to separate
multiple
* profiles.
* @since 1.3
*/
@Parameter
(
property
=
"run.profiles"
)
...
...
@@ -289,15 +287,14 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
private
void
addActiveProfileArgument
(
RunArguments
arguments
)
{
if
(
this
.
profiles
.
length
>
0
)
{
StringBuilder
sb
=
new
StringBuilder
(
"--"
)
.
append
(
ACTIVE_PROFILES_PROPERTY
).
append
(
"="
);
StringBuilder
arg
=
new
StringBuilder
(
"--spring.profiles.active="
);
for
(
int
i
=
0
;
i
<
this
.
profiles
.
length
;
i
++)
{
sb
.
append
(
this
.
profiles
[
i
]);
arg
.
append
(
this
.
profiles
[
i
]);
if
(
i
<
this
.
profiles
.
length
-
1
)
{
sb
.
append
(
","
);
arg
.
append
(
","
);
}
}
arguments
.
getArgs
().
addFirst
(
sb
.
toString
());
arguments
.
getArgs
().
addFirst
(
arg
.
toString
());
logArguments
(
"Active profile(s): "
,
this
.
profiles
);
}
}
...
...
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