<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/maven-v4_0_0.xsd">
    <parent>
        <artifactId>samples</artifactId>
        <groupId>org.aperteworkflow</groupId>
        <version>3.2-RC1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>application-ws</artifactId>
    <packaging>bundle</packaging>
    <name>application-ws</name>

    <properties>
        <cxf.version>2.4.4</cxf.version>
        <jaxb.version>2.2.6</jaxb.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>integration-interface</artifactId>
            <version>3.2-RC1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>gui-commons</artifactId>
            <version>3.2-RC1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>${freemarker.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.web</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>


        <dependency>
            <artifactId>files-repository</artifactId>
            <groupId>org.aperteworkflow</groupId>
            <version>3.2-RC1</version>
            <scope>provided</scope>
        </dependency>



        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <scope>provided</scope>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-security</artifactId>
            <version>${cxf.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <artifactId>case-management</artifactId>
            <groupId>org.aperteworkflow</groupId>
            <version>3.2-RC1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>application-ws-schema</artifactId>
            <version>3.2-RC1</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>interactive-reports</artifactId>
            <version>3.2-RC1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>net.sf.dozer</groupId>
            <artifactId>dozer</artifactId>
            <version>5.5.1</version>
        </dependency>

        <dependency>
            <groupId>org.xhtmlrenderer</groupId>
            <artifactId>flying-saucer-pdf</artifactId>
            <version>9.0.7</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.htmlcleaner</groupId>
            <artifactId>htmlcleaner</artifactId>
            <version>2.10</version>
            <exclusions>
                <exclusion>
                    <groupId>org.jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.4</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <version>${maven.bundle.version}</version>
                <configuration>
                    <instructions>
                        <Export-Package>
                            org.aperteworkflow.samples.application.service
                        </Export-Package>

                        <Import-Package>
                            org.aperteworkflow.files,
                            org.aperteworkflow.files.dao,
                            org.aperteworkflow.files.exceptions,
                            org.aperteworkflow.osgi,
                            pl.net.bluesoft.casemanagement.model,
                            pl.net.bluesoft.casemanagement.controller.bean,
                            pl.net.bluesoft.casemanagement.controller,
                            pl.net.bluesoft.casemanagement.ui,
                            pl.net.bluesoft.casemanagement,
                            <!--pl.net.bluesoft.reports.config;version="1.0.0",
                            pl.net.bluesoft.reports.data;version="1.0.0",
                            pl.net.bluesoft.reports.service;version="1.0.0",
                            pl.net.bluesoft.reports.service.impl;version="1.0.0",
                            pl.net.bluesoft.reports.beans;version="1.0.0",-->
                            org.apache.cxf,
                            org.apache.cxf.annotations,
                            org.apache.cxf.attachment,
                            org.apache.cxf.binding,
                            org.apache.cxf.binding.soap,
                            org.apache.cxf.binding.soap.blueprint,
                            org.apache.cxf.binding.soap.interceptor,
                            org.apache.cxf.binding.soap.jms,
                            org.apache.cxf.binding.soap.jms.interceptor,
                            org.apache.cxf.binding.soap.model,
                            org.apache.cxf.binding.soap.saaj,
                            org.apache.cxf.binding.soap.spring,
                            org.apache.cxf.binding.soap.tcp,
                            org.apache.cxf.binding.soap.tcp.frames,
                            org.apache.cxf.binding.soap.wsdl11,
                            org.apache.cxf.binding.xml,
                            org.apache.cxf.binding.xml.interceptor,
                            org.apache.cxf.binding.xml.wsdl11,
                            org.apache.cxf.bindings,
                            org.apache.cxf.bindings.xformat,
                            org.apache.cxf.bus,
                            org.apache.cxf.bus.blueprint,
                            org.apache.cxf.bus.extension,
                            org.apache.cxf.bus.osgi,
                            org.apache.cxf.bus.resource,
                            org.apache.cxf.bus.spring,
                            org.apache.cxf.buslifecycle,
                            org.apache.cxf.catalog,
                            org.apache.cxf.clustering,
                            org.apache.cxf.clustering.spring,
                            org.apache.cxf.common,
                            org.apache.cxf.common.annotation,
                            org.apache.cxf.common.classloader,
                            org.apache.cxf.common.commands,
                            org.apache.cxf.common.i18n,
                            org.apache.cxf.common.injection,
                            org.apache.cxf.common.logging,
                            org.apache.cxf.common.security,
                            org.apache.cxf.common.util,
                            org.apache.cxf.common.xmlschema,
                            org.apache.cxf.configuration,
                            org.apache.cxf.configuration.blueprint,
                            org.apache.cxf.configuration.jsse,
                            org.apache.cxf.configuration.jsse.spring,
                            org.apache.cxf.configuration.security,
                            org.apache.cxf.configuration.spring,
                            org.apache.cxf.continuations,
                            org.apache.cxf.databinding,
                            org.apache.cxf.databinding.source,
                            org.apache.cxf.databinding.source.mime,
                            org.apache.cxf.databinding.stax,
                            org.apache.cxf.endpoint,
                            org.apache.cxf.endpoint.dynamic,
                            org.apache.cxf.extension,
                            org.apache.cxf.feature,
                            org.apache.cxf.frontend,
                            org.apache.cxf.frontend.blueprint,
                            org.apache.cxf.frontend.spring,
                            org.apache.cxf.headers,
                            org.apache.cxf.helpers,
                            org.apache.cxf.interceptor,
                            org.apache.cxf.interceptor.security,
                            org.apache.cxf.interceptor.transform,
                            org.apache.cxf.io,
                            org.apache.cxf.jaxb,
                            org.apache.cxf.jaxb.attachment,
                            org.apache.cxf.jaxb.io,
                            org.apache.cxf.jaxws,
                            org.apache.cxf.jaxws.binding,
                            org.apache.cxf.jaxws.binding.http,
                            org.apache.cxf.jaxws.binding.soap,
                            org.apache.cxf.jaxws.blueprint,
                            org.apache.cxf.jaxws.context,
                            org.apache.cxf.jaxws.endpoint,
                            org.apache.cxf.jaxws.endpoint.dynamic,
                            org.apache.cxf.jaxws.handler,
                            org.apache.cxf.jaxws.handler.logical,
                            org.apache.cxf.jaxws.handler.soap,
                            org.apache.cxf.jaxws.interceptors,
                            org.apache.cxf.jaxws.javaee,
                            org.apache.cxf.jaxws.spi,
                            org.apache.cxf.jaxws.spring,
                            org.apache.cxf.jaxws.support,
                            org.apache.cxf.jaxws22,
                            org.apache.cxf.jaxws22.spi,
                            org.apache.cxf.jaxws22.spring,
                            org.apache.cxf.jca,
                            org.apache.cxf.jca.outbound,
                            org.apache.cxf.logging,
                            org.apache.cxf.management,
                            org.apache.cxf.management.annotation,
                            org.apache.cxf.message,
                            org.apache.cxf.phase,
                            org.apache.cxf.resource,
                            org.apache.cxf.security,
                            org.apache.cxf.security.transport,
                            org.apache.cxf.service,
                            org.apache.cxf.service.factory,
                            org.apache.cxf.service.invoker,
                            org.apache.cxf.service.model,
                            org.apache.cxf.simple,
                            org.apache.cxf.staxutils,
                            org.apache.cxf.staxutils.transform,
                            org.apache.cxf.test,
                            org.apache.cxf.tools,
                            org.apache.cxf.tools.common,
                            org.apache.cxf.tools.common.dom,
                            org.apache.cxf.tools.common.extensions,
                            org.apache.cxf.tools.common.extensions.soap,
                            org.apache.cxf.tools.common.jaxb,
                            org.apache.cxf.tools.common.model,
                            org.apache.cxf.tools.common.toolspec,
                            org.apache.cxf.tools.common.toolspec.parser,
                            org.apache.cxf.tools.util,
                            org.apache.cxf.tools.validator,
                            org.apache.cxf.transport,
                            org.apache.cxf.transport.common,
                            org.apache.cxf.transport.common.gzip,
                            org.apache.cxf.transport.http,
                            org.apache.cxf.transport.http.auth,
                            org.apache.cxf.transport.http.policy,
                            org.apache.cxf.transport.http.spring,
                            org.apache.cxf.transport.http_jaxws_spi,
                            org.apache.cxf.transport.https,
                            org.apache.cxf.transport.servlet,
                            org.apache.cxf.transport.servlet.servicelist,
                            org.apache.cxf.transports,
                            org.apache.cxf.transports.http,
                            org.apache.cxf.transports.http.configuration,
                            org.apache.cxf.version,
                            org.apache.cxf.workqueue,
                            org.apache.cxf.ws,
                            org.apache.cxf.ws.addressing,
                            org.apache.cxf.ws.addressing.blueprint,
                            org.apache.cxf.ws.addressing.policy,
                            org.apache.cxf.ws.addressing.soap,
                            org.apache.cxf.ws.addressing.spring,
                            org.apache.cxf.ws.addressing.v200403,
                            org.apache.cxf.ws.addressing.v200408,
                            org.apache.cxf.ws.addressing.wsdl,
                            org.apache.cxf.ws.policy,
                            org.apache.cxf.ws.policy.builder,
                            org.apache.cxf.ws.policy.builder.jaxb,
                            org.apache.cxf.ws.policy.builder.primitive,
                            org.apache.cxf.ws.security,
                            org.apache.cxf.ws.security.kerberos,
                            org.apache.cxf.ws.security.policy,
                            org.apache.cxf.ws.security.policy.builders,
                            org.apache.cxf.ws.security.policy.custom,
                            org.apache.cxf.ws.security.policy.interceptors,
                            org.apache.cxf.ws.security.policy.model,
                            org.apache.cxf.ws.security.sts,
                            org.apache.cxf.ws.security.sts.provider,
                            org.apache.cxf.ws.security.sts.provider.model,
                            org.apache.cxf.ws.security.sts.provider.model.secext,
                            org.apache.cxf.ws.security.sts.provider.model.utility,
                            org.apache.cxf.ws.security.sts.provider.model.wstrust14,
                            org.apache.cxf.ws.security.sts.provider.model.xmldsig,
                            org.apache.cxf.ws.security.sts.provider.operation,
                            org.apache.cxf.ws.security.tokenstore,
                            org.apache.cxf.ws.security.trust,
                            org.apache.cxf.ws.security.trust.delegation,
                            org.apache.cxf.ws.security.wss4j,
                            org.apache.cxf.ws.security.wss4j.policyhandlers,
                            org.apache.cxf.ws.security.wss4j.policyvalidators,
                            org.apache.cxf.wsdl,
                            org.apache.cxf.wsdl.http,
                            org.apache.cxf.wsdl1,
                            freemarker.cache;version="2.3.22",
                            freemarker.template;version="2.3.22",
                            com.google.common.io;version="14.0.1",
                            com.google.common;version="14.0.1",
                            pl.net.bluesoft.rnd.processtool,
                            pl.net.bluesoft.rnd.processtool.bpm,
                            pl.net.bluesoft.rnd.processtool.model,
                            pl.net.bluesoft.rnd.processtool.plugins,
                            org.osgi.framework,
                            org.aperteworkflow.samples.application.service,
                            *;resolution:=optional
                        </Import-Package>
                        <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
                        <Bundle-SymbolicName>org.aperteworkflow.samples.application.ws</Bundle-SymbolicName>
                        <Bundle-Version>0.1</Bundle-Version>
                        <Embed-Directory>lib</Embed-Directory>
                        <Embed-Transitive>true</Embed-Transitive>
                        <Bundle-Activator>org.aperteworkflow.samples.application.ws.Activator</Bundle-Activator>
                        <ProcessTool-Spring-Beans>
                            org.aperteworkflow.samples.application.ws.beans.RegisterApplicationServiceImpl
                        </ProcessTool-Spring-Beans>
                    </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-installed</id>
                                <phase>install</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>
