<?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>org.bigraphs.dsl.interpreter</groupId>
    <artifactId>bdsl-interpreter-parent</artifactId>
    <name>BDSL Interpreter - Parent</name>
    <description>BDSL Interpreter Framework constitute functionalities for interpreting and executing BDSL models.
        It is organized as multi-module Maven project, featuring the core architecture (visitor design),
        a command-line interface tool, and a shared library for abstract execution logic handling.
    </description>
    <packaging>pom</packaging>
    <version>2.2.1</version>
    <url>https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent</url>

    <modules>
        <module>bdsl-interpreter-core</module>
        <module>bdsl-interpreter-cli</module>
        <module>bdsl-execution-common</module>
    </modules>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <comments>Applies to Bigraph Framework</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>dgrzelak</id>
            <name>Dominik Grzelak</name>
            <email>dominik.grzelak@tu-dresden.de</email>
            <organization>Technische Universität Dresden</organization>
            <organizationUrl>https://tu-dresden.de/ing/informatik/smt/st</organizationUrl>
            <roles>
                <role>Maintainer</role>
            </roles>
            <timezone>+2</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent.git</connection>
        <developerConnection>scm:git@github.com:bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent.git
        </developerConnection>
        <url>https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>central</id>
            <url>https://central.sonatype.com</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
        <!-- p2 repositories -->
        <!-- https://www.eclipse.org/Xtext/documentation/350_continuous_integration.html#maven-tycho-hints -->
        <repository>
            <id>Xtext</id>
            <url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.27.0/</url>
            <layout>p2</layout>
        </repository>
        <repository>
            <id>EMF</id>
            <url>http://download.eclipse.org/modeling/emf/emf/builds/release/2.30</url>
            <layout>p2</layout>
        </repository>
        <repository>
            <id>MWE2MWE</id>
            <url>http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.13.0/</url>
            <layout>p2</layout>
        </repository>
        <repository>
            <id>Eclipse</id>
            <url>http://download.eclipse.org/releases/2022-06</url>
            <layout>p2</layout>
        </repository>
    </repositories>

    <properties>
        <!-- Project-specific -->
        <project.type>multi</project.type>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <doclint>none</doclint>
        <!-- Bigraphs -->
        <bigraph.version>2.2.0</bigraph.version>
        <bdsl.grammar.version>2.0.1</bdsl.grammar.version>
        <bdsl.grammar.local.version>3.0.0-SNAPSHOT</bdsl.grammar.local.version>
        <!-- Other -->
        <xtext.version>2.32.0</xtext.version>
        <emf.codegen.version>2.23.0</emf.codegen.version>
        <emf.ecore.codegen.version>2.35.0</emf.ecore.codegen.version>
        <osgi.service-prefs.version>1.1.2</osgi.service-prefs.version>
        <lombok.version>1.18.34</lombok.version>
        <google.guice.version>5.1.0</google.guice.version>
        <google.guava.version>31.1-jre</google.guava.version>
        <apache.cli.version>1.5.0</apache.cli.version>
        <apache.lang3.version>3.12.0</apache.lang3.version>
        <spring.context.version>5.3.8</spring.context.version>
        <spring.boot.version>2.6.5</spring.boot.version>
        <jupiter.version>5.8.1</jupiter.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <!-- SOURCE -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- JAVADOC -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                        <failOnError>false</failOnError>
                        <release>${maven.compiler.release}</release>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <!-- all, none, html-->
                                <doclint>${doclint}</doclint>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.3</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.8.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>central</publishingServerId>
                        <!--                        <autoPublish>true</autoPublish>-->
                        <!--                        <waitUntil>published</waitUntil>-->
                        <autoPublish>false</autoPublish>
                        <waitUntil>validated</waitUntil>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.xtend</groupId>
                    <artifactId>xtend-maven-plugin</artifactId>
                    <version>${xtext.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-maven-plugin</artifactId>
                    <version>2.7.3</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                    <!--                    <configuration>-->
                    <!--                        <archive>-->
                    <!--                            <manifestEntries>-->
                    <!--                                &lt;!&ndash;class files as source must be available for extension classes&ndash;&gt;-->
                    <!--                                <Contains-Sources>java,class</Contains-Sources>-->
                    <!--                            </manifestEntries>-->
                    <!--                        </archive>-->
                    <!--                    </configuration>-->
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <release>${java.version}</release>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                                <version>${lombok.version}</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring.boot.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-maven-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <!-- disable -->
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.bigraphs.dsl</groupId>
                <artifactId>bdsl-grammar</artifactId>
                <version>${bdsl.grammar.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bigraphs.dsl.interpreter</groupId>
                <artifactId>bdsl-interpreter-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bigraphs.dsl.interpreter</groupId>
                <artifactId>bdsl-interpreter-cli</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bigraphs.dsl.interpreter</groupId>
                <artifactId>bdsl-execution-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bigraphs.framework</groupId>
                <artifactId>bigraph-core</artifactId>
                <version>${bigraph.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bigraphs.framework</groupId>
                <artifactId>bigraph-simulation</artifactId>
                <version>${bigraph.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bigraphs.framework</groupId>
                <artifactId>bigraph-converter</artifactId>
                <version>${bigraph.version}</version>
            </dependency>
            <!-- EMF/Ecore/Etc.-->
            <!--            <dependency>-->
            <!--                <groupId>org.osgi</groupId>-->
            <!--                <artifactId>org.osgi.service.prefs</artifactId>-->
            <!--                <version>${osgi.service-prefs.version}</version>-->
            <!--            </dependency>-->
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${google.guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${google.guava.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.checkerframework</groupId>
                        <artifactId>checker</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- Xtext / EMF -->
            <dependency>
                <groupId>org.eclipse.xtext</groupId>
                <artifactId>org.eclipse.xtext.xtext.generator</artifactId>
                <version>${xtext.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.emf</groupId>
                <artifactId>org.eclipse.emf.codegen</artifactId>
                <version>${emf.codegen.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.emf</groupId>
                <artifactId>org.eclipse.emf.codegen.ecore</artifactId>
                <version>${emf.ecore.codegen.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.xtext</groupId>
                <artifactId>org.eclipse.xtext.util</artifactId>
                <version>${xtext.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.reload4j</groupId>
                        <artifactId>reload4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-reload4j</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.xtext</groupId>
                <artifactId>org.eclipse.xtext</artifactId>
                <version>${xtext.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.reload4j</groupId>
                        <artifactId>reload4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-reload4j</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.xtext</groupId>
                <artifactId>org.eclipse.xtext.xbase</artifactId>
                <version>${xtext.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.xtext</groupId>
                <artifactId>org.eclipse.xtext.common.types</artifactId>
                <version>${xtext.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>${apache.cli.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${apache.lang3.version}</version>
            </dependency>
            <!-- Spring Framework -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <version>${spring.boot.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-autoconfigure</artifactId>
                <version>${spring.boot.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-batch</artifactId>
                <version>${spring.boot.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.context.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>${spring.context.version}</version>
            </dependency>
            <!-- Logging -->
            <!-- For any Maven project in general -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>2.0.17</version>
            </dependency>
            <!-- Logging -->
            <!--            <dependency>-->
            <!--                <groupId>org.slf4j</groupId>-->
            <!--                <artifactId>slf4j-nop</artifactId>-->
            <!--                <version>2.0.7</version>-->
            <!--                <scope>provided</scope>-->
            <!--            </dependency>-->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-reload4j</artifactId>
                <version>2.0.13</version>
                <scope>provided</scope>
            </dependency>
            <!-- Testing -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.eclipse.xtext</groupId>
                <artifactId>org.eclipse.xtext.testing</artifactId>
                <version>${xtext.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.batch</groupId>
                <artifactId>spring-batch-test</artifactId>
                <version>${spring.boot.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.bigraphs.framework</groupId>
            <artifactId>bigraph-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.bigraphs.framework</groupId>
            <artifactId>bigraph-simulation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.bigraphs.framework</groupId>
            <artifactId>bigraph-converter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.bigraphs.dsl</groupId>
            <artifactId>bdsl-grammar</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Logging -->
        <!-- Testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <!-- instead of retrieving the BDSL CE dependency from the Central Repository,
        it can be also installed in the -->
        <!-- local Maven repository by providing the *.jar explicitly. -->
        <profile>
            <id>useLocalLib</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-install-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-bigraph-dsl</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>install-file</goal>
                                </goals>
                                <configuration>
                                    <groupId>org.bigraphs.dsl</groupId>
                                    <artifactId>bdsl-grammar</artifactId>
                                    <version>${bdsl.grammar.version}</version>
                                    <packaging>jar</packaging>
                                    <file>
                                        ${basedir}/assets/libs/org.bigraphs.dsl-${bdsl.grammar.local.version}.jar
                                    </file>
                                    <generatePom>true</generatePom>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- ************************************************ -->
        <!-- Profile for deployment to the Central Repository -->
        <!-- ************************************************ -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>0x26A857F8</keyname>
                                    <passphraseServerId>0x26A857F8</passphraseServerId>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
