|
|
@ -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 SPRING_LOADED_AGENT_CLASSNAME = "org.springsource.loaded.agent.SpringLoadedAgent";
|
|
|
|
|
|
|
|
|
|
|
|
private static final String ACTIVE_PROFILES_PROPERTY = "spring.profiles.active";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The Maven project.
|
|
|
|
* The Maven project.
|
|
|
|
* @since 1.0
|
|
|
|
* @since 1.0
|
|
|
@ -104,8 +102,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The spring profiles to activate. Convenience shortcut of specifying the
|
|
|
|
* The spring profiles to activate. Convenience shortcut of specifying the
|
|
|
|
* 'spring.profiles.active' argument. On command line use commas to separate
|
|
|
|
* 'spring.profiles.active' argument. On command line use commas to separate multiple
|
|
|
|
* multiple profiles.
|
|
|
|
* profiles.
|
|
|
|
* @since 1.3
|
|
|
|
* @since 1.3
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Parameter(property = "run.profiles")
|
|
|
|
@Parameter(property = "run.profiles")
|
|
|
@ -289,15 +287,14 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
|
|
|
|
|
|
|
|
|
|
|
|
private void addActiveProfileArgument(RunArguments arguments) {
|
|
|
|
private void addActiveProfileArgument(RunArguments arguments) {
|
|
|
|
if (this.profiles.length > 0) {
|
|
|
|
if (this.profiles.length > 0) {
|
|
|
|
StringBuilder sb = new StringBuilder("--")
|
|
|
|
StringBuilder arg = new StringBuilder("--spring.profiles.active=");
|
|
|
|
.append(ACTIVE_PROFILES_PROPERTY).append("=");
|
|
|
|
|
|
|
|
for (int i = 0; i < this.profiles.length; i++) {
|
|
|
|
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) {
|
|
|
|
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);
|
|
|
|
logArguments("Active profile(s): ", this.profiles);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|