maven实战

<settings>
	<!--<localRepository>D:/maven-2.2.1/.m2/repository</localRepository>-->
	<proxies>
		<proxy>
			<id>normal</id>
			<active>true</active>
			<protocol>http</protocol>
			<username>congmin.jin</username>
			<password>123456</password>
			<host>nexus.tech.2caipiao.com/</host>
			<port>80</port>
			<nonProxyHosts>nexus.tech.2caipiao.com</nonProxyHosts>
		</proxy>
	</proxies>
	<mirrors>
		<mirror>
			<!--This is used to direct the public snapshots repo in the profile below 
				over to a different nexus group -->
			<id>nexus-public-snapshots</id>
			<mirrorOf>public-snapshots</mirrorOf>
			<url>http://nexus.tech.2caipiao.com/content/groups/public-snapshots
			</url>
		</mirror>
		<mirror>
			<!--This sends everything else to /public -->
			<id>nexus</id>
			<mirrorOf>*</mirrorOf>
			<url>http://nexus.tech.2caipiao.com/content/groups/public</url>
		</mirror>
	</mirrors>
	<profiles>
		<profile>
			<id>development</id>
			<repositories>
				<repository>
					<id>central</id>
					<url>http://central</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>central</id>
					<url>http://central</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
		<profile>
			<!--this profile will allow snapshots to be searched when activated -->
			<id>public-snapshots</id>
			<repositories>
				<repository>
					<id>public-snapshots</id>
					<url>http://public-snapshots</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>public-snapshots</id>
					<url>http://public-snapshots</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>development</activeProfile>
	</activeProfiles>
	<servers>
		<server>
			<id>Releases</id>
			<username>congmin.jin</username>
			<password>123456</password>
		</server>
		<server>
			<id>Snapshots</id>
			<username>deployment</username>
			<password>deploydv89</password>
		</server>
		<server>
			<id>thirdparty</id>
			<username>congmin.jin</username>
			<password>123456</password>
		</server>
		<server>
            <id>tomcat-66-16</id>
			<username>admin</username>
			<password>aa123123</password>
		</server>
		<server>
            <id>tomcat-localhost</id>
			<username>admin</username>
			<password>aa123123</password>
		</server>
	</servers>
</settings>


<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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.xxx.moneygateway</groupId>
	<artifactId>moneygateway-rootpom</artifactId>
	<version>1.0-SNAPSHOT</version>
	<packaging>pom</packaging>
	<name>moneygateway-rootpom</name>
	<modules>
		<module>moneygateway-common</module>
		<module>moneygateway-client</module>
		<module>moneygateway-server</module>
	</modules>
</project>



<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
		<groupId>com.xxx.maven</groupId>
		<artifactId>parentpom-jar</artifactId>
		<version>1.0.0-SNAPSHOT</version>
  </parent>
  <groupId>com.xxx.moneygateway</groupId>
  <artifactId>moneygateway-common</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <name>Moneygateway-common for The Moneygateway project</name>
  <description>提款银行公用包</description>
  
  <dependencies>
  		<dependency>
			<groupId>com.xxx.coreservice</groupId>
			<artifactId>coreservice-common</artifactId>
			<version>1.3.0-SNAPSHOT</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-asm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.objectweb</groupId>
                    <artifactId>asm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-commons-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-jdbc</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-tx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-orm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-context</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </exclusion>
            </exclusions>
		</dependency>
  </dependencies>
</project>


<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
		<groupId>com.xxx.maven</groupId>
		<artifactId>parentpom-jar</artifactId>
		<version>1.0.0-SNAPSHOT</version>
  </parent>
  <groupId>com.xxx.moneygateway</groupId>
  <artifactId>moneygateway-common</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <name>Moneygateway-common for The Moneygateway project</name>
  <description>提款银行公用包</description>
  
  <dependencies>
  		<dependency>
			<groupId>com.xxx.coreservice</groupId>
			<artifactId>coreservice-common</artifactId>
			<version>1.3.0-SNAPSHOT</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-asm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.objectweb</groupId>
                    <artifactId>asm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-commons-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-jdbc</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-tx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-orm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-context</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </exclusion>
            </exclusions>
		</dependency>
  </dependencies>
</project>


<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">
  <modelVersion>4.0.0</modelVersion>
 <parent>
		<groupId>com.xxx.maven</groupId>
		<artifactId>parentpom-jar</artifactId>
		<version>1.0.0-SNAPSHOT</version>
  </parent>
  <groupId>com.xxx.moneygateway</groupId>
  <artifactId>moneygateway-client</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <name>client for moneygatewayservice</name>
  <description>client for moneygatewayservice</description>
  
   <properties>
        <spring.version>3.2.3.RELEASE</spring.version>
   </properties>
  
  	<build>
		<finalName>moneygateway</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12.3</version>
				<configuration>
					<!-- 防止testng的干扰 -->
					<testNGArtifactName>none:none</testNGArtifactName>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
	
  <dependencies>
  	<dependency>
       <groupId>com.xxx.moneygateway</groupId>
       <artifactId>moneygateway-common</artifactId>
       <version>1.0.0-SNAPSHOT</version>
   </dependency>
    <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
			<groupId>com.xxx.memcachedclient</groupId>
			<artifactId>xxx-memcachedclient</artifactId>
			<version>2.0.0-SNAPSHOT</version>
		</dependency>
        <dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
  </dependencies>
</project>

<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.xxx.maven</groupId>
		<artifactId>parentpom-war</artifactId>
		<version>1.0.0-SNAPSHOT</version>
	</parent>

	<groupId>com.xxx.moneygateway</groupId>
	<artifactId>moneygateway-server</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>war</packaging>
	<name>moneygateway-server Maven Webapp</name>

	<properties>
		<spring.version>3.2.3.RELEASE</spring.version>
	</properties>

	<profiles>
		<profile>
			<id>product</id>
			<dependencies>
				<dependency>
					<groupId>com.xxx.passwordencrypt</groupId>
					<artifactId>xxx-passwordencrypt</artifactId>
					<version>2.0.1</version>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

	<build>
		<finalName>moneygateway</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12.3</version>
				<configuration>
					<!-- 防止testng的干扰 -->
					<testNGArtifactName>none:none</testNGArtifactName>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>com.xxxpiao</groupId>
			<artifactId>tiger-commons</artifactId>
			<version>1.2.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>com.xxx.coreservice</groupId>
			<artifactId>coreservice-client</artifactId>
			<version>1.3.1-SNAPSHOT</version>
		</dependency>
		<dependency>
		  <groupId>com.xxx.payment</groupId>
		  <artifactId>payment-client</artifactId>
		  <version>1.0.2-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>com.xxx.moneygateway</groupId>
			<artifactId>moneygateway-common</artifactId>
			<version>1.0.0-SNAPSHOT</version>
		</dependency>
		
		<dependency>
			<groupId>com.xxx.datachange</groupId>
			<artifactId>xxx-datachange-client</artifactId>
			<version>1.0.0-SNAPSHOT</version>
		</dependency>		
		
		<!-- spring jar -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jms</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aspects</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-tx</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<!-- 以下spring未必需要,但可将同一版本提升 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId><!-- 还有个hibernate悲观锁的异常类用到 -->
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-oxm</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>com.xxx.springutil</groupId>
			<artifactId>xxx-springutil</artifactId>
			<version>1.0.0-SNAPSHOT</version>
		</dependency>

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
			<version>0.2.5</version>
		</dependency>

		<dependency>
			<groupId>quartz</groupId>
			<artifactId>quartz</artifactId>
			<version>1.5.2</version>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>

		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.5</version>
		</dependency>

		<!-- test -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.xxx.unit</groupId>
			<artifactId>xxx-unitutil</artifactId>
			<version>1.0.0-SNAPSHOT</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-dbutils</groupId>
			<artifactId>commons-dbutils</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>6.8.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jmock</groupId>
			<artifactId>jmock</artifactId>
			<version>2.6.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>1.9.5</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

</project>

你可能感兴趣的:(maven,pom,setting)