<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>
		<artifactId>webswing-directdraw</artifactId>
		<groupId>org.webswing</groupId>
		<version>20.2.5</version>
		<relativePath>..</relativePath>
	</parent>
	<artifactId>webswing-directdraw-swing</artifactId>
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>com.google.protobuf</groupId>
			<artifactId>protobuf-java</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>com.github.os72</groupId>
				<artifactId>protoc-jar-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<addSources>main</addSources>
							<outputDirectory>src/main/java</outputDirectory>
							<cleanOutputFolder>false</cleanOutputFolder>
							<includeDirectories>
								<include>../src/proto/javascript</include>
							</includeDirectories>
							<inputDirectories>
								<include>../src/proto/javascript</include>
							</inputDirectories>
						</configuration>
					</execution>
				</executions>
			</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>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
