<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>ru.entaxy.ion.distribution</groupId>
		<artifactId>entaxy-ion-platform-dist</artifactId>
		<version>1.12.0</version>
	</parent>
	<groupId>ru.entaxy.ion.distribution</groupId>
	<artifactId>entaxy-ion-platform</artifactId>
	<packaging>karaf-assembly</packaging>
	<name>ENTAXY :: DISTRIBUTION :: PLATFORM</name>
	<description>Entaxy platform only distribution</description>
  
  	<dependencies>
		<dependency>
			<groupId>ru.entaxy.esb</groupId>
			<artifactId>ui</artifactId>
			<version>${entaxy.ui.version}</version>
			<classifier>features</classifier>
			<type>xml</type>
			<scope>provided</scope>
		</dependency>		
		<dependency>
			<groupId>ru.entaxy.esb.ui</groupId>
			<artifactId>entaxy-hawtio</artifactId>
			<version>${entaxy.ui.hawtio.version}</version>
			<classifier>features</classifier>
			<type>xml</type>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ru.entaxy.esb</groupId>
			<artifactId>entaxy-documentation</artifactId>
			<version>${entaxy.documentation.version}</version>
			<classifier>features</classifier>
			<type>xml</type>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ru.entaxy.esb</groupId>
			<artifactId>camel-documentation</artifactId>
			<version>${camel.documentation.version}</version>
			<classifier>features</classifier>
			<type>xml</type>
			<scope>provided</scope>
		</dependency>
  	</dependencies>
  
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
	            		<id>copy-script-to-assembly</id>
	            		<!-- phase>prepare-package</phase -->
	            		<phase>generate-resources</phase>
	            		<goals>
	              			<goal>copy</goal>
	            		</goals>
	            		<configuration>
		              		<artifactItems>
		                		<artifactItem>
						  			<groupId>ru.entaxy.esb</groupId>
						  			<artifactId>ui</artifactId>
						  			<version>${entaxy.ui.version}</version>
		                  			<type>install</type>
		                  			<classifier>entaxy-ui</classifier>
		                  			<overWrite>true</overWrite>
		                  			<!-- outputDirectory>${project.build.directory}/assembly/etc</outputDirectory -->
		                  			<outputDirectory>${project.build.directory}/assembly-resources/scripts</outputDirectory>
		                  			<destFileName>entaxy-ui.install</destFileName>
	                			</artifactItem>
	                		</artifactItems>
	                	</configuration>
					</execution>
				</executions>
			</plugin>
		
			<plugin>
				<groupId>org.apache.karaf.tooling</groupId>
				<artifactId>karaf-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>prepare-assembly</id>
						<phase>compile</phase>
						<goals>
							<goal>assembly</goal>
						</goals>
						<configuration>
							<!-- 
								@OVERRIDE
							-->								
							<installedFeatures>
								<feature>entaxy-ui</feature>
								<feature>entaxy-h2-console</feature>
								<feature>entaxy-hawtio</feature>
								<feature>entaxy-hawtio-artemis-support</feature>

								<!-- @COPY from parent -->								
				                <!-- @backward-compat -->
				                <feature>entaxy-backward-compatibility-modules</feature>

				                <feature>entaxy-documentation</feature>
				                <feature>camel-documentation</feature>
							</installedFeatures>
							<sourceDirectory>${project.build.directory}/assembly-resources</sourceDirectory>
						</configuration>
					</execution>
				</executions>					
			</plugin>
		</plugins>
	</build>
  
</project>
