<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.liquibase</groupId>
        <artifactId>liquibase-parent-pom</artifactId>
        <version>1.0.0</version>
    </parent>

    <artifactId>liquibase-cdi</artifactId>
    <version>5.0.1</version>
    <packaging>jar</packaging>

    <name>Liquibase CDI Plugin</name>
    <description>Configures Liquibase for use in a CDI environment</description>
    <url>https://docs.liquibase.com</url>

    <scm>
        <connection>scm:git:git://github.com/liquibase/liquibase-cdi.git</connection>
        <developerConnection>scm:git:ssh://github.com:liquibase/liquibase-cdi.git</developerConnection>
        <url>https://github.com/liquibase/liquibase-cdi</url>
      <tag>liquibase-cdi-5.0.1</tag>
  </scm>

    <properties>
        <liquibase.version>5.0.1</liquibase.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.install.skip>false</maven.install.skip>
        <maven.deploy.skip>false</maven.deploy.skip>
        <maven.javadoc.skip>false</maven.javadoc.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>${liquibase.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.weld.se</groupId>
            <artifactId>weld-se</artifactId>
            <version>1.1.8.Final</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>2.3.3</version>
           <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.3.3</version>
            <scope>provided</scope>
        </dependency>

        <!-- provided scope -->
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <version>2.0-PFD2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>2.4.240</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.12.0</version>
                <configuration>
                    <attach>true</attach>
                    <author>false</author>
                    <doctitle>Liquibase ${project.version} API</doctitle>
                    <quiet>true</quiet>
                    <doclint>none</doclint>
                    <encoding>UTF-8</encoding>

                    <includeDependencySources>false</includeDependencySources>
                    <excludePackageNames>com.datical.*,*.pro,*.pro.*</excludePackageNames>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc-default</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                    <execution>
                        <id>javadoc-aggregate</id>
                        <inherited>false</inherited>
                        <goals>
                            <goal>aggregate-jar</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
                <version>1.7.3</version>
                <configuration>
                    <updatePomFile>true</updatePomFile>
                    <outputDirectory>${project.build.directory}/flattened-pom</outputDirectory>
                    <flattenedPomFilename>release.pom.xml</flattenedPomFilename>
                    <pomElements>
                        <profiles>remove</profiles>
                        <organization />
                        <issueManagement />
                    </pomElements>
                    <flattenMode>ossrh</flattenMode>
                </configuration>
                <executions>
                    <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Converts the generated flattened-pom into a cleaner version for maven distribution -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xml-maven-plugin</artifactId>
                <version>1.2.0</version>
                <executions>
                    <execution>
                        <id>transform-deploy-pom</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>transform</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <forceCreation>true</forceCreation>
                    <transformationSets>
                        <transformationSet>
                            <dir>${project.build.directory}/flattened-pom</dir>
                            <includes>release.pom.xml</includes>
                            <outputDir>${project.build.directory}</outputDir>
                            <stylesheet>${project.basedir}/src/main/maven/liquibase-deployment-pom.xslt</stylesheet>
                        </transformationSet>
                    </transformationSets>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <configuration>
                    <artifactId>${project.artifactId}</artifactId>
                    <file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
                    <sources>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</sources>
                    <javadoc>${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar</javadoc>
                    <pomFile>${project.build.directory}/release.pom.xml</pomFile>
                </configuration>
                <executions>
                    <execution>
                        <id>custom-install</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
