<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>com.umlet</groupId>
		<artifactId>umlet-parent</artifactId>
		<version>15.1</version>
	</parent>

	<artifactId>umlet-eclipse-plugin-deps</artifactId>

	<description>This module collects all dependencies which are required by the umlet-eclipse-plugin. It must be a separate module because umlet-eclipse-plugin needs to collect umlet-swing and all transitive dependencies but not its own dependencies which is otherwise not possible with maven (copy doesnt support transitive dependencies and copy-dependencies copies Eclipse-Plugin dependencies too if placed in umlet-eclipse-plugin)</description>

	<properties>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.umlet</groupId>
			<artifactId>umlet-swing</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-reload4j</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<!-- export classpath to a file which will later replace the Bundle-ClassPath -->
					<execution>
						<id>build-classpath</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>build-classpath</goal>
						</goals>
						<configuration>
							<excludeArtifactIds>umlet-res</excludeArtifactIds> <!-- umlet-res has no java classes -->
							<includeScope>runtime</includeScope>
							<pathSeparator>,</pathSeparator>
							<stripVersion>true</stripVersion>
							<fileSeparator>/</fileSeparator>
							<prefix>lib</prefix>
							<outputFile>${project.build.directory}/classes/classPath.txt</outputFile>
						</configuration>
					</execution>
					<!-- copy all dependencies of umlet-swing into the resulting jar to make them available for umlet-eclipse-plugin -->
					<execution>
						<id>copy-dependencies</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<excludeArtifactIds>umlet-res</excludeArtifactIds> <!-- umlet-res has no java classes -->
							<outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
							<stripVersion>true</stripVersion>
							<includeScope>compile</includeScope>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>