<?xml version="1.0" encoding="UTF-8"?>
<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.lightcomp.ft</groupId>
	<artifactId>file-transfer</artifactId>
	<version>2.0</version>
	<name>FileTransfer</name>
	<url>http://www.lightcomp.com</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>17</java.version>
        <cxf.version>4.0.3</cxf.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>jakarta.xml.bind</groupId>
			<artifactId>jakarta.xml.bind-api</artifactId>
			<version>4.0.0</version>
		</dependency>		
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.12.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
			<version>4.4</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.7.36</version>
		</dependency>
		<!-- CXF -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-jetty</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-features-logging</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
			<version>4.0.4</version>
		</dependency>
		<!-- test -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.jodah</groupId>
			<artifactId>concurrentunit</artifactId>
			<version>0.4.6</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.11.0</version>
				<configuration>
					<source>17</source>
					<target>17</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
				<executions>
					<execution>
						<id>ft-api</id>
						<phase>generate-sources</phase>
                        <goals>
                            <goal>wsdl2java</goal>
						</goals>					
						<configuration>
							<sourceRoot>${project.build.directory}/generated-sources/api</sourceRoot>
							<wsdlOptions>
								<wsdlOption>
									<wsdl>src/main/resources/wsdl/file-transfer-v1.wsdl</wsdl>
									<bindingFile>src/main/resources/wsdl/file-transfer-v1-bindings.xml</bindingFile>
									<wsdlLocation>classpath:/wsdl/file-transfer-v1.wsdl</wsdlLocation>
									<extraargs>
										<extraarg>-xjc-Xinheritance</extraarg>
										<extraarg>-verbose</extraarg>
									</extraargs>
								</wsdlOption>
							</wsdlOptions>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
                                    <groupId>org.jvnet.jaxb</groupId>
                                    <artifactId>jaxb-plugins</artifactId>
                                    <version>4.0.0</version>
					</dependency>
<!--
					<dependency>						
						<groupId>jakarta.xml.ws</groupId>
						<artifactId>jakarta.xml.ws-api</artifactId>
						<version>4.0.0</version>
					</dependency>
				-->
				</dependencies>
			</plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>add-gen-sources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-source</goal>
						</goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/api</source>
							</sources>
						</configuration>
					</execution>
                </executions>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.5.0</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/libs</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<!-- Profile for automated releases -->
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>3.0.0-M4</version>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
						</configuration>
					</plugin>
					<!-- By default no subproject is deployed If you want to deploy some 
						project you have to override skip to false -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<scm>
		<connection>scm:git:ssh://gitlab.lightcomp.cz/lightcomp/filetransfer.git</connection>
		<developerConnection>scm:git:ssh://git@gitlab.lightcomp.cz/lightcomp/filetransfer.git</developerConnection>
		<tag>file-transfer-2.0</tag>
	</scm>
	<distributionManagement>
		<repository>
			<id>LightCompReleaseRepository</id>
			<url>http://artifactory.lightcomp.cz:8081/artifactory/libs-release-local</url>
		</repository>
    <snapshotRepository>
	<id>frnkRepo</id>
	<url>http://10.2.0.2:8080/artifactory/libs-snapshot-local</url>
    </snapshotRepository>

	</distributionManagement>

</project>
