<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>nifi-asn1-bundle</artifactId>
        <groupId>org.apache.nifi</groupId>
        <version>2.3.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>nifi-asn1-services</artifactId>

    <dependencies>

        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-record-serialization-service-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-record</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-utils</artifactId>
        </dependency>

        <dependency>
            <groupId>com.beanit</groupId>
            <artifactId>asn1bean</artifactId>
            <version>1.14.0</version>
        </dependency>
        <dependency>
            <groupId>com.beanit</groupId>
            <artifactId>asn1bean-compiler</artifactId>
            <version>1.14.0</version>
        </dependency>
        <dependency>
            <groupId>com.beanit</groupId>
            <artifactId>jasn1-compiler</artifactId>
            <version>1.11.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
        </dependency>
        <dependency>
            <groupId>antlr</groupId>
            <artifactId>antlr</artifactId>
            <version>2.7.7</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-asn</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>

                        <configuration>
                            <mainClass>com.beanit.asn1bean.compiler.Compiler</mainClass>
                            <arguments>
                                <argument>-f</argument>
                                <argument>${basedir}/src/test/resources/simple_types.asn</argument>
                                <argument>${basedir}/src/test/resources/complex_types.asn</argument>
                                <argument>${basedir}/src/test/resources/example.asn</argument>
                                <argument>${basedir}/src/test/resources/tbcd_string.asn</argument>
                                <argument>-o</argument>
                                <argument>${basedir}/target/generated-test-sources</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.4.0</version>
                <executions>
                    <execution>
                        <id>add-test-sources</id>
                        <phase>process-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/target/generated-test-sources</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>checkstyle-suppressions.xml</exclude>
                        <exclude>src/test/resources/test.asn</exclude>
                        <exclude>src/test/resources/example.asn</exclude>
                        <exclude>src/test/resources/simple_types.asn</exclude>
                        <exclude>src/test/resources/complex_types.asn</exclude>
                        <exclude>src/test/resources/tbcd_string.asn</exclude>
                        <exclude>src/test/resources/cant_parse.asn</exclude>
                        <exclude>src/test/resources/cant_compile.asn</exclude>
                        <exclude>src/test/resources/cant_compile_mac_windows.asn</exclude>
                        <exclude>src/test/resources/examples/basic-types.dat</exclude>
                        <exclude>src/test/resources/examples/composite.dat</exclude>
                        <exclude>src/test/resources/examples/tbcd-string.dat</exclude>
                        <exclude>src/test/resources/test_hugging_comment.asn</exclude>
                        <exclude>src/test/resources/test_version_bracket.asn</exclude>
                        <exclude>src/test/resources/test_constraints.asn</exclude>
                        <exclude>src/test/resources/test_complex_for_preprocessing.asn</exclude>
                        <exclude>src/test/resources/preprocessed_test_hugging_comment.asn</exclude>
                        <exclude>src/test/resources/preprocessed_test_version_bracket.asn</exclude>
                        <exclude>src/test/resources/preprocessed_test_constraints.asn</exclude>
                        <exclude>src/test/resources/preprocessed_test_complex_for_preprocessing.asn</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <suppressionsLocation>${basedir}/checkstyle-suppressions.xml</suppressionsLocation>
                    <sourceDirectories>
                        <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                        <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
                    </sourceDirectories>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
