<?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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.gitee.l0km</groupId>
	<artifactId>codegen</artifactId>
	<version>2.1.20</version>
	<packaging>pom</packaging>
	<description>source code(java/cpp) generating tool</description>
	<name>codegen aggregator</name>
	<url>https://gitee.com/l0km</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<junit.version>4.12</junit.version>
		<sl4j.version>1.7.7</sl4j.version>
		<common-java.version>2.8.4</common-java.version>
		<swift-service-parser.version>1.0.1</swift-service-parser.version>
		<commons-configuration2.version>2.1.1</commons-configuration2.version>
		<spring.version>4.2.8.RELEASE</spring.version>
		<swagger-annotations.version>1.5.22</swagger-annotations.version>
		<!-- surefire 插件 跳过测试 -->
		<skipTests>true</skipTests>
	</properties>

	<modules>
		<module>codegen-base</module>
		<module>codegen-annotations</module>
		<module>codegen-decorator</module>
		<module>codegen-decorator-maven-plugin</module>
		<module>codegen-thrift</module>
		<module>codegen-thrift-maven-plugin</module>
		<module>codegen-generic</module>
		<module>codegen-service</module>
		<module>codegen-webclient</module>
		<module>codegen-wsdl</module>
	</modules>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${sl4j.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>${sl4j.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/log4j/log4j -->
			<dependency>
				<groupId>log4j</groupId>
				<artifactId>log4j</artifactId>
				<version>1.2.17</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>20.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.axis2</groupId>
				<artifactId>axis2-kernel</artifactId>
				<version>1.6.2</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
			<dependency>
				<groupId>commons-lang</groupId>
				<artifactId>commons-lang</artifactId>
				<version>2.4</version>
			</dependency>
			<!-- maven -->
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-plugin-api</artifactId>
				<version>3.2.5</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>3.2</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>com.gitee.l0km</groupId>
				<artifactId>common-base</artifactId>
				<version>${common-java.version}</version>
			</dependency>
			<dependency>
				<groupId>com.gitee.l0km</groupId>
				<artifactId>common-cli</artifactId>
				<version>${common-java.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>common-bean</artifactId>
				<version>${common-java.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>codegen-annotations</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>codegen-base</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>codegen-wsdl</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>swift-service-parser</artifactId>
				<version>${swift-service-parser.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-configuration2 -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-configuration2</artifactId>
				<version>2.1.1</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/io.swagger/swagger-annotations -->
			<dependency>
			    <groupId>io.swagger</groupId>
			    <artifactId>swagger-annotations</artifactId>
			    <version>${swagger-annotations.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
			<dependency>
			    <groupId>org.springframework</groupId>
			    <artifactId>spring-web</artifactId>
			    <version>${spring.version}</version>
			    <exclusions>
			    	<exclusion>
			    		<groupId>*</groupId>
	          			<artifactId>*</artifactId>
			    	</exclusion>
			    </exclusions>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9</version>
					<configuration>
						<!-- 禁用java 8 的DocLint新特性，以确保当javadoc有编译错误时，也能正常生成javadoc jar包 -->
						<!-- ${javadoc.opts}由profile指定 -->
						<additionalparam>${javadoc.opts}</additionalparam>
						<detectLinks>false</detectLinks>
						<detectOfflineLinks>false</detectOfflineLinks>
						<linksource>false</linksource>
						<detectJavaApiLink>false</detectJavaApiLink>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.1</version>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<useReleaseProfile>false</useReleaseProfile>
						<arguments>-Pcentral-release</arguments>
					</configuration>
				</plugin>
				<!-- For JDK 1.8-->
		        <plugin>
		            <groupId>org.apache.maven.plugins</groupId>
		            <artifactId>maven-plugin-plugin</artifactId>
		            <version>3.4</version>
		        </plugin>
			</plugins>
		</pluginManagement>
	</build>
	<licenses>
		<license>
			<name>The 2-Clause BSD License</name>
			<url>https://gitee.com/l0km/codegen/tree/master/LICENSE</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>guyadong</name>
			<email>10km0811@sohu.com</email>
			<url>https://gitee.com/l0km</url>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:https://gitee.com/l0km/codegen.git</connection>
		<developerConnection>scm:git:https://gitee.com/l0km/codegen.git</developerConnection>
		<url>https://gitee.com/l0km/codegen</url>
	</scm>
	<profiles>
		<profile>
			<id>doclint-java8-disable</id>
			<!-- 指定profile只在JDK版本大于等于1.8时有效 -->
			<activation>
				<jdk>[1.8,)</jdk>
				<!-- <activeByDefault>false</activeByDefault> -->
			</activation>
			<properties>
				<javadoc.opts>-Xdoclint:none</javadoc.opts>
			</properties>
		</profile>
		<profile>
			<id>only-eclipse</id>
			<activation>
				<property>
					<name>m2e.version</name>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.eclipse.m2e</groupId>
							<artifactId>lifecycle-mapping</artifactId>
							<version>1.0.0</version>
							<configuration>
								<lifecycleMappingMetadata>
									<pluginExecutions>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>org.apache.maven.plugins</groupId>
												<artifactId>maven-enforcer-plugin</artifactId>
												<versionRange>[1.0.0,)</versionRange>
												<goals>
													<goal>enforce</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<ignore />
											</action>
										</pluginExecution>
										<pluginExecution>
											<pluginExecutionFilter>
												<groupId>
													org.apache.maven.plugins
												</groupId>
												<artifactId>
													maven-plugin-plugin
												</artifactId>
												<versionRange>
													[3.2,)
												</versionRange>
												<goals>
													<goal>descriptor</goal>
												</goals>
											</pluginExecutionFilter>
											<action>
												<ignore />
											</action>
										</pluginExecution>
									</pluginExecutions>
								</lifecycleMappingMetadata>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
		<!-- maven 中央仓库发布 -->
		<profile>
			<id>central-release</id>
			<repositories>
				<repository>
					<id>sonatype-nexus-snapshots</id>
					<name>Sonatype Nexus Snapshots</name>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
			</repositories>
			<distributionManagement>
				<snapshotRepository>
					<id>sonatype-nexus-snapshots</id>
					<name>Sonatype Nexus Snapshots</name>
					<url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
				</snapshotRepository>
				<repository>
					<id>sonatype-nexus-staging</id>
					<name>Nexus Release Repository</name>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>