<?xml version="1.0" encoding="UTF-8"?>
<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">
    <parent>
        <groupId>org.aperteworkflow</groupId>
        <artifactId>samples</artifactId>
        <version>3.0-beta1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>incident-process-plugin</artifactId>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>model</artifactId>
            <version>3.0-beta1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>integration-interface</artifactId>
            <version>3.0-beta1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.portlet</groupId>
            <artifactId>portlet-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <version>2.3.7</version>
                <configuration>
                    <instructions>
                        <Export-Package>
                            org.aperteworkflow.sample.process.incident.controller,
                            org.aperteworkflow.sample.process.incident.steps,
                            org.aperteworkflow.sample.process.incident.widget
                        </Export-Package>
                        <Import-Package>
                            pl.net.bluesoft.rnd.processtool.web.controller,
                            org.aperteworkflow.ui.help.datatable,
                            *
                        </Import-Package>
                        <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
                        <Bundle-Activator>org.aperteworkflow.sample.process.incident.Activator</Bundle-Activator>
                        <Bundle-SymbolicName>org.aperteworkflow.sample.process.incident</Bundle-SymbolicName>
                        <Bundle-Version>0.1</Bundle-Version>
                        <Embed-Directory>lib</Embed-Directory>
                        <Embed-Transitive>true</Embed-Transitive>
                        <ProcessTool-I18N-Property>messages</ProcessTool-I18N-Property>
                        <ProcessTool-Controller>org.aperteworkflow.sample.process.incident.controller.MainController</ProcessTool-Controller>
                        <ProcessTool-Widget-View>
                            org.aperteworkflow.sample.process.incident.widget.IncidentRequestWidget,
                            org.aperteworkflow.sample.process.incident.widget.ConfirmationWidget
                        </ProcessTool-Widget-View>
                        <ProcessTool-Step-Enhancement>
                            org.aperteworkflow.sample.process.incident.steps.SampleCustomStep
                        </ProcessTool-Step-Enhancement>
                        <ProcessTool-Global-Dictionary>org.aperteworkflow.sample.process.incident.dict</ProcessTool-Global-Dictionary>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <!-- Profil dev do automatycznego kopiowania jarow do osgi -->
    <profiles>

        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>copy</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>${project.groupId}</groupId>
                                            <artifactId>${project.artifactId}</artifactId>
                                            <type>jar</type>
                                            <version>${project.version}</version>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>${osgi.dir}</outputDirectory>
                                            <destFileName>${project.artifactId}-${project.version}.jar</destFileName>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>