<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<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.apache</groupId>
        <artifactId>apache</artifactId>
        <version>29</version>
    </parent>

    <groupId>org.apache.batchee</groupId>
    <artifactId>batchee</artifactId>
    <version>2.0.0</version>
    <packaging>pom</packaging>
    <name>BatchEE</name>

    <scm>
        <connection>scm:git:https://gitbox.apache.org/repos/asf/geronimo-batchee.git</connection>
        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/geronimo-batchee.git</developerConnection>
        <url>https://gitbox.apache.org/repos/asf/geronimo-batchee.git</url>
      <tag>batchee-2.0.0</tag>
    </scm>


    <properties>
        <!-- for reproducible builds -->
        <project.build.outputTimestamp>1713803253</project.build.outputTimestamp>

        <jaxb.version>4.0.5</jaxb.version>
        <dependency.version.jakarta.batch-api>2.1.1</dependency.version.jakarta.batch-api>
        <dependency.version.jakarta.servlet-api>5.0.0</dependency.version.jakarta.servlet-api>
        <dependency.version.jakarta.persistence-api>3.1.0</dependency.version.jakarta.persistence-api>
        <dependency.version.jakarta.validation-api>3.0.2</dependency.version.jakarta.validation-api>
        <dependency.version.jakarta.inject-api>2.0.1</dependency.version.jakarta.inject-api>
        <dependency.version.jakarta.enterprise.cdi-api>4.0.1</dependency.version.jakarta.enterprise.cdi-api>
        <dependency.version.jakarta.annotation-api>2.1.1</dependency.version.jakarta.annotation-api>
        <dependency.version.jakarta.ejb-api>4.0.1</dependency.version.jakarta.ejb-api>
        <dependency.version.jakarta.interceptor-api>2.1.0</dependency.version.jakarta.interceptor-api>
        <dependency.version.jakarta.transaction-api>2.0.1</dependency.version.jakarta.transaction-api>
        <dependency.version.jakarta.ws.rs-api>3.1.0</dependency.version.jakarta.ws.rs-api>
        <dependency.version.jakarta.json-api>2.1.1</dependency.version.jakarta.json-api>
        <dependency.version.jakarta.xml.bind-api>4.0.0</dependency.version.jakarta.xml.bind-api>
        <jackson.version>2.17.0</jackson.version>
        <jodatime.version>2.12.7</jodatime.version>
        <johnzon.version>2.0.1</johnzon.version>
        <openjpa.version>4.0.0</openjpa.version>
        <tomee.version>10.0.0-M1</tomee.version>
        <tomee-10.version>${tomee.version}</tomee-10.version>
        <tomee-9.version>9.1.3</tomee-9.version>
        <bval.version>3.0.0</bval.version>
        <xbean.version>4.25</xbean.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <batchee.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/geronimo/content/batchee</batchee.scmPubUrl>
        <batchee.scmPubCheckoutDirectory>${basedir}/.site-content</batchee.scmPubCheckoutDirectory>

        <derby.version>10.15.2.0</derby.version>
    </properties>

    <ciManagement>
        <system>jenkins</system>
        <url>https://builds.apache.org/job/batchee/</url>
    </ciManagement>

    <issueManagement>
        <system>jira</system>
        <url>https://issues.apache.org/jira/browse/BATCHEE</url>
    </issueManagement>

    <distributionManagement>
        <site>
            <id>apache.website</id>
            <url>scm:svn:${batchee.scmPubUrl}</url>
        </site>
    </distributionManagement>

    <mailingLists>
        <mailingList>
            <name>Users</name>
            <post>users@geronimo.apache.org</post>
            <subscribe>users-subscribe@geronimo.apache.org</subscribe>
            <unsubscribe>users-unsubscribe@geronimo.apache.org</unsubscribe>
            <archive>https://lists.apache.org/list.html?users@geronimo.apache.org</archive>
            <otherArchives>
                <otherArchive>http://geronimo-users.markmail.org/</otherArchive>
            </otherArchives>
        </mailingList>
        <mailingList>
            <name>Dev</name>
            <post>dev@geronimo.apache.org</post>
            <subscribe>dev-subscribe@geronimo.apache.org</subscribe>
            <unsubscribe>dev-unsubscribe@geronimo.apache.org</unsubscribe>
            <archive>https://lists.apache.org/list.html?dev@batchee.apache.org</archive>
            <otherArchives>
                <otherArchive>http://geronimo-dev.markmail.org/</otherArchive>
            </otherArchives>
        </mailingList>
        <mailingList>
            <name>Commits</name>
            <post>commits@geronimo.apache.org</post>
            <subscribe>commits-subscribe@geronimo.apache.org</subscribe>
            <unsubscribe>commits-unsubscribe@geronimo.apache.org</unsubscribe>
            <archive>https://lists.apache.org/list.html?commits@geronimo.apache.org</archive>
            <otherArchives>
                <otherArchive>http://geronimo-commits.markmail.org/</otherArchive>
            </otherArchives>
        </mailingList>
    </mailingLists>

    <modules>
        <module>jbatch</module>
        <module>extensions</module>
        <module>gui</module>
        <module>tools</module>
        <module>test</module>
        <module>integration-tests</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <!-- APIs -->
            <dependency>
                <groupId>jakarta.batch</groupId>
                <artifactId>jakarta.batch-api</artifactId>
                <version>${dependency.version.jakarta.batch-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>${dependency.version.jakarta.xml.bind-api}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>${dependency.version.jakarta.servlet-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.persistence</groupId>
                <artifactId>jakarta.persistence-api</artifactId>
                <version>${dependency.version.jakarta.persistence-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.validation</groupId>
                <artifactId>jakarta.validation-api</artifactId>
                <version>${dependency.version.jakarta.validation-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.inject</groupId>
                <artifactId>jakarta.inject-api</artifactId>
                <version>${dependency.version.jakarta.inject-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.enterprise</groupId>
                <artifactId>jakarta.enterprise.cdi-api</artifactId>
                <version>${dependency.version.jakarta.enterprise.cdi-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${dependency.version.jakarta.annotation-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.ejb</groupId>
                <artifactId>jakarta.ejb-api</artifactId>
                <version>${dependency.version.jakarta.ejb-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.interceptor</groupId>
                <artifactId>jakarta.interceptor-api</artifactId>
                <version>${dependency.version.jakarta.interceptor-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.transaction</groupId>
                <artifactId>jakarta.transaction-api</artifactId>
                <version>${dependency.version.jakarta.transaction-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.ws.rs</groupId>
                <artifactId>jakarta.ws.rs-api</artifactId>
                <version>${dependency.version.jakarta.ws.rs-api}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-json-provider</artifactId>
                <version>${jackson.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>jakarta.json</groupId>
                <artifactId>jakarta.json-api</artifactId>
                <version>${dependency.version.jakarta.json-api}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.johnzon</groupId>
                <artifactId>johnzon-jaxrs</artifactId>
                <version>${johnzon.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.xbean</groupId>
                <artifactId>xbean-reflect</artifactId>
                <version>${xbean.version}</version>
            </dependency>

            <dependency>
                <!-- We have optional support for joda time IF it is available on the classpath -->
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${jodatime.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
                <version>${jaxb.version}</version>
            </dependency>


            <!-- Testing libraries -->
            <dependency> <!-- TCK and default tests -->
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>7.7.0</version>
                <scope>test</scope>
            </dependency>
            <dependency> <!-- camel/arquillian -->
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.derby</groupId>
                <artifactId>derby</artifactId>
                <version>${derby.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.derby</groupId>
                <artifactId>derbytools</artifactId>
                <version>${derby.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/xsd</directory>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.4.1</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>1.7.0</version>
                <dependencies>
                    <dependency> <!-- workaround for jdk 1.8 -->
                        <groupId>org.apache.maven.shared</groupId>
                        <artifactId>maven-filtering</artifactId>
                        <version>1.3</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <id>verify-style</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- exclude generated stuff -->
                    <excludes>org/apache/batchee/jaxb/*,org/apache/batchee/tools/maven/HelpMojo*</excludes>

                    <logViolationsToConsole>true</logViolationsToConsole>
                    <checkstyleRules>
                        <module name="Checker">
                            <!-- Checks for Size Violations.                    -->
                            <!-- See http://checkstyle.sf.net/config_sizes.html -->
                            <module name="FileLength">
                                <property name="max" value="3500" />
                                <property name="fileExtensions" value="java" />
                            </module>

                            <!-- Checks for whitespace                               -->
                            <!-- See http://checkstyle.sf.net/config_whitespace.html -->
                            <module name="FileTabCharacter" />

                            <module name="LineLength">
                                <property name="max" value="180" />
                                <property name="ignorePattern" value="@version|@see" />
                            </module>

                            <module name="TreeWalker">
                                <!-- Checks for Javadoc comments.                     -->
                                <!-- See http://checkstyle.sf.net/config_javadoc.html -->
                                <!-- module name="JavadocMethod"/ -->
                                <!-- module name="JavadocType"/ -->
                                <!-- module name="JavadocVariable"/ -->


                                <!-- Checks for Naming Conventions.                  -->
                                <!-- See http://checkstyle.sf.net/config_naming.html -->
                                <!--
                                        <module name="MemberName">
                                          <property name="format" value="^_[a-z][a-zA-Z0-9]*$" />
                                        </module>
                                -->

                                <module name="ConstantName">
                                    <!-- Normal rules, except that:
                                       -  * any name can start with an underscore.
                                       -  * "log" is allowed; this is a traditional name for log objects
                                       -  * names ending with "ThreadLocal" are allowed so that threadlocal vars don't have to be
                                       -    all-caps. They are static final, but are not really constants. Yes, type prefixes
                                       -    on variable names sucks ("hungarian notation") but checkstyle doesn't allow
                                       -    name rules to vary by the type of the constant, and no other alternative seems
                                       -    any better.
                                       -->
                                    <property name="format" value="^_?((log)|(logger)|([a-z][a-zA-Z]*ThreadLocal)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$" />
                                </module>

                                <module name="LocalVariableName" />
                                <module name="MethodName">
                                    <property name="format" value="^_?[a-z][a-zA-Z0-9]*$" />
                                </module>
                                <module name="PackageName" />
                                <module name="LocalFinalVariableName" />
                                <module name="ParameterName" />
                                <module name="StaticVariableName" />
                                <module name="TypeName">
                                    <property name="format" value="^_?[A-Z][a-zA-Z0-9]*$" />
                                </module>

                                <!-- Checks for imports                              -->
                                <!-- See http://checkstyle.sf.net/config_import.html -->
                                <module name="AvoidStarImport">
                                    <property name="excludes" value="java.io,java.net,java.util,jakarta.enterprise.inject.spi,jakarta.enterprise.context" />
                                </module>
                                <module name="IllegalImport" />
                                <module name="RedundantImport" />
                                <module name="UnusedImports" />


                                <module name="MethodLength">
                                    <property name="max" value="250" />
                                </module>

                                <!-- Checks for blocks. You know, those {}'s         -->
                                <!-- See http://checkstyle.sf.net/config_blocks.html -->
                                <module name="EmptyBlock">
                                    <property name="option" value="text" />
                                </module>

                                <module name="NeedBraces" />
                                <module name="LeftCurly">
                                    <property name="option" value="EOL" />
                                </module>
                                <module name="RightCurly">
                                    <property name="option" value="SAME" />
                                </module>

                                <!-- Checks for common coding problems               -->
                                <!-- See http://checkstyle.sf.net/config_coding.html -->
                                <module name="EmptyStatement" />
                                <module name="EqualsHashCode" />
                                <module name="DefaultComesLast" />
                                <module name="MissingSwitchDefault" />
                                <module name="FallThrough" />
                                <module name="MultipleVariableDeclarations" />

                                <!-- Checks for class design                         -->
                                <!-- See http://checkstyle.sf.net/config_design.html -->
                                <!-- module name="DesignForExtension"/ -->
                                <module name="com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck">
                                    <property name="severity" value="ignore" />
                                </module>

                                <!-- module name="FinalClass"/ -->

                                <module name="HideUtilityClassConstructor" />

                                <!-- module name="InterfaceIsType"/ -->
                                <!-- module name="VisibilityModifier"/ -->

                                <module name="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck">
                                    <property name="packageAllowed" value="false" />
                                    <property name="protectedAllowed" value="true" />
                                    <property name="publicMemberPattern" value="^serialVersionUID" />
                                    <property name="severity" value="warning" />
                                </module>


                                <!-- Miscellaneous other checks.                   -->
                                <!-- See http://checkstyle.sf.net/config_misc.html -->
                                <!-- module name="ArrayTypeStyle"/ -->
                                <!-- module name="FinalParameters"/ -->
                                <!-- Line with Trailing Spaces (disabled as it's to noisy)
                                <module name="GenericIllegalRegexp">
                                    <property name="format" value="\s+$" />
                                    <property name="message" value="Line has trailing spaces." />
                                </module>
                                  -->
                                <module name="UpperEll" />

                            </module>

                        </module>
                    </checkstyleRules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <version>0.14</version>
                <configuration>
                    <includes>
                        <include>src/**/*</include>
                        <include>pom.xml</include>
                    </includes>
                    <excludes>
                        <exclude>**/*/MANIFEST.MF</exclude>
                        <exclude>.git</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>derby.log</exclude>
                        <exclude>**/META-INF/services/*</exclude>
                        <exclude>**/bootstrap-*</exclude>
                        <exclude>**/js/jquery-*</exclude>
                        <exclude>**/*.json</exclude>
                        <exclude>**/batchee-site-generated/*.md</exclude>
                        <!-- json can't get comments -->
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.5</version>
                <configuration>
                    <trimStackTrace>false</trimStackTrace>
                    <argLine>-Djdk.attach.allowAttachSelf=true</argLine> <!-- for javaagents (openejb, avoid useless stacks in logs) -->
                    <systemPropertyVariables>
                        <derby.stream.error.file>target/derby.log</derby.stream.error.file>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.12.1</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>1.7</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <content>${project.reporting.outputDirectory}</content>
                    <pubScmUrl>scm:svn:${batchee.scmPubUrl}</pubScmUrl>
                    <tryUpdate>true</tryUpdate>
                    <checkoutDirectory>${batchee.scmPubCheckoutDirectory}</checkoutDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>scm-publish</id>
                        <phase>site-deploy</phase>
                        <!-- deploy site with maven-scm-publish-plugin -->
                        <goals>
                            <goal>publish-scm</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0-M6</version>
                <configuration>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <configuration>
                    <doclint>none</doclint>
                    <notimestamp>true</notimestamp>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <configuration>
                    <doclint>none</doclint>
                    <notimestamp>true</notimestamp>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                    <reportSet>
                        <inherited>false</inherited>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
