<?xml version="1.0"?>
<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>org.jgrapht</groupId>
		<artifactId>jgrapht</artifactId>
		<version>1.2.0</version>
	</parent>
	<artifactId>jgrapht-guava</artifactId>
	<name>JGraphT - Guava Adapter</name>
	<properties>
		<main.basedir>${project.parent.basedir}</main.basedir>
	</properties>
	<licenses>
		<license>
			<name>GNU Lesser General Public License Version 2.1, February 1999</name>
			<url>http://jgrapht.sourceforge.net/LGPL.html</url>
			<distribution>repo</distribution>
		</license>
		<license>
			<name>Eclipse Public License (EPL) 1.0</name>
			<url>http://www.eclipse.org/legal/epl-v10.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<transformers>
						<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
							<manifestEntries>
								<!-- Use unique OSGi bundle symbolic name for uber artifact. Otherwise 
									e.g. jgrapht-guava-x.y.z.jar and jgrapht-guava-x.y.z-uber.jar could not be deployed 
									to the same P2 repository. -->
								<Bundle-SymbolicName>org.jgrapht.guava.uber</Bundle-SymbolicName>
							</manifestEntries>
						</transformer>
						<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
							<resource>META-INF/guava-license</resource>
							<file>${main.basedir}/etc/licenses/apache-license-2.0.txt</file>
						</transformer>
						<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
                			</transformer>
						<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
							<addHeader>false</addHeader>
						</transformer>
					</transformers>
					<shadedArtifactAttached>true</shadedArtifactAttached>
					<shadedClassifierName>uber</shadedClassifierName>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<executions>
					<execution>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<instructions>
						<Automatic-Module-Name>org.jgrapht.guava</Automatic-Module-Name>
						<Bundle-Vendor>Barak Naveh, John V. Sichi and contributors</Bundle-Vendor>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>jgrapht-core</artifactId>
		</dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>24.1-jre</version>
            <exclusions>
                    <exclusion>
                        <groupId>com.google.code.findbugs</groupId>
                        <artifactId>jsr305</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.google.errorprone</groupId>
                        <artifactId>error_prone_annotations</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.google.j2objc</groupId>
                        <artifactId>j2objc-annotations</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>animal-sniffer-annotations</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.checkerframework</groupId>
                        <artifactId>checker-compat-qual</artifactId>
                    </exclusion>
      		</exclusions>
        </dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>
