
<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">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>project.configuration</artifactId>
    <packaging>bundle</packaging>

    <name>${application.domain}.${project.artifactId}</name>
    <description>Bundle responsible for wiring all together. Build indicators, servers and other configurations.</description>
    
    <parent>
        <groupId>com.cibuddy</groupId>
        <artifactId>main</artifactId>
        <version>1.0.0</version>
    </parent>

    <properties>
        <!-- osgi directives used in the maven-bundle-plugin, defined in the root pom -->
        <bundle.symbolicNameDirective>singleton:=true</bundle.symbolicNameDirective>
        <bundle.symbolicName>${project.name};${bundle.symbolicNameDirective}</bundle.symbolicName>
        <bundle.namespace>${project.name}</bundle.namespace>
        <osgi.bundle.activator>${project.name}.impl.Activator</osgi.bundle.activator>
        <osgi.private.pkg>${project.name}*</osgi.private.pkg>
        <osgi.import.pkg>
            org.osgi.framework;version=[1.3.0','2.0.0),
            *
        </osgi.import.pkg>
        <!--osgi.export.pkg>
            ${project.name};version="1.0.0"
        </osgi.export.pkg-->
        <cibuddy.configuration>/default-behavior-conf.xml</cibuddy.configuration>
    </properties>
  
    <dependencies>
        <!-- project dependencies -->
        <dependency>
            <groupId>${application.domain}</groupId>
            <artifactId>core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- 3rd party dependencies -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.fileinstall</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <!-- test dependencies (scope defined in parent pom) -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.googlecode.pojosr</groupId>
            <artifactId>de.kalpatec.pojosr.framework</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>
    </dependencies>
    
    <build>
        <!-- plugins used -->
        <plugins>
            <!-- create JAXB stubs and infrastructure -->
            <plugin>
                <groupId>com.sun.tools.xjc.maven2</groupId>
                <artifactId>maven-jaxb-plugin</artifactId>
            </plugin>
            <!--plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-xjc-plugin</artifactId>
                <version>2.3.0</version>
                <configuration>
                    <extensions>
                        <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:2.3.0</extension>
                        <extension>org.apache.cxf.xjcplugins:cxf-xjc-ts:2.3.0</extension>
                    </extensions>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <xsdOptions>
                                <xsdOption>
                                    <xsd>src/main/resources/indicator-1.0.xsd</xsd>
                                    <extensionArgs>
                                        <arg>-Xts:style:multiline</arg>
                                        <arg>-Xdv</arg>
                                    </extensionArgs>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin-->
            
            <!-- compile code against java 1.6 -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <!-- attach obsolete artifacts for sonatypes oss (also for 'package' phase) -->
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <!-- enable it being an osgi bundle -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
