<?xml version="1.0" encoding="UTF-8"?>
<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.jahia.modules</groupId>
        <artifactId>jahia-modules</artifactId>
        <version>8.1.7.0</version>
    </parent>
    <artifactId>sitemap</artifactId>
    <version>5.5.0</version>
    <packaging>bundle</packaging>
    <name>Jahia Sitemap</name>
    <description>These are the custom module (Jahia Sitemap) for running on a Jahia server.</description>
    <scm>
        <connection>scm:git:git@github.com:Jahia/sitemap.git</connection>
        <developerConnection>scm:git:git@github.com:Jahia/sitemap.git</developerConnection>
        <url>scm:git:git@github.com:Jahia/sitemap.git</url>
        <tag>5_5_0</tag>
    </scm>
    <properties>
        <export-package>org.jahia.modules.sitemap.utils</export-package>
        <jahia-module-signature>MCwCFBDRSwviewcQOblXWHB3fKZn8frQAhQpqQFwLrAMO7Q1WoT9CubtDNk5Gg==</jahia-module-signature>
        <yarn.arguments>build:production</yarn.arguments>
        <require-capability>osgi.extender;filter:="(osgi.extender=org.jahia.bundles.blueprint.extender.config)"
        </require-capability>
        <sonar.sources>src/javascript</sonar.sources>
        <jahia.plugin.version>6.9</jahia.plugin.version>
        <import-package>
            graphql.annotations.annotationTypes;version="[7.2,99)",
            graphql.annotations.connection;version="[7.2,99)",
            graphql.schema;version="[13.0,99)",
            graphql;version="[13.0,99)",
            org.jahia.modules.graphql.provider.dxm;version="[2.8,4)",
            org.jahia.modules.graphql.provider.dxm.util;version="[2.8,4)",
            org.jahia.modules.graphql.provider.dxm.admin;version="[2.8,4)",
            org.jahia.modules.graphql.provider.dxm.osgi.annotations;version="[2.8,4)"
        </import-package>
        <jahia-depends>site-settings-seo,graphql-dxm-provider,default</jahia-depends>
    </properties>
    <dependencies>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jahia.test</groupId>
            <artifactId>module-test-framework</artifactId>
            <version>${project.parent.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jahia.test</groupId>
            <artifactId>jahia-test-module</artifactId>
            <version>${project.parent.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.7.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jahia.modules</groupId>
            <artifactId>graphql-dxm-provider</artifactId>
            <version>2.8.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.github.graphql-java</groupId>
            <artifactId>graphql-java-annotations</artifactId>
            <version>${graphql-java-annotations.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>jahia-public</id>
            <name>Jahia Public Repository</name>
            <url>https://devtools.jahia.com/nexus/content/groups/public</url>
        </repository>
    </repositories>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <_dsannotations>*</_dsannotations>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>
                                        src/main/resources/META-INF/configurations/org.jahia.modules.sitemap.config.impl.ConfigServiceImpl.cfg
                                    </file>
                                    <type>cfg</type>
                                    <classifier>sitemap-cfg</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>npm install node and yarn</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>v18.16.0</nodeVersion>
                            <yarnVersion>v1.22.19</yarnVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn install</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>yarn post-install</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>${yarn.arguments}</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>sync-pom</id>
                        <phase>none</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>sync-pom</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-scm-plugin</artifactId>
                <executions>
                    <execution>
                        <id>package-json</id>
                        <phase>none</phase>
                        <goals>
                            <goal>checkin</goal>
                        </goals>
                        <configuration>
                            <includes>package.json</includes>
                            <message>[maven-scm-plugin] [skip ci] synchronize package.json</message>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean verify frontend:yarn@sync-pom scm:checkin@package-json</preparationGoals>
                    <completionGoals>frontend:yarn@sync-pom scm:checkin@package-json</completionGoals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.cyclonedx</groupId>
                <artifactId>cyclonedx-maven-plugin</artifactId>
                <version>2.7.9</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>makeAggregateBom</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <projectType>library</projectType>
                    <schemaVersion>1.4</schemaVersion>
                    <includeBomSerialNumber>true</includeBomSerialNumber>
                    <includeCompileScope>true</includeCompileScope>
                    <includeProvidedScope>false</includeProvidedScope>
                    <includeRuntimeScope>true</includeRuntimeScope>
                    <includeSystemScope>false</includeSystemScope>
                    <includeTestScope>false</includeTestScope>
                    <includeLicenseText>false</includeLicenseText>
                    <outputReactorProjects>true</outputReactorProjects>
                    <outputFormat>json</outputFormat>
                    <outputName>java-bom.cdx</outputName>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
