<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright (C) 2024, 2025 Obeo

   All rights reserved. This program and the accompanying materials
   are made available under the terms of the Eclipse Public License v2.0
   which accompanies this distribution, and is available at
   http://www.eclipse.org/legal/epl-v20.html
-->

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <properties>
    <antlr-version>4.13.2</antlr-version>
  </properties>

  <parent>
    <groupId>org.eclipse.acceleo</groupId>
    <artifactId>org.eclipse.acceleo-parent</artifactId>
    <version>4.2.4</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>aql</artifactId>
  <version>8.1.4</version>
  <packaging>jar</packaging>  

  <dependencies>
    <dependency>
      <groupId>org.eclipse.acceleo</groupId>
      <artifactId>org.eclipse.acceleo.annotations</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.acceleo</groupId>
      <artifactId>org.eclipse.acceleo.query</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
      <version>${antlr-version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.emf</groupId>
      <artifactId>org.eclipse.emf.common</artifactId>
      <version>[2.8.0,3.0.0)</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.emf</groupId>
      <artifactId>org.eclipse.emf.ecore</artifactId>
      <version>[2.8.0,3.0.0)</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>${maven-dependency-plugin-version}</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
              <overWriteIfNewer>true</overWriteIfNewer>
              <copyPom>true</copyPom>
            </configuration>
          </execution>
          <execution>
            <id>copy-sources-dependencies</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
              <overWriteIfNewer>true</overWriteIfNewer>
              <copyPom>true</copyPom>
            </configuration>
          </execution>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>sources</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbose>true</verbose>
          <detail>true</detail>
          <outputDirectory>${project.build.directory}/lib</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>${maven-deploy-plugin-version}</version>
        <executions>
          <execution>
            <id>deploy-file-org.eclipse.acceleo.annotations</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>target/lib/org.eclipse.acceleo.annotations-${project.version}.jar</file>
              <sources>target/lib/org.eclipse.acceleo.annotations-${project.version}-sources.jar</sources>
              <groupId>org.eclipse.acceleo</groupId>
              <artifactId>org.eclipse.acceleo.annotations</artifactId>
              <version>${project.version}</version>
              <packaging>jar</packaging>
              <generatePom>true</generatePom>
              <url>${deployURL}</url>
            </configuration>
          </execution>
          <execution>
            <id>deploy-file-org.eclipse.acceleo.query</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <file>target/lib/org.eclipse.acceleo.query-${project.version}.jar</file>
              <sources>target/lib/org.eclipse.acceleo.query-${project.version}-sources.jar</sources>
              <groupId>org.eclipse.acceleo</groupId>
              <artifactId>org.eclipse.acceleo.query</artifactId>
              <version>${project.version}</version>
              <packaging>jar</packaging>
              <generatePom>true</generatePom>
              <url>${deployURL}</url>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
