<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <name>DeepaMehta 4 Plugin Parent</name>
    <groupId>de.deepamehta</groupId>
    <artifactId>deepamehta-plugin-parent</artifactId>
    <version>4.4.3</version>
    <packaging>pom</packaging>

    <parent>
        <groupId>de.deepamehta</groupId>
        <artifactId>deepamehta-global</artifactId>
        <version>4.4.3</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <!-- pre-configured plugin environment -->
    <properties>

        <!-- Webserver -->
        <org.osgi.service.http.port>8080</org.osgi.service.http.port>
        <org.osgi.service.http.port.secure>4433</org.osgi.service.http.port.secure>
        <!-- ### TODO: adapt to Pax Web (see global pom.xml) -->
        <org.apache.felix.http.enable>true</org.apache.felix.http.enable>
        <org.apache.felix.https.enable>false</org.apache.felix.https.enable>
        <org.apache.felix.https.keystore.password></org.apache.felix.https.keystore.password>
        <org.apache.felix.https.keystore.key.password></org.apache.felix.https.keystore.key.password>

        <!-- Request Filter -->
        <dm4.security.read_requires_login>false</dm4.security.read_requires_login>
        <dm4.security.write_requires_login>true</dm4.security.write_requires_login>
        <dm4.security.subnet_filter>127.0.0.1/32</dm4.security.subnet_filter>

        <!-- Host -->
        <dm4.host.url>http://localhost:${org.osgi.service.http.port}/</dm4.host.url>

        <!-- Database -->
        <dm4.database.path>${project.basedir}/deepamehta-db</dm4.database.path>

        <!-- File Repository -->
        <dm4.filerepo.path></dm4.filerepo.path>

        <!-- a plugin should provide a logging configuration -->
        <java.util.logging.config.file>
            ${project.basedir}/src/main/resources/logging.properties
        </java.util.logging.config.file>
        <felix.log.level>1</felix.log.level>

        <file.encoding>UTF-8</file.encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>

            <!-- JAX-RS API -->
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>1.1.1</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>

            <!-- Servlet API -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.0.1</version>
                <scope>provided</scope><!-- ### TODO: drop scope to let 3rd-party plugins inherit? -->
                <optional>true</optional>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>1.3.2</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>de.deepamehta</groupId>
            <artifactId>deepamehta-core</artifactId>
            <version>4.4.3</version>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>3.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.3.7</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Activator>
                            de.deepamehta.core.osgi.PluginActivator
                        </Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.ops4j</groupId>
                <artifactId>maven-pax-plugin</artifactId>
                <version>1.4</version>
                <configuration>
                    <runner>1.7.5</runner>
                    <widenScope>true</widenScope>
                    <deployURLs>
                        mvn:de.deepamehta/3rd-party-bundles/4.4.3/pom,
                        mvn:de.deepamehta/felix-bundles/4.4.3/pom,
                        mvn:de.deepamehta/deepamehta-bundles/4.4.3/pom
                    </deployURLs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>
                    <show>private</show>
                    <linksource>true</linksource>
                    <links>
                        <link>http://api.deepamehta.de/deepamehta/4.4.3</link>
                    </links>
                    <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
                    <docletArtifact>
                        <groupId>org.umlgraph</groupId>
                        <artifactId>umlgraph</artifactId>
                        <version>5.6</version>
                    </docletArtifact>
                    <additionalparam>-collapsible -hide java.* -hide
                        org.* -inferdepvis public -inferrel</additionalparam>
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
