<?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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.opendaylight.openflowplugin</groupId>
        <artifactId>openflowplugin-parent</artifactId>
        <version>0.6.2</version>
        <relativePath>../parent</relativePath>
    </parent>

    <groupId>org.opendaylight.openflowplugin.openflowjava</groupId>
    <artifactId>openflowjava-parent</artifactId>
    <packaging>pom</packaging>

    <modules>
        <module>features-openflowjava-aggregator</module>
        <module>openflowjava-blueprint-config</module>
        <module>openflow-protocol-api</module>
        <module>openflow-protocol-impl</module>
        <module>openflow-protocol-it</module>
        <module>openflow-protocol-spi</module>
        <module>openflowjava-util</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                    </instructions>
                    <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.8</version>
                    <executions>
                        <execution>
                            <id>add-source</id>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <phase>generate-sources</phase>
                            <configuration>
                                <sources>
                                    <source>src/main/yang</source>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>viewbuild</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <build.suffix>${project.version}</build.suffix>
            </properties>
        </profile>
        <profile>
            <id>jenkins</id>
            <activation>
                <property>
                    <name>BUILDSUFFIX</name>
                </property>
            </activation>
            <properties>
                <build.suffix>${BUILDSUFFIX}</build.suffix>
            </properties>
        </profile>
        <profile>
            <id>repoBuild</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.8.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>aggregate</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
