| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <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>metron-debs</artifactId> |
| <packaging>pom</packaging> |
| <name>metron-debs</name> |
| <version>0.6.0</version> |
| <parent> |
| <groupId>org.apache.metron</groupId> |
| <artifactId>metron-deployment</artifactId> |
| <version>0.6.0</version> |
| <relativePath>../../..</relativePath> |
| </parent> |
| <description>DEB Package Builder for Apache Metron</description> |
| <properties> |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| <docker.tag>deb-docker</docker.tag> |
| <metron_dir>${project.parent.relativePath}/..</metron_dir> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |
| <version>3.0.0</version> |
| <configuration> |
| <filesets> |
| <fileset> |
| <directory>target</directory> |
| <followSymlinks>false</followSymlinks> |
| <includes> |
| <include>**/*</include> |
| </includes> |
| </fileset> |
| <fileset> |
| <directory>.npm</directory> |
| <includes> |
| <include>**/*</include> |
| </includes> |
| </fileset> |
| </filesets> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-resources-plugin</artifactId> |
| <version>3.0.1</version> |
| <executions> |
| <execution> |
| <id>copy-deb-sources</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.basedir}/target</outputDirectory> |
| <resources> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-common/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-data-management/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-elasticsearch/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-enrichment/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-indexing/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-management/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-parsers/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-pcap-backend/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-platform/metron-solr/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-analytics/metron-profiler/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-interface/metron-rest/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-interface/metron-config/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-analytics/metron-maas-service/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-interface/metron-alerts/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| <resource> |
| <directory>${metron_dir}/metron-contrib/metron-performance/target/</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| </includes> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>InDocker</id> |
| <activation> |
| <file> |
| <!-- If this file exists, then we are running in docker already --> |
| <exists>/.dockerenv</exists> |
| </file> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.5.0</version> |
| <executions> |
| <execution> |
| <id>deb-build</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>/bin/bash</executable> |
| <arguments> |
| <argument>-x</argument> |
| <argument>-c</argument> |
| <argument>./build.sh ${project.version}</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>NeedsDocker</id> |
| <activation> |
| <file> |
| <!-- if this file doesn't exist, then we need to run docker --> |
| <missing>/.dockerenv</missing> |
| </file> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.5.0</version> |
| <executions> |
| <execution> |
| <id>docker-build</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>docker</executable> |
| <arguments> |
| <argument>build</argument> |
| <argument>-f</argument> |
| <argument>Dockerfile</argument> |
| <argument>-t</argument> |
| <argument>${docker.tag}</argument> |
| <argument>.</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>deb-build</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>docker</executable> |
| <arguments> |
| <argument>run</argument> |
| <argument>-v</argument> |
| <argument>${project.basedir}:/root</argument> |
| <argument>${docker.tag}:latest</argument> |
| <argument>/bin/bash</argument> |
| <argument>-c</argument> |
| <argument>./build.sh ${project.version}</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |