我们的任务与 Maven Profile 激活问题有关,即
Problem Statement Problem Statement 1
在这方面,我们编写的代码如下,这似乎是不正确的。需要专业知识建议我们做错了什么-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fresco.play</groupId>
<artifactId>maven-profile-explicit</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>maven-profile-explicit</name>
<profiles>
<profile>
<id>dev</id>
<properties>
<db.env>DEV</db.env>
<db.url>jdbc:mysql://localhost:3306/dev</db.url>
<db.username>devuser</db.username>
<db.password>devpwd</db.password>
</properties>
</profile>
<profile>
<id>qa</id>
<properties>
<db.env>QA</db.env>
<db.url>jdbc:mysql://serv01:3306/qa</db.url>
<db.username>qauser</db.username>
<db.password>qapwd</db.password>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<db.env>PROD</db.env>
<db.url>jdbc:mysql://live01:3306/prod</db.url>
<db.username>produser</db.username>
<db.password>******</db.password>
</properties>
</profile>
</profiles>
</project>