<!-- Copyright (c) 2017 ModelSolv, Inc. and others. All rights reserved. 
	This program and the accompanying materials are made available under the 
	terms of the Eclipse Public License v1.0 which accompanies this distribution, 
	and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: 
	ModelSolv, Inc. - initial API and implementation and/or initial documentation -->
<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.reprezen.kaizen</groupId>
	<artifactId>openapi-parser</artifactId>
	<version>4.0.4</version>
	<name>${project.groupId}:${project.artifactId}</name>
	<description>KaiZen OpenAPI Parser by RepreZen</description>
	<url>https://github.com/RepreZen/KaiZen-OpenAPI-Parser</url>
	<licenses>
		<license>
			<name>Eclipse Public License - Version 1.0</name>
			<url>https://www.eclipse.org/legal/epl-v10.html</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Andy Lowry</name>
			<email>andy.lowry@reprezen.com</email>
			<organization>RepreZen</organization>
			<organizationUrl>https://www.reprezen.com</organizationUrl>
		</developer>
		<developer>
			<name>Guillaume Hillairet</name>
			<email>g.hillairet@gmail.com</email>
			<organization>RepreZen</organization>
			<organizationUrl>https://www.reprezen.com</organizationUrl>
		</developer>
		<developer>
			<name>Tatiana Fesenko</name>
			<email>tatiana.fesenko@reprezen.com</email>
			<organization>RepreZen</organization>
			<organizationUrl>https://www.reprezen.com</organizationUrl>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git://github.com/RepreZen/KaiZen-OpenAPI-Parser.git</connection>
		<developerConnection>scm:git:git@github.com:RepreZen/KaiZen-OpenAPI-Parser.git</developerConnection>
		<url>https://github.com/RepreZen/KaiZen-OpenAPI-Parser/tree/master</url>
		<tag>v4.0.4</tag>
	</scm>
	<dependencies>
		<dependency>
			<groupId>com.reprezen.jsonoverlay</groupId>
			<artifactId>jsonoverlay</artifactId>
			<version>${json-overlay-version}</version>
			<exclusions>
				<!-- exclude dependencies used for code generation -->
				<exclusion>
					<groupId>com.google.guava</groupId>
					<artifactId>guava</artifactId>
				</exclusion>
				<exclusion>
					<groupId>commons-cli</groupId>
					<artifactId>commons-cli</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.github.javaparser</groupId>
					<artifactId>javaparser-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.eclipse.xtend</groupId>
					<artifactId>org.eclipse.xtend.lib</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson-version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.dataformat</groupId>
			<artifactId>jackson-dataformat-yaml</artifactId>
			<version>${jackson-version}</version>
		</dependency>
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>javax.mail-api</artifactId>
			<version>1.6.1</version>
		</dependency>
		<dependency>
			<groupId>com.sun.mail</groupId>
			<artifactId>javax.mail</artifactId>
			<version>1.6.1</version>
		</dependency>
		<!-- tests -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>19.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.skyscreamer</groupId>
			<artifactId>jsonassert</artifactId>
			<version>1.5.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.7</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<profiles>
		<profile>
			<id>gen</id>
			<dependencies>
				<dependency>
					<groupId>com.google.guava</groupId>
					<artifactId>guava</artifactId>
					<version>19.0</version>
				</dependency>
				<dependency>
					<groupId>commons-cli</groupId>
					<artifactId>commons-cli</artifactId>
					<version>1.4</version>
				</dependency>
				<dependency>
					<groupId>com.github.javaparser</groupId>
					<artifactId>javaparser-core</artifactId>
					<version>3.5.7</version>
				</dependency>
				<dependency>
					<groupId>org.eclipse.xtend</groupId>
					<artifactId>org.eclipse.xtend.lib</artifactId>
					<version>2.11.0</version>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>1.6.0</version>
						<executions>
							<execution>
								<id>codegen</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>java</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<mainClass>com.reprezen.kaizen.oasparser.GenOpenApi3</mainClass>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>compile-for-gen</id>
			<dependencies>
				<dependency>
					<groupId>com.google.guava</groupId>
					<artifactId>guava</artifactId>
					<version>19.0</version>
				</dependency>
				<dependency>
					<groupId>commons-cli</groupId>
					<artifactId>commons-cli</artifactId>
					<version>1.4</version>
				</dependency>
				<dependency>
					<groupId>com.github.javaparser</groupId>
					<artifactId>javaparser-core</artifactId>
					<version>3.5.7</version>
				</dependency>
				<dependency>
					<groupId>org.eclipse.xtend</groupId>
					<artifactId>org.eclipse.xtend.lib</artifactId>
					<version>2.11.0</version>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.1</version>
						<configuration>
							<includes>
								<include>**/oasparser/GenOpenApi3.java</include>
							</includes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>gpg</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>update-site</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.reficio</groupId>
						<artifactId>p2-maven-plugin</artifactId>
						<version>1.2.0</version>
						<executions>
							<execution>
								<id>default-cli</id>
								<goals>
									<goal>site</goal>
								</goals>
								<phase>install</phase>
								<configuration>
									<artifacts>
										<artifact>
											<id>com.reprezen.jsonoverlay:jsonoverlay:${json-overlay-version}</id>
											<!-- early verssions of this artifact have bundle manifests that 
												we now ignore -->
											<override>true</override>
											<source>false</source>
											<instructions>
												<Import-Package>
													com.github.javaparser;resolution:=optional,
													com.github.javaparser.ast;resolution:=optional,
													com.github.javaparser.ast.body;resolution:=optional,
													com.github.javaparser.ast.comments;resolution:=optional,
													com.github.javaparser.ast.expr;resolution:=optional,
													com.github.javaparser.ast.stmt;resolution:=optional,
													com.github.javaparser.ast.type;resolution:=optional,
													org.apache.commons.cli;resolution:=optional,
													com.google.common.base;resolution:=optional,
													com.google.common.collect;resolution:=optional,
													org.eclipse.xtend2.lib;resolution:=optional,
													org.eclipse.xtext.xbase.lib;resolution:=optional,
													*
												</Import-Package>
												<Export-Package>
													com.reprezen.jsonoverlay
												</Export-Package>
											</instructions>
											<excludes>
												<!-- following are only required for model class generation, 
													which is generally not done at runtime -->
												<exclude>commons-cli</exclude>
												<exclude>com.github.javaparser</exclude>
												<exclude>com.google.guava</exclude>
												<exclude>org.eclipse.xtend</exclude>
												<exclude>org.eclipse.xtext</exclude>
											</excludes>
										</artifact>
										<artifact>
											<id>com.reprezen.kaizen:openapi-parser:${project.version}</id>
											<!-- early verssions of this artifact have bundle manifests that 
												we now ignore -->
											<override>true</override>
											<source>false</source>
											<instructions>
												<Import-Package>
													com.reprezen.jsonoverlay.gen;resolution:=optional,
													*
												</Import-Package>
												<Export-Package>
													com.reprezen.kaizen.oasparser,
													com.reprezen.kaizen.oasparser.model3,
													com.reprezen.kaizen.oasparser.ovl3,
													com.reprezen.kaizen.oasparser.val,
													com.reprezen.kaizen.oasparser.val.msg
												</Export-Package>
											</instructions>
											<excludes>
												<!-- this is specified explicitly below -->
												<exclude>com.reprezen.jsonoverlay:jsonoverlay</exclude>
												<exclude>com.google.guava</exclude>
												<!-- following are only required for model class generation, 
													which is generally not done at runtime -->
												<exclude>commons-cli</exclude>
												<exclude>com.github.javaparser</exclude>
												<exclude>org.eclipse.xtend</exclude>
												<exclude>org.eclipse.xtext</exclude>
											</excludes>
										</artifact>
									</artifacts>
									<compressSite>false</compressSite>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>

			<pluginRepositories>
				<pluginRepository>
					<id>reficio</id>
					<url>http://repo.reficio.org/maven/</url>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>

	<repositories>
		<repository>
			<id>sonatype-snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
			<layout>default</layout>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<tagNameFormat>v@{project.version}</tagNameFormat>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<!-- We don't use release:perform - deployment is done in TeamCity. 
						This just makes an errant perform operation harmless -->
					<goals>clean</goals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>${nexus.autorelease}</autoReleaseAfterClose>
					<autoDropAfterRelease>${nexus.autodrop}</autoDropAfterRelease>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<distributionManagement>
		<snapshotRepository>
			<uniqueVersion>false</uniqueVersion>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype OSS Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
			<layout>legacy</layout>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<json-overlay-version>4.0.4</json-overlay-version>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<nexus.autorelease>false</nexus.autorelease>
		<nexus.autodrop>true</nexus.autodrop>
		<jackson-version>2.9.8</jackson-version>
	</properties>
</project>
