代码拉取完成,页面将自动刷新
同步操作将从 俗人/demo-maven-profile 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<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.jastar</groupId>
<artifactId>demo-maven-profile</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>demo-maven-profile Maven Webapp</name>
<url>http://www.jastar-wang.com</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<!-- 开发 -->
<profile>
<!-- profile的id -->
<id>dev</id>
<properties>
<!-- 此处的jastar.env可以自定义,其他地方可以使用${jastar.env}来引用此属性 -->
<jastar.env>dev</jastar.env>
</properties>
<activation>
<!-- 默认激活此配置 -->
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 测试 -->
<profile>
<id>test</id>
<properties>
<jastar.env>test</jastar.env>
</properties>
</profile>
<!-- 生产 -->
<profile>
<id>prd</id>
<properties>
<jastar.env>prd</jastar.env>
</properties>
</profile>
</profiles>
<build>
<finalName>demo-maven-profile</finalName>
<plugins>
<!-- 编译插件,此处用来设置jdk的版本,否则默认的版本很低 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- 资源文件处理插件,必须配置 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
<!-- 此处定义变量配置文件地址 -->
<filters>
<filter>src/main/filters/${jastar.env}/log4j.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<!-- 这句配置是关键,表示该资源文件夹下要进行过滤操作 -->
<filtering>true</filtering>
<!-- 其实还可以使用includes标签表示要包含哪些文件 -->
<!-- <includes>
<include>*</include>
</includes> -->
<!-- 也可以使用excludes标签表示要排除哪些文件 -->
<!-- <excludes>
<exclude>*.abc</exclude>
</excludes> -->
</resource>
<resource>
<directory>src/main/filters/${jastar.env}</directory>
</resource>
</resources>
</build>
</project>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。