48 lines
928 B
Plaintext
48 lines
928 B
Plaintext
-----
|
|
Specify active profiles
|
|
-----
|
|
Stephane Nicoll
|
|
-----
|
|
2014-07-07
|
|
-----
|
|
|
|
The active profiles to use for a particular application can be specified using the <<<profiles>>>
|
|
argument. The following configuration enables the foo and bar profiles:
|
|
|
|
---
|
|
<project>
|
|
...
|
|
<build>
|
|
...
|
|
<plugins>
|
|
...
|
|
<plugin>
|
|
<groupId>${project.groupId}</groupId>
|
|
<artifactId>${project.artifactId}</artifactId>
|
|
<version>${project.version}</version>
|
|
<configuration>
|
|
<profiles>
|
|
<profile>foo</profile>
|
|
<profile>bar</profile>
|
|
</profiles>
|
|
</configuration>
|
|
...
|
|
</plugin>
|
|
...
|
|
</plugins>
|
|
...
|
|
</build>
|
|
...
|
|
</project>
|
|
---
|
|
|
|
The profiles to enable can be specified on the command line as well, make sure to separate them with
|
|
a comma, that is:
|
|
|
|
---
|
|
mvn spring-boot:run -Dspring-boot.run.profiles=foo,bar
|
|
---
|
|
|
|
|
|
|