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
51936e1a
Commit
51936e1a
authored
Dec 31, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename "agent" to "agents" to properly indicate its type
Closes gh-15455
parent
960d375f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
AbstractRunMojo.java
.../java/org/springframework/boot/maven/AbstractRunMojo.java
+20
-4
No files found.
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java
View file @
51936e1a
...
...
@@ -78,10 +78,19 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* Path to agent jar. NOTE: the use of agents means that processes will be started by
* forking a new JVM.
* @since 1.0
* @deprecated since version 2.2. Use agents instead.
*/
@Parameter
(
property
=
"spring-boot.run.agent"
)
private
File
[]
agent
;
/**
* Path to agent jars. NOTE: the use of agents means that processes will be started by
* forking a new JVM.
* @since 2.2
*/
@Parameter
(
property
=
"spring-boot.run.agents"
)
private
File
[]
agents
;
/**
* Flag to say that the agent requires -noverify.
* @since 1.0
...
...
@@ -218,7 +227,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
}
private
boolean
hasAgent
()
{
return
(
this
.
agent
!=
null
&&
this
.
agent
.
length
>
0
);
File
[]
configuredAgents
=
determineAgents
();
return
(
configuredAgents
!=
null
&&
configuredAgents
.
length
>
0
);
}
private
boolean
hasJvmArgs
()
{
...
...
@@ -360,11 +370,12 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
}
private
void
addAgents
(
List
<
String
>
args
)
{
if
(
this
.
agent
!=
null
)
{
File
[]
configuredAgents
=
determineAgents
();
if
(
configuredAgents
!=
null
)
{
if
(
getLog
().
isInfoEnabled
())
{
getLog
().
info
(
"Attaching agents: "
+
Arrays
.
asList
(
this
.
agent
));
getLog
().
info
(
"Attaching agents: "
+
Arrays
.
asList
(
configuredAgents
));
}
for
(
File
agent
:
this
.
agent
)
{
for
(
File
agent
:
configuredAgents
)
{
args
.
add
(
"-javaagent:"
+
agent
);
}
}
...
...
@@ -373,6 +384,11 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
}
}
@SuppressWarnings
(
"deprecation"
)
private
File
[]
determineAgents
()
{
return
(
this
.
agents
!=
null
)
?
this
.
agents
:
this
.
agent
;
}
private
void
addActiveProfileArgument
(
RunArguments
arguments
)
{
if
(
this
.
profiles
.
length
>
0
)
{
StringBuilder
arg
=
new
StringBuilder
(
"--spring.profiles.active="
);
...
...
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