<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>net.tascalate</groupId>
	<artifactId>net.tascalate.asmx.parent</artifactId>
	<version>9.7.0</version>
	<packaging>pom</packaging>

	<name>Tascalate ASMX</name>
	<url>https://github.com/vsilaev/tascalate-asmx</url>
	<description>Tascalate ASMX - shaded version of ObjectWeb ASM</description>

	<licenses>
		<license>
			<name>BSD 3-Clause License</name>
			<url>https://github.com/vsilaev/tascalate-asmx/blob/master/LICENSE</url>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:git://github.com/vsilaev/tascalate-asmx.git</connection>
		<developerConnection>scm:git:ssh://github.com:vsilaev/tascalate-asmx.git</developerConnection>
		<url>https://github.com/vsilaev/tascalate-asmx.git</url>
	</scm>

	<developers>
		<developer>
			<id>vsilaev</id>
			<name>Valery Silaev</name>
			<email>vsilaev at java.net</email>
		</developer>
	</developers>

	<contributors>
		<!--
		<contributor>
			<name>Valery Silaev</name>
			<email>vsilaev at java.net</email>
		</contributor>
		-->
	</contributors>

	<modules>
		<module>net.tascalate.asmx</module>
		<module>net.tascalate.asmx.plus</module>
		<module>net.tascalate.asmx.tree</module>
		<module>net.tascalate.asmx.analysis</module>
		<module>net.tascalate.asmx.commons</module>
		<module>net.tascalate.asmx.util</module>
	</modules>

	<properties>
                <asm.version>9.7</asm.version>
		<asm.current.version>${asm.version}.0</asm.current.version>
		<asm.next.version>10</asm.next.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencyManagement>
		<dependencies>
		</dependencies>
	</dependencyManagement>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<!--
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.3.0</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.6.2</version>
						<executions>
							<execution>
								<id>aggregate-javadoc</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<phase>package</phase>
								<configuration>
									<doctitle>${project.name}, v. ${project.version}</doctitle>
									<includeDependencySources>true</includeDependencySources>
									<dependencySourceExcludes>
										<dependencySourceExclude>net.tascalate:*</dependencySourceExclude>
									</dependencySourceExcludes>
									<dependencySourceIncludes>
										<dependencySourceInclude>org.ow2.asm:*</dependencySourceInclude>
									</dependencySourceIncludes>
								</configuration>
							</execution>
						</executions>
						<configuration>
							<aggregate>true</aggregate>
							<doclint>none</doclint>
							<detectJavaApiLink>true</detectJavaApiLink>
							<links>
								<link>https://asm.ow2.io/javadoc/</link>
							</links>
							<additionalDependencies>
								<additionalDependency>
									<groupId>org.ow2.asm</groupId>
									<artifactId>asm</artifactId>
									<version>${asm.version}</version>
								</additionalDependency>
								<additionalDependency>
									<groupId>org.ow2.asm</groupId>
									<artifactId>asm-tree</artifactId>
									<version>${asm.version}</version>
								</additionalDependency>
								<additionalDependency>
									<groupId>org.ow2.asm</groupId>
									<artifactId>asm-analysis</artifactId>
									<version>${asm.version}</version>
								</additionalDependency>
							</additionalDependencies>					
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.1.0</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.13</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</configuration>
			</plugin> 
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.11.0</version>
				<executions>
					<execution>
						<id>default-compile</id>
						<phase>none</phase>
					</execution> 
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.3.0</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Bundle-DocURL>http://asm.ow2.org</Bundle-DocURL>
							<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
							<Bundle-Name>${bundle.name}</Bundle-Name>
							<Bundle-SymbolicName>${bundle.name}</Bundle-SymbolicName>
							<Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
							<Bundle-Version>${project.version}</Bundle-Version>
							<Export-Package>${export.packages}</Export-Package>
							<Import-Package>${import.packages}</Import-Package>
							<Implementation-Title>${project.description}</Implementation-Title>
							<Implementation-Version>${asm.current.version}</Implementation-Version>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.moditect</groupId>
					<artifactId>moditect-maven-plugin</artifactId>
					<version>1.2.1.Final</version>
					<executions>
						<execution>
							<id>add-module-infos</id>
							<phase>package</phase>
							<goals>
								<goal>add-module-info</goal>
							</goals>
							<configuration>
								<jvmVersion>9</jvmVersion>
								<module>
									<moduleInfoFile>src/main/java9/module-info.java</moduleInfoFile>
								</module>
								<version>${project.version}</version>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>3.5.1</version>
					<executions>
						<execution>
							<phase>package</phase>
							<goals>
								<goal>shade</goal>
							</goals>
							<configuration>
								<createDependencyReducedPom>false</createDependencyReducedPom>
								<createSourcesJar>true</createSourcesJar>
								<shadeSourcesContent>true</shadeSourcesContent>
								<relocations>
									<relocation>
										<pattern>org.objectweb.asm</pattern>
										<shadedPattern>net.tascalate.asmx</shadedPattern>
									</relocation>
								</relocations>
								<filters>
									<filter>
										<artifact>org.ow2.asm:*</artifact>
										<excludes>
											<exclude>**/module-info.class</exclude>
										</excludes>
									</filter>
								</filters>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
