<!--

    Copyright (c) 2015 Bosch Software Innovations GmbH and others.

    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html

-->
<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.eclipse.hawkbit</groupId>
      <artifactId>hawkbit-parent</artifactId>
      <version>0.2.0M1</version>
   </parent>
   <artifactId>hawkbit-test-report</artifactId>
   <name>hawkBit :: Test Report</name>

   <packaging>pom</packaging>

   <profiles>
      <profile>
         <id>generateTestReport</id>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-resources-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>copy-resources</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                           <outputDirectory>${basedir}/target/allure-results</outputDirectory>
                           <resources>
                              <resource>
                                 <directory>${basedir}/..</directory>
                                 <filtering>false</filtering>
                                 <includes>
                                    <include>**/target/allure-results/*.xml</include>
                                 </includes>
                              </resource>
                              <resource>
                                 <directory>${basedir}</directory>
                                 <filtering>false</filtering>
                                 <includes>
                                    <include>placeholder.txt</include>
                                 </includes>
                              </resource>
                           </resources>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-assembly-plugin</artifactId>
                  <configuration>
                     <descriptors>
                        <descriptor>src/main/assembly/test-report.xml</descriptor>
                     </descriptors>
                     <appendAssemblyId>false</appendAssemblyId>
                  </configuration>
                  <executions>
                     <execution>
                        <id>create-report-zip-assembly</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>single</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>