<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.etsi.mts.tdl.extras</groupId>
		<artifactId>org.etsi.mts.tdl.extras.parent</artifactId>
		<version>1.0.0-SNAPSHOT</version>
		<relativePath>../../../org.etsi.mts.tdl.extras.parent</relativePath>
	</parent>
	<artifactId>org.etsi.mts.tdl.extras.yang.tools.wrapper.mvn.dependencies</artifactId>
	<packaging>jar</packaging>
	<!-- 
		Nested pom for downloading dependencies
	-->
	<properties>
		<classpath.placeholder>!:!</classpath.placeholder>
		<classpath.separator>"/>${line.separator}    &lt;classpathentry exported="true" kind="lib" path="</classpath.separator>
		<!-- "/>${line.separator}	<classpathentry exported="true" kind="lib" path=" -->
	</properties>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<configuration>
					<filesets combine.children="append">
						<fileset>
							<directory>${basedir}/../libs/</directory>
							<includes>
								<include>**/*</include>
							</includes>
							<excludes>
								<exclude>.gitignore</exclude>
							</excludes>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>build-classpath</goal>
						</goals>
						<configuration>
							<outputFilterFile>true</outputFilterFile>
							<prefix>libs</prefix>
							<regenerateFile>true</regenerateFile>
							<pathSeparator>${classpath.placeholder}</pathSeparator>
							<outputFile>${basedir}/classpath.properties</outputFile>
						</configuration>
					</execution>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/../libs</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestFile>
							${project.build.outputDirectory}/META-INF/MANIFEST.MF
						</manifestFile>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
                <version>3.1.0</version>
				<executions>
					<execution>
						<id>fix-manifest</id>
						<phase>test</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
                            <!-- <tasks>
                                <echo>Update MANIFEST: ${project.build.outputDirectory}/META-INF/MANIFEST.MF</echo>
                                <echo>Replace ${classpath.placeholder} with ,${line.separator} </echo>
                            </tasks> -->
							<target>
								<replace file="${project.build.outputDirectory}/META-INF/MANIFEST.MF" 
									token="${classpath.placeholder}"
									value=",${line.separator} " />
								<replace file="${project.build.outputDirectory}/.classpath" 
									token="${classpath.placeholder}"
									value="${classpath.separator}" />
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<filters>
			<filter>${basedir}/classpath.properties</filter>
		</filters>
		<resources>
			<resource>
				<directory>${basedir}/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
	</build>
	<!-- 
	<dependencies>
		<dependency>
		    <groupId>org.opendaylight.yangtools</groupId>
		    <artifactId>yang-parser-api</artifactId>
		    <version>11.0.5</version>
		</dependency>		
	</dependencies>
	implementation 'org.opendaylight.yangtools:yang-parser-impl:13.0.1'
    implementation 'org.opendaylight.yangtools:rfc8819-parser-support:13.0.1'
    implementation 'org.opendaylight.yangtools:yang-data-codec-gson:13.0.1'
-->
	<dependencies>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>yang-data-codec-gson</artifactId>
			<version>13.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>rfc8819-parser-support</artifactId>
			<version>13.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>yang-parser-rfc7950</artifactId>
			<version>13.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>yang-parser-spi</artifactId>
			<version>13.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>yang-parser-api</artifactId>
			<version>13.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>odlext-parser-support</artifactId>
			<version>13.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>yang-parser-impl</artifactId>
			<version>13.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.opendaylight.yangtools</groupId>
			<artifactId>yang-repo-api</artifactId>
			<version>13.0.1</version>
		</dependency>
	</dependencies>
</project>