<?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.hynnet</groupId>
		<artifactId>hynnet</artifactId>
		<version>1.3.6</version>
	</parent>
	<groupId>com.hynnet</groupId>
	<artifactId>hynnet-test</artifactId>
	<version>${project.version}</version>
	<name>hynnet-test</name>
	<description>Java单元测试相关类库。能帮助进行测试程序的开发。</description>
	<url>http://maven.hynnet.com</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<repositories>
		<repository>
			<id>repository.other.release</id>
			<name>Other Maven Release Repository</name>
			<url>http://dl.systemcn.com/nexus/content/repositories/com.hynnet</url>
		</repository>
		<repository>
			<id>central</id>
			<name>Maven Repository Switchboard</name>
			<url>http://dl.systemcn.com/nexus/content/repositories/central</url>
		</repository>
	</repositories>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>5.0.2.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.mongodb</groupId>
			<artifactId>mongo-java-driver</artifactId>
			<version>3.8.0</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.mongodb</groupId>
			<artifactId>bson</artifactId>
			<version>3.8.0</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.1.0</version>
		</dependency>
		<dependency>
			<groupId>com.hynnet</groupId>
			<artifactId>jdbc-fo</artifactId>
			<version>12.1.0.2</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>1.2.3</version>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.3</version>
		</dependency>
		<dependency>
			<groupId>com.hynnet</groupId>
			<artifactId>hynnet-model</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.mongodb</groupId>
					<artifactId>mongo-java-driver</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.mongodb</groupId>
					<artifactId>bson</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.hynnet</groupId>
			<artifactId>hynnet-appframework</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.mongodb</groupId>
					<artifactId>mongo-java-driver</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.mongodb</groupId>
					<artifactId>bson</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>servlets.com</groupId>
			<artifactId>cos</artifactId>
			<version>05Nov2002</version>
		</dependency>
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
			<version>2.9.0</version>
			<scope>runtime</scope>
		</dependency>
	    <dependency>
			<groupId>org.apache.solr</groupId>
			<artifactId>solr-solrj</artifactId>
			<version>7.4.0</version>
			<scope>runtime</scope>
		</dependency>
	</dependencies>
	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
				<includes>
					<include>**/*.ftl</include>
				</includes>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
					<configuration>
						<excludes>
							<exclude>**/*</exclude>
						</excludes>
						<testExcludes>
							<exclude>**/*</exclude>
						</testExcludes>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<!--
					<execution>
						<id>package</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<echo message="build ..."/>
								<exec dir="./" executable="ant jar" failonerror="true" />
							</tasks>
						</configuration>
					</execution>
					-->
					<execution>
						<id>ant-build</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<echo message="build ${basedir}..."/>
								<!--
								<ant antfile="build.xml" />
								-->
								<echo message="os: ${os.name}"/>
								<exec dir="./" executable="ant.bat" osfamily="Windows" failonerror="true">
									<arg line="-lib ../lib"/>
									<arg line="-f ../build.xml"/>
									<arg line="-Dbasedir=${basedir}"/>
									<arg line="-DartifactId=${project.artifactId}"/>
									<arg line="jar"/>
								</exec>
								<exec dir="./" executable="ant" osfamily="unix" failonerror="true">
									<arg line="-lib ../lib"/>
									<arg line="-f ../build.xml"/>
									<arg line="-Dbasedir=${basedir}"/>
									<arg line="-DartifactId=${project.artifactId}"/>
									<arg line="jar"/>
								</exec>
							</tasks>
						</configuration>
					</execution>
					<execution>
						<id>javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<echo message="build ${basedir}..."/>
								<echo message="os: ${os.name}"/>
								<exec dir="./" executable="ant.bat" osfamily="Windows" failonerror="true">
									<arg line="-lib ../lib"/>
									<arg line="-f ../build.xml"/>
									<arg line="-Dbasedir=${basedir}"/>
									<arg line="-DartifactId=${project.artifactId}"/>
									<arg line="javadoc"/>
								</exec>
								<exec dir="./" executable="ant" osfamily="unix" failonerror="true">
									<arg line="-lib ../lib"/>
									<arg line="-f ../build.xml"/>
									<arg line="-Dbasedir=${basedir}"/>
									<arg line="-DartifactId=${project.artifactId}"/>
									<arg line="javadoc"/>
								</exec>
							</tasks>
						</configuration>
					</execution>
					<execution>
						<id>clean</id>
						<phase>clean</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<echo message="clean ${basedir}..."/>
								<echo message="os: ${os.name}"/>
								<exec dir="./" executable="ant.bat" osfamily="Windows" failonerror="true">
									<arg line="-lib ../lib"/>
									<arg line="-f ../build.xml"/>
									<arg line="-Dbasedir=${basedir}"/>
									<arg line="clean"/>
								</exec>
								<exec dir="./" executable="ant" osfamily="unix" failonerror="true">
									<arg line="-lib ../lib"/>
									<arg line="-f ../build.xml"/>
									<arg line="-Dbasedir=${basedir}"/>
									<arg line="clean"/>
								</exec>
							</tasks>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!--
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.1</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
			-->
			<plugin>
				<groupId>com.hynnet</groupId>
<!--
				<groupId>org.apache.maven.plugins</groupId>
-->
				<artifactId>maven-javadoc-plugin-not-compile</artifactId>
				<version>2.9.1</version>
				<executions>
					<!--
					<execution>
						<phase>package</phase>
						<goals>
							<goal>javadoc</goal>
						</goals>
					</execution>
					-->
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<attach>true</attach>
					<excludes>
						<exclude>org/**</exclude>
						<exclude>com/hynnet/exception/**</exclude>
						<exclude>com/hynnet/model/**</exclude>
						<exclude>com/hynnet/util/**</exclude>
						<exclude>**/*.*</exclude>
					</excludes>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<distributionManagement>
				<repository>
					<id>hynnet-releases</id>
					<name>hynnet Release Repository</name>
					<url>http://dl.systemcn.com/nexus/content/repositories/com.hynnet/</url>
				</repository>
				<snapshotRepository>
					<id>hynnet-snapshots</id>
					<name>hynnet Snapshot Repository</name>
					<url>http://dl.systemcn.com/nexus/content/repositories/com.hynnet/</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
		<profile>
			<id>test</id>
			<distributionManagement>
				<repository>
					<id>hynnet-releases</id>
					<name>hynnet Release Repository</name>
					<url>http://192.168.0.21:8080/lib/content/repositories/com.hynnet/</url>
<!--
					<url>http://192.168.0.21:8080/lib/content/repositories/releases</url>
-->
				</repository>
				<snapshotRepository>
					<id>hynnet-snapshots</id>
					<name>hynnet Snapshot Repository</name>
					<url>http://192.168.0.21:8080/lib/content/repositories/com.hynnet.snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
		<profile>
			<id>publish</id>
			<distributionManagement>
				<repository>
					<id>sonatype-hynnet-releases</id>
					<name>sonatype Release Repository</name>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
				</repository>
				<snapshotRepository>
					<id>sonatype-hynnet-snapshots</id>
					<name>sonatype Snapshot Repository</name>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
					<uniqueVersion>false</uniqueVersion>
				</snapshotRepository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
