<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>

    <parent>
        <groupId>io.smallrye</groupId>
        <artifactId>jandex-parent</artifactId>
        <version>3.0.5</version>
    </parent>

    <artifactId>jandex</artifactId>
    <packaging>bundle</packaging>

    <name>Jandex: Core</name>

    <dependencies>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>jandex-test-data</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <charset>UTF-8</charset>
                    <encoding>UTF-8</encoding>
                    <docencoding>UTF-8</docencoding>
                    <breakiterator>true</breakiterator>
                    <version>true</version>
                    <author>true</author>
                    <keywords>true</keywords>
                    <additionalOptions>
                        --allow-script-in-comments
                    </additionalOptions>
                    <docfilessubdirs>true</docfilessubdirs>
                    <top><![CDATA[
                         <script src="doc-files/addSyntax.js" type="text/javascript"></script>
                         <script src="doc-files/shCore.js" type="text/javascript"></script>
                         <script src="doc-files/shBrushJava.js" type="text/javascript"></script>
                    ]]></top>
                    <bottom><![CDATA[
                         <script type="text/javascript">
                           SyntaxHighlighter.defaults["auto-links"] = false;
                           SyntaxHighlighter.defaults["gutter"] = false;
                           SyntaxHighlighter.defaults["toolbar"] = false;
                           SyntaxHighlighter.all();
                         </script>
                    ]]></bottom>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${version.maven-bundle-plugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <archive>
                        <index>true</index>
                        <manifest>
                            <mainClass>org.jboss.jandex.Main</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Automatic-Module-Name>org.jboss.jandex</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                    <instructions>
                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Export-Package>
                            org.jboss.jandex;version="${project.version}"
                        </Export-Package>
                        <Import-Package>
                            org.apache.tools.ant;resolution:=optional,
                            org.apache.tools.ant.types;resolution:=optional,
                            *
                        </Import-Package>
                        <!-- Without the -nouses BND directive, the org.jboss.jandex export will get the optional
                        ant packages in a "uses" clause. -->
                        <_nouses>true</_nouses>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jboss.bridger</groupId>
                <artifactId>bridger</artifactId>
                <version>${version.bridger}</version>
                <executions>
                    <execution>
                        <id>weave</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>transform</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>ecj</id>
            <activation>
                <property>
                    <name>compiler</name>
                    <value>ecj</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <compilerId>eclipse</compilerId>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.codehaus.plexus</groupId>
                                <artifactId>plexus-compiler-eclipse</artifactId>
                                <version>${version.plexus-compiler-eclipse}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>parameters</id>
            <activation>
                <property>
                    <name>parameters</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <maven.compiler.parameters>true</maven.compiler.parameters>
            </properties>
        </profile>
    </profiles>
</project>
