gateway-module-base
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.microsoft.azure.gateway</groupId>
<artifactId>gateway-module-base</artifactId>
<version>1.0.2</version>
</dependency><?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>
<groupId>com.microsoft.azure.gateway</groupId>
<artifactId>gateway-module-base</artifactId>
<version>1.0.2</version>
<packaging>pom</packaging>
<name>Azure IoT Edge Module Parent POM</name>
<description>Azure IoT Edge Module Parent POM</description>
<url>https://github.com/Azure/iot-edge</url>
<developers>
<developer>
<id>microsoft</id>
<name>Microsoft</name>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/Azure/iot-edge</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<!-- Azure IoT gateway module interface -->
<dependency>
<groupId>com.microsoft.azure.gateway</groupId>
<artifactId>gateway-java-binding</artifactId>
<version>1.1.0</version>
<scope>compile</scope>
</dependency>
<!-- Azure IoT gateway runtime -->
<dependency>
<groupId>${dependency.runtime.group}</groupId>
<artifactId>${dependency.runtime.name}</artifactId>
<version>${dependency.runtime.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<!-- Set Win32 dependency variables -->
<profile>
<id>win32_profile</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<dependency.runtime.group>com.microsoft.azure.gateway</dependency.runtime.group>
<dependency.runtime.name>gateway-win32</dependency.runtime.name>
<dependency.runtime.version>1.0.2</dependency.runtime.version>
<unpack.dependency.includes>*.dll, gw.exe</unpack.dependency.includes>
</properties>
</profile>
<!-- Set Linux dependency variables -->
<profile>
<id>linux_profile</id>
<activation>
<os>
<family>Linux</family>
</os>
</activation>
<properties>
<dependency.runtime.group>com.microsoft.azure.gateway</dependency.runtime.group>
<dependency.runtime.name>gateway-linux</dependency.runtime.name>
<dependency.runtime.version>1.0.2</dependency.runtime.version>
<unpack.dependency.includes>*.so, *.so.*, gw</unpack.dependency.includes>
</properties>
</profile>
</profiles>
<build>
<!-- Exclude module configuration file from JAR -->
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>gateway/*.json</exclude>
</excludes>
</resource>
</resources>
<pluginManagement>
<plugins>
<!-- Unzip and copy Azure IoT gateway module runtime package to project build root folder -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>unpack_binaries</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>${dependency.runtime.group}</includeGroupIds>
<includeArtifactIds>${dependency.runtime.name}</includeArtifactIds>
<outputDirectory>${project.build.directory}</outputDirectory>
<includes>${unpack.dependency.includes}</includes>
</configuration>
</execution>
<execution>
<id>copy_runtime</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>${dependency.runtime.group}</groupId>
<artifactId>${dependency.runtime.name}</artifactId>
<type>jar</type>
<destFileName>gateway.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy module configuration file to project build root folder -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources/gateway</directory>
<includes>
<include>*.json</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Wrap all dependencies into the final module package (exclude signatures and binaries) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>with-deps</shadedClassifierName>
<artifactSet>
<excludes>
<exclude>${dependency.runtime.group}:${dependency.runtime.name}</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<!-- Run the executable JAR -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<workingDirectory>target</workingDirectory>
<arguments>
<argument>-jar</argument>
<argument>gateway.jar</argument>
<argument>${gw.config.fileName}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>