<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>
	<artifactId>webswing-app-launcher</artifactId>
	<parent>
		<artifactId>webswing</artifactId>
		<groupId>org.webswing</groupId>
		<version>20.1.8</version>
		<relativePath>..</relativePath>
	</parent>
	<dependencies>
		<dependency>
			<groupId>org.webswing</groupId>
			<artifactId>webswing-app-toolkit</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webswing</groupId>
			<artifactId>webswing-app-toolkit-fx-java8</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webswing</groupId>
			<artifactId>webswing-app-toolkit-fx-java11</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webswing</groupId>
			<artifactId>webswing-app-toolkit-java8</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webswing</groupId>
			<artifactId>webswing-app-toolkit-java11</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>
	<build>
		<finalName>webswing-app-launcher</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<compilerArguments>
						<bootclasspath>${basedir}/../lib/rt-1.8.jar</bootclasspath>
					</compilerArguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/WEB-INF/swing-boot</outputDirectory>
							<includeScope>runtime</includeScope>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<outputDirectory>${project.build.directory}/WEB-INF/swing-boot</outputDirectory>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<!-- =========================================DEVELOPMENT LIVE UPDATE PROFILE=========================== -->
		<profile>
			<id>update</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>copy-to-running-jetty</id>
								<phase>package</phase>
								<configuration>
									<target>
										<copy todir="${basedir}/../webswing-server/webswing-server-war/target/${webswing-war-name}/WEB-INF/swing-lib">
											<fileset dir="${project.build.directory}" includes="*.jar" />
										</copy>
										<copy todir="${basedir}/../webswing-server/webswing-server-war/target/${webswing-war-name}/WEB-INF/swing-boot">
											<fileset dir="${project.build.directory}" includes="*.jar" />
										</copy>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
