<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>net.tascalate.javaflow</groupId>
		<artifactId>net.tascalate.javaflow.parent</artifactId>
		<version>2.7.3</version>
		<relativePath>../</relativePath>
	</parent>

	<artifactId>net.tascalate.javaflow.tools.jar</artifactId>
	<packaging>jar</packaging>

	<name>Tascalate JavaFlow / Tools / Command-line JAR Rewriter</name>

	<properties>
		<license.header>../HEADER-DERRIVED.txt</license.header>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>${project.groupId}.spi</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>net.tascalate.javaflow</groupId>
			<artifactId>${project.groupId}.providers.core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.moditect</groupId>
				<artifactId>moditect-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<Main-Class>org.apache.commons.javaflow.tools.jar.RewritingUtils</Main-Class>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<shadedArtifactAttached>true</shadedArtifactAttached>
							<shadedClassifierName>shaded</shadedClassifierName>
							<createDependencyReducedPom>true</createDependencyReducedPom>
							<finalName>JavaFlowRewriteJar</finalName>
							<minimizeJar>false</minimizeJar>
							<filters>
								<filter>
									<artifact>*:*</artifact>
									<excludes>
										<exclude>META-INF/maven/**/*.*</exclude>
										<exclude>**/module-info.class</exclude>
									</excludes>
								</filter>
								<filter>
									<artifact>org.slf4j:slf4j-simple</artifact>
									<includes>
										<include>**</include>
									</includes>
								</filter>  
							</filters>
							<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
								<resource>simplelogger.properties</resource>
								<file>src/shade/resources/simplelogger.properties</file>
							</transformer>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<manifestEntries>
										<Multi-Release>false</Multi-Release>
										<Automatic-Module-Name>${project.artifactId}.shaded</Automatic-Module-Name>
									</manifestEntries>
								</transformer>
							</transformers>
	
						</configuration>
					</execution>
				</executions>
			</plugin> 
		</plugins>
	</build>
</project>
