<project>
    <parent>
        <groupId>io.teknek.deliverance</groupId>
        <artifactId>deliverance-parent</artifactId>
        <version>0.0.3</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>vibrant-maven-plugin</artifactId>
    <name>vibrant-maven-plugin</name>
    <packaging>maven-plugin</packaging>
    <properties>
        <maven.compiler.source>25</maven.compiler.source>
        <maven.compiler.target>25</maven.compiler.target>
        <maven.compiler.release>25</maven.compiler.release>
        <build.plugins.plugin.version>3.5.3</build.plugins.plugin.version>
        <maven.plugin.api.version>3.9.12</maven.plugin.api.version>
        <maven-project.version>2.2.1</maven-project.version>
        <maven-plugin-annotation.verion>3.15.2</maven-plugin-annotation.verion>
    </properties>

    <dependencyManagement>
    </dependencyManagement>


    <dependencies>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.plugin.api.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven-plugin-annotation.verion}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${maven-project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.teknek.deliverance</groupId>
            <artifactId>core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.teknek.deliverance</groupId>
            <artifactId>native</artifactId>
            <version>${project.version}</version>
            <classifier>${os.detected.name}-x86_64</classifier>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-api.version}</version>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.teknek.deliverance</groupId>
                <artifactId>vibrant-maven-plugin</artifactId>
                <configuration>

                    <vibeSpecs>
                        <vibeSpec>
                            <id>shape</id>
                            <enabled>true</enabled>
                            <overwrite>true</overwrite>
                            <systemMessages>
                                <systemMessage>You are an assistant that produces concise, production-grade software.</systemMessage>
                                <systemMessage>Output java code.</systemMessage>
                                <systemMessage>Generate java code into the package 'io.teknek.shape' .</systemMessage>
                            </systemMessages>
                            <userMessages>
                                <userMessage>Generate a java interface named Shape with a method named area that returns a double.</userMessage>
                                <userMessage>Generate a java class named Circle that implements the Shape interface.</userMessage>
                            </userMessages>
                            <generateTo>generated-source</generateTo>
                        </vibeSpec>
                        <vibeSpec>
                            <id>shape</id>
                            <enabled>false</enabled>
                            <userMessages>
                                <userMessage>Hello</userMessage>
                            </userMessages>
                        </vibeSpec>
                    </vibeSpecs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.15.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compliler.plugin.version}</version>
                <configuration>
                    <release>25</release>
                    <jdkToolchain>
                        <version>25</version>
                    </jdkToolchain>
                    <compilerArgs>
                        <arg>--add-modules</arg>
                        <arg>jdk.incubator.vector</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.version}</version>
                <configuration>
                    <argLine>
                        --add-opens java.base/java.nio=ALL-UNNAMED
                        --add-modules jdk.incubator.vector
                        -Djdk.attach.allowAttachSelf=true
                    </argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>  
