我创建了两个Maven的轮廓,因为我想部署我的应用程序的Heroku,所以我有一个轮廓开发与位于我的电脑数据库性能,并督促与Heroku的DB属性.POM.xml如下
<modelVersion>4.0.0</modelVersion>
<groupId>com.phone-book</groupId>
<artifactId>phone-book</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>controller</module>
<module>dao</module>
<module>model</module>
<module>service</module>
</modules>
<name>Phonebook web app</name>
<build>
<filters>
<filter>profiles/${build.profile.id}/config.properties </filter>
</filters>
<resources>
<resource>
<filtering>true</filtering>
<directory>controller/src/main/webapp/WEB-INF/spring</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.github.jsimone</groupId>
<artifactId>webapp-runner</artifactId>
<version>8.0.30.2</version>
<destFileName>webapp-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>prod</id>
<properties>
<build.profile.id>prod</build.profile.id>
</properties>
</profile>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<build.profile.id>dev</build.profile.id>
</properties>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
我在包含文件夹 …