blob: b9a07e77f6df3bbfa5d8071d9f5372cca47b3040 [file] [log] [blame]
<?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>
<parent>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-parent</artifactId>
<version>0.8.0</version>
</parent>
<artifactId>plc4go</artifactId>
<packaging>mvn-golang</packaging>
<name>PLC4Go</name>
<description>Implementation of the protocol adapters for usage as Go(lang) library.</description>
<build>
<sourceDirectory>cmd</sourceDirectory>
<plugins>
<!-- Copy the test-resources in here -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-protocol-test-suites</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-bacnetip</artifactId>
<classifier>tests</classifier>
<type>test-jar</type>
<outputDirectory>${project.basedir}/assets/testing</outputDirectory>
<includes>**/*.xml</includes>
<excludes>META-INF/**</excludes>
</artifactItem>
<artifactItem>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-knxnetip</artifactId>
<classifier>tests</classifier>
<type>test-jar</type>
<outputDirectory>${project.basedir}/assets/testing</outputDirectory>
<includes>**/*.xml</includes>
<excludes>META-INF/**,org/**</excludes>
</artifactItem>
<artifactItem>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-modbus</artifactId>
<classifier>tests</classifier>
<type>test-jar</type>
<outputDirectory>${project.basedir}/assets/testing</outputDirectory>
<includes>**/*.xml</includes>
<excludes>META-INF/**</excludes>
</artifactItem>
<artifactItem>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-s7</artifactId>
<classifier>tests</classifier>
<type>test-jar</type>
<outputDirectory>${project.basedir}/assets/testing</outputDirectory>
<includes>**/*.xml</includes>
<excludes>META-INF/**,org/**</excludes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!--
Generate the driver code.
-->
<plugin>
<groupId>org.apache.plc4x.plugins</groupId>
<artifactId>plc4x-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-driver-bacnetip</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>bacnetip</protocolName>
<languageName>go</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/internal</outputDir>
</configuration>
</execution>
<execution>
<id>generate-driver-knxnetip</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>knxnetip</protocolName>
<languageName>go</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/internal</outputDir>
</configuration>
</execution>
<execution>
<id>generate-driver-modbus</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>modbus</protocolName>
<languageName>go</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/internal</outputDir>
</configuration>
</execution>
<execution>
<id>generate-driver-s7</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>s7</protocolName>
<languageName>go</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/internal</outputDir>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.igormaznitsa</groupId>
<artifactId>mvn-golang-wrapper</artifactId>
<version>2.3.6</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default-fix</id>
<!-- Move the execution of this after the code generation -->
<phase>process-sources</phase>
<goals>
<goal>fix</goal>
</goals>
</execution>
<!-- Move the execution of this after the code generation -->
<execution>
<id>default-get</id>
<phase>process-sources</phase>
<goals>
<goal>get</goal>
</goals>
</execution>
<execution>
<id>run-go-vet</id>
<phase>verify</phase>
<goals>
<goal>vet</goal>
</goals>
</execution>
</executions>
<configuration>
<packages>
<package>github.com/apache/plc4x/plc4go/cmd/main</package>
</packages>
<sources>${project.basedir}</sources>
</configuration>
</plugin>
</plugins>
</build>
<!-- This dependency is just to ensure thrift is built first -->
<dependencies>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-build-utils-language-go</artifactId>
<version>0.8.0</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-bacnetip</artifactId>
<version>0.8.0</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-knxnetip</artifactId>
<version>0.8.0</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-modbus</artifactId>
<version>0.8.0</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-s7</artifactId>
<version>0.8.0</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
</dependencies>
</project>