<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.esb.platform.runtime.core</groupId>
    <artifactId>initializer</artifactId>
    <version>1.10.1</version>
  </parent>
  <groupId>ru.entaxy.esb.platform.runtime.core.initializer</groupId>
  <artifactId>datasources-initializer</artifactId>
  <packaging>bundle</packaging>
  <name>ENTAXY :: PLATFORM :: RUNTIME :: CORE :: INITIALIZER :: datasources-initializer</name>
  <description>ENTAXY :: PLATFORM :: RUNTIME :: CORE :: INITIALIZER :: datasources-initializer</description>
  
  
  <properties>
        <bundle.osgi.import.pkg>
            *
        </bundle.osgi.import.pkg>
        <!-- bundle.osgi.private.pkg>
        	ru.entaxy.esb.platform.runtime.core.initializer.datasources
        </bundle.osgi.private.pkg -->
  </properties>
    
  <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                    	<Entaxy-Initializer-Class-0>ru.entaxy.esb.platform.runtime.core.initializer.datasources.DataSourcesInitializer?id=datasources&amp;repeat=false&amp;retries=10&amp;interval=2000&amp;depends-on=repositories</Entaxy-Initializer-Class-0>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>src/main/non-packaged-resources/etc/org.ops4j.datasource-entaxy.esb.cache.cfg.pg</file>
                                    <type>cfg.pg</type>
                                    <classifier>datasource-cache</classifier>
                                </artifact>
                                <artifact>
                                    <file>src/main/non-packaged-resources/etc/org.ops4j.datasource-entaxy.esb.storage.cfg.pg</file>
                                    <type>cfg.pg</type>
                                    <classifier>datasource-storage</classifier>
                                </artifact>
                                <artifact>
                                    <file>src/main/non-packaged-resources/etc/org.ops4j.datasource-entaxy.esb.cache.cfg.h2</file>
                                    <type>cfg.h2</type>
                                    <classifier>datasource-cache</classifier>
                                </artifact>
                                <artifact>
                                    <file>src/main/non-packaged-resources/etc/org.ops4j.datasource-entaxy.esb.storage.cfg.h2</file>
                                    <type>cfg.h2</type>
                                    <classifier>datasource-storage</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                     </execution>
                 </executions>
            </plugin>

	  		<plugin>
		        <artifactId>maven-assembly-plugin</artifactId>
		        <version>3.3.0</version>
		        <executions>
		        	<execution>
		        		<id>assebmly</id>
		        		<phase>package</phase>
		        		<goals>
		        			<goal>single</goal>
		        		</goals>
				        <configuration>
				        	<descriptors>
				        		<descriptor>src/main/assembly/datasources.xml</descriptor>
				        	</descriptors>
				        </configuration>
		        	</execution>
		        </executions>
	  		</plugin>
            
         </plugins>
  </build>
  
  
  <dependencies>
  	<dependency>
  		<groupId>ru.entaxy.esb.platform.runtime.core.initializer</groupId>
  		<artifactId>init-manager</artifactId>
  		<version>${project.version}</version>
  	</dependency>
  	<dependency>
  		<groupId>org.osgi</groupId>
  		<artifactId>osgi.core</artifactId>
  	</dependency>  	
  </dependencies>  
  
</project>
