123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- <?xml version="1.0" encoding="UTF-8"?>
- <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/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>xchat</artifactId>
- <groupId>com.xchat</groupId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>xchat-oauth2-web</artifactId>
- <packaging>war</packaging>
- <name>xchat-oauth2-web</name>
- <dependencies>
- <dependency>
- <groupId>com.xchat</groupId>
- <artifactId>xchat-oauth2-service</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>com.xchat</groupId>
- <artifactId>xchat-common</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </dependency>
- <!-- provided dependency -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
- <dependency>
- <groupId>org.jsoup</groupId>
- <artifactId>jsoup</artifactId>
- <version>1.10.2</version>
- </dependency>
- <dependency>
- <groupId>com.xchat</groupId>
- <artifactId>xchat-oauth2-service</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.1.0</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.1.0</version>
- </dependency>
- </dependencies>
- <build>
- <finalName>ROOT</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <warName>ROOT</warName>
- </configuration>
- </plugin>
- <!-- jetty, set context path and spring profile -->
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <configuration>
- <!--热部署时间秒-->
- <reload>automatic</reload>
- <scanIntervalSeconds>3</scanIntervalSeconds>
- <systemProperties>
- <systemProperty>
- <name>spring.profiles.active</name>
- <value>development</value>
- </systemProperty>
- </systemProperties>
- <useTestClasspath>true</useTestClasspath>
- <connectors>
- <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
- <port>8081</port>
- <maxIdleTime>60000</maxIdleTime>
- </connector>
- </connectors>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <!-- 生产用的profile -->
- <profile>
- <id>test</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <warName>ROOT</warName>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>replace-test-settings</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <echo message="--------------------------------------"/>
- <echo message="开始替换测试环境文件"/>
- <echo message="--------------------------------------"/>
- <tstamp>
- <format property="releaseVersion" pattern="yyyyMMddHHmm"/>
- </tstamp>
- <!-- 替换logback.xml文件 -->
- <delete file="${project.build.outputDirectory}/logback.xml"/>
- <copy file="src/main/resources/test/logback.xml"
- tofile="${project.build.outputDirectory}/logback.xml"/>
- <delete file="${project.build.outputDirectory}/application-oauth2-web.properties"/>
- <copy file="src/main/resources/test/application-oauth2-web.properties"
- tofile="${project.build.outputDirectory}/application-oauth2-web.properties"/>
- <echo message="--------------------------------------"/>
- <echo message="完成替换测试环境文件"/>
- <echo message="--------------------------------------"/>
- </target>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>com.jcraft</groupId>
- <artifactId>jsch</artifactId>
- <version>0.1.50</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-jsch</artifactId>
- <version>1.8.2</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- </profile>
- <!-- 生产用的profile -->
- <profile>
- <id>prod</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <warName>ROOT</warName>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>replace-prod-settings</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <echo message="--------------------------------------"/>
- <echo message="开始替换生产环境文件"/>
- <echo message="--------------------------------------"/>
- <tstamp>
- <format property="releaseVersion" pattern="yyyyMMddHHmm"/>
- </tstamp>
- <!-- 替换logback.xml文件 -->
- <delete file="${project.build.outputDirectory}/logback.xml"/>
- <copy file="src/main/resources/prod/logback.xml"
- tofile="${project.build.outputDirectory}/logback.xml"/>
- <delete file="${project.build.outputDirectory}/application-oauth2-web.properties"/>
- <copy file="src/main/resources/prod/application-oauth2-web.properties"
- tofile="${project.build.outputDirectory}/application-oauth2-web.properties"/>
- <echo message="--------------------------------------"/>
- <echo message="完成替换生产环境文件"/>
- <echo message="--------------------------------------"/>
- </target>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>com.jcraft</groupId>
- <artifactId>jsch</artifactId>
- <version>0.1.50</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-jsch</artifactId>
- <version>1.8.2</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- </project>
|