<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.redkalex</groupId>
    <artifactId>redkale-benchmark</artifactId>
    <version>1.0.0</version>

    <properties>
        <main.class>org.redkale.boot.Application</main.class>
        <redkale.version>2.8.1-SNAPSHOT</redkale.version>
        <redkale-maven.version>1.2.0</redkale-maven.version>
        <postgresql.version>42.7.2</postgresql.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
    </properties> 

    <dependencies>  
        <dependency>
            <groupId>org.redkale</groupId>
            <artifactId>redkale</artifactId>
            <version>${redkale.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.redkalex</groupId>
            <artifactId>redkale-plugins</artifactId>
            <version>${redkale.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgresql.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
        </repository>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>
    
    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
        </pluginRepository>
        <pluginRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository> 
    </pluginRepositories>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.0</version>
                <configuration>			
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
                 
            <plugin>
                <groupId>org.redkale.maven.plugins</groupId>
                <artifactId>redkale-maven-plugin</artifactId>
                <version>${redkale-maven.version}</version>                              
                <configuration>		
                    <nativeimageArgs>
                        <arg>--no-fallback</arg>
                    </nativeimageArgs>
                </configuration>                                    
                <executions>
                    <execution>
                        <id>redkale-compile</id> 
                        <phase>process-classes</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>                   
                    </execution>
                </executions>    
            </plugin>
                 
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>${main.class}</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

</project>
