<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.maven</groupId>
    <artifactId>maven</artifactId>
    <version>4.0.0-alpha-1-SNAPSHOT</version>
  </parent>

  <artifactId>maven-model</artifactId>

  <name>Maven Model</name>
  <description>Model for Maven POM (Project Object Model)</description>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-api-model</artifactId>
      <version>4.0.0-alpha-1-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-xml</artifactId>
      <version>4.0.0-alpha-1-SNAPSHOT</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>copy-model</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.apache.maven</groupId>
                  <artifactId>maven-api-model</artifactId>
                  <version>4.0.0-alpha-1-SNAPSHOT</version>
                  <type>mdo</type>
                  <outputDirectory>target/mdo/</outputDirectory>
                  <destFileName>maven.mdo</destFileName>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven</groupId>
        <artifactId>modello-plugin-velocity</artifactId>
        <version>4.0.0-alpha-1-SNAPSHOT</version>
        <executions>
          <execution>
            <id>velocity</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>velocity</goal>
            </goals>
            <configuration>
              <version>4.0.0</version>
              <models>
                <model>target/mdo/maven.mdo</model>
              </models>
              <templates>
                <template>src/main/mdo/model-v3.vm</template>
                <template>src/main/mdo/merger.vm</template>
                <template>src/main/mdo/transformer.vm</template>
                <template>src/main/mdo/reader.vm</template>
                <template>src/main/mdo/reader-ex.vm</template>
                <template>src/main/mdo/writer.vm</template>
                <template>src/main/mdo/writer-ex.vm</template>
              </templates>
              <params>
                <param>packageModelV3=org.apache.maven.model</param>
                <param>packageModelV4=org.apache.maven.api.model</param>
                <param>packageToolV4=org.apache.maven.model.v4</param>
              </params>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/package-info.java</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
