<?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>
    <artifactId>themes</artifactId>
    <groupId>org.opennms.features</groupId>
    <version>24.0.0-SNAPSHOT</version>
  </parent>

    <groupId>org.opennms.features.themes</groupId>
    <artifactId>onms-default-theme</artifactId>
    <packaging>bundle</packaging>

    <name>OpenNMS :: Features :: Vaadin :: Theme :: Default</name>

    <properties>
        <bundle.symbolicname>org.opennms.features.topology.themes.default-theme</bundle.symbolicname>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.core</groupId>
            <artifactId>org.opennms.core.web-assets</artifactId>
	    <version>${project.version}</version>
	    <classifier>dist</classifier>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
		<filtering>true</filtering>
            </resource>
            <resource>
                <directory>${project.build.outputDirectory}</directory>
            </resource>
        </resources>
        
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scmDirectory>../../..</scmDirectory>
                    <shortRevisionLength>8</shortRevisionLength>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <revisionOnScmFailure>0</revisionOnScmFailure>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outputDirectory>${project.build.outputDirectory}/VAADIN/themes/opennms</outputDirectory>
                    <artifactItems>
                        <artifactItem>
                            <groupId>org.opennms.core</groupId>
                            <artifactId>org.opennms.core.web-assets</artifactId>
                            <classifier>dist</classifier>
                            <overWrite>true</overWrite>
                            <excludes>WEB-INF/**</excludes>
                        </artifactItem>
                    </artifactItems>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Fragment-Host>com.vaadin.themes;bundle-version=${vaadinVersion}</Fragment-Host>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
