OpenTripPlanner/pom.xml
2025-02-18 13:28:31 +00:00

589 lines
26 KiB
XML

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opentripplanner</groupId>
<artifactId>otp-root</artifactId>
<version>2.7.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>OpenTripPlanner - Root</name>
<description>The OpenTripPlanner multimodal journey planning system</description>
<url>https://opentripplanner.org</url>
<licenses>
<license>
<name>GNU Lesser General Public License</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
</license>
</licenses>
<scm>
<url>https://github.com/opentripplanner/OpenTripPlanner</url>
</scm>
<!--
Developer entries are provided for the main contributors on the GitHub stats page for to the
dev-2.x branch. This minimal information is only present to meet the Sonatype artifact upload
requirements. For other contributors, see
https://github.com/opentripplanner/OpenTripPlanner/graphs/contributors
-->
<developers>
<developer>
<name>Andrew Byrd</name>
<email>andrew@fastmail.net</email>
<organization>Conveyal</organization>
<organizationUrl>http://conveyal.com/</organizationUrl>
</developer>
<developer>
<name>Thomas Gran</name>
<email>t2gran@gmail.com</email>
<organization>Entur</organization>
<organizationUrl>http://entur.org/</organizationUrl>
</developer>
<developer>
<name>Leonard Ehrenfried</name>
<email>mail@leonard.io</email>
<organization>Independent Contractor</organization>
<organizationUrl>https://leonard.io</organizationUrl>
</developer>
<developer>
<name>Hannes Junnila</name>
<email>hannes.junnila@gmail.com</email>
<organization>Entur</organization>
<organizationUrl>http://entur.org/</organizationUrl>
</developer>
</developers>
<properties>
<otp.serialization.version.id>184</otp.serialization.version.id>
<!-- Lib versions - keep list sorted on property name -->
<geotools.version>32.2</geotools.version>
<google.dagger.version>2.55</google.dagger.version>
<jackson.version>2.18.2</jackson.version>
<jaxb-runtime.version>4.0.5</jaxb-runtime.version>
<jersey.version>3.1.10</jersey.version>
<junit.version>5.11.4</junit.version>
<micrometer.version>1.14.1</micrometer.version>
<netcdf4.version>5.6.0</netcdf4.version>
<logback.version>1.5.12</logback.version>
<lucene.version>10.1.0</lucene.version>
<micrometer.version>1.14.3</micrometer.version>
<netex-java-model.version>2.0.15</netex-java-model.version>
<netcdf4.version>5.6.0</netcdf4.version>
<protobuf.version>4.29.3</protobuf.version>
<siri-java-model.version>2.0.0</siri-java-model.version>
<slf4j.version>2.0.16</slf4j.version>
<!-- Other properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<GITHUB_REPOSITORY>opentripplanner/OpenTripPlanner</GITHUB_REPOSITORY>
<!-- Set argLine to an empty string so that running the tests without the coverage agent works.
When running `mvn jacoco:prepare-agent test` argLine is replaced with the one activating the agent.
-->
<argLine/>
<plugin.prettier.version>0.22</plugin.prettier.version>
<plugin.prettier.goal>write</plugin.prettier.goal>
<plugin.prettier.skip>false</plugin.prettier.skip>
</properties>
<distributionManagement>
<repository>
<id>github</id>
<name>OpenTripPlanner Maven Repository on Github Packages</name>
<url>https://maven.pkg.github.com/${GITHUB_REPOSITORY}/</url>
</repository>
</distributionManagement>
<modules>
<module>utils</module>
<module>raptor</module>
<module>gtfs-realtime-protobuf</module>
<module>application</module>
<module>otp-shaded</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>prettier-maven-plugin</artifactId>
<version>${plugin.prettier.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<!-- Target Java version -->
<release>21</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifestEntries>
<!-- For Java 11 Modules, specify a module name. Do not create module-info.java until all
our dependencies specify a module name. -->
<Automatic-Module-Name>org.opentripplanner.otp</Automatic-Module-Name>
<OTP-Serialization-Version-Id>${otp.serialization.version.id}</OTP-Serialization-Version-Id>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<!-- OTP includes an empty javadoc.jar file. See doc/javadoc/README.md -->
<id>package-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classesDirectory>${basedir}/doc/javadoc</classesDirectory>
<classifier>javadoc</classifier>
<skipIfEmpty>true</skipIfEmpty>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- we are seeing random failures in Windows CI builds which appear related to the
properties files: https://issues.apache.org/jira/browse/MRESOURCES-265
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<propertiesEncoding>UTF-8</propertiesEncoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<dependencies>
<dependency>
<groupId>me.fabriciorby</groupId>
<artifactId>maven-surefire-junit5-tree-reporter</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
<configuration>
<!-- we have to fork the JVM during tests so that the argLine is passed along -->
<forkCount>3</forkCount>
<!-- enable the restricted reflection under Java 11 so that the ObjectDiffer works
the @{argLine} part is there to allow jacoco to insert its arguments as well
-->
<argLine>
@{argLine}
-Xmx2G
-Dfile.encoding=UTF-8
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/java.lang.invoke=ALL-UNNAMED
--add-opens java.base/java.lang.ref=ALL-UNNAMED
--add-opens java.base/java.math=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.text=ALL-UNNAMED
--add-opens java.base/java.time=ALL-UNNAMED
--add-opens java.base/java.time.zone=ALL-UNNAMED
--add-opens java.base/java.time.format=ALL-UNNAMED
--add-opens java.base/java.time.temporal=ALL-UNNAMED
--add-opens java.base/java.time.chrono=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED
--add-opens java.base/java.util.regex=ALL-UNNAMED
--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.util=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/sun.net.www.protocol.http=ALL-UNNAMED
--add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED
--add-opens java.base/sun.util.calendar=ALL-UNNAMED
--add-opens java.base/sun.util.locale=ALL-UNNAMED
--add-opens java.base/sun.invoke.util=ALL-UNNAMED
--add-opens java.xml/org.xml.sax.helpers=ALL-UNNAMED
</argLine>
<reportFormat>plain</reportFormat>
<consoleOutputReporter>
<disable>true</disable>
</consoleOutputReporter>
<statelessTestsetInfoReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporter">
<printStacktraceOnError>true</printStacktraceOnError>
<printStacktraceOnFailure>true</printStacktraceOnFailure>
<printStdoutOnError>true</printStdoutOnError>
<printStdoutOnFailure>true</printStdoutOnFailure>
<printStdoutOnSuccess>false</printStdoutOnSuccess>
<printStderrOnError>true</printStderrOnError>
<printStderrOnFailure>true</printStderrOnFailure>
<printStderrOnSuccess>false</printStderrOnSuccess>
<theme>UNICODE</theme>
</statelessTestsetInfoReporter>
</configuration>
</plugin>
<!-- code coverage report -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
</plugin>
<plugin>
<!-- Get current Git commit information for use in MavenVersion class.
Commit information is stored in Maven variables, which are then substituted
into the properties file. The plugin has a mode to generate a git.properties file,
but we need the Maven project version as well, so we perform substitution. -->
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>9.0.1</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>false</verbose>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssXXX</dateFormat>
<includeOnlyProperties>
<!-- Including each property used reduce the plugin execution time. -->
<includeOnlyProperty>git.commit.id</includeOnlyProperty>
<includeOnlyProperty>git.commit.id.describe</includeOnlyProperty>
<includeOnlyProperty>git.commit.time</includeOnlyProperty>
<includeOnlyProperty>git.build.time</includeOnlyProperty>
<includeOnlyProperty>git.branch</includeOnlyProperty>
<includeOnlyProperty>git.dirty</includeOnlyProperty>
</includeOnlyProperties>
</configuration>
</plugin>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>prettier-maven-plugin</artifactId>
<configuration>
<skip>${plugin.prettier.skip}</skip>
<prettierJavaVersion>2.0.0</prettierJavaVersion>
<inputGlobs>
<inputGlob>src/main/java/**/*.java</inputGlob>
<inputGlob>src/test/java/**/*.java</inputGlob>
</inputGlobs>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>${plugin.prettier.goal}</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.4.4</version>
<configuration>
<container>
<mainClass>org.opentripplanner.standalone.OTPMain</mainClass>
<entrypoint>/docker-entrypoint.sh</entrypoint>
<volumes>
<volume>
/var/opentripplanner/
</volume>
</volumes>
<ports>
<port>8080</port>
<port>8081</port>
</ports>
</container>
<from>
<image>eclipse-temurin:21-jre</image>
<platforms>
<platform>
<architecture>amd64</architecture>
<os>linux</os>
</platform>
<platform>
<architecture>arm64</architecture>
<os>linux</os>
</platform>
</platforms>
</from>
<to>
<image>${env.CONTAINER_REPO}</image>
<auth>
<username>${env.CONTAINER_REGISTRY_USER}</username>
<password>${env.CONTAINER_REGISTRY_PASSWORD}</password>
</auth>
</to>
<extraDirectories>
<permissions>
<permission>
<file>/docker-entrypoint.sh</file>
<mode>755</mode>
</permission>
<permission>
<file>/var/opentripplanner/</file>
<mode>755</mode>
</permission>
</permissions>
</extraDirectories>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<!-- Hack to force maven to check central first. Maven central is inherited from the superpom,
but ends up at the end of the list. Though most of the time the artifact is in central,
Maven tries to download from every other repository and fails before checking central.
Do not change the id from central2 to central, otherwise the entry will be ignored. -->
<repository>
<id>central2</id>
<name>Check central first to avoid a lot of not found warnings</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>https://repo.osgeo.org/repository/release/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<!-- This makes sure all google libraries are using compatible versions. -->
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.54.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.4.0-jre</version>
</dependency>
<!-- Logging API -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<!--
This is implicitly used in the current OTP codebase. Should be disallowed and
replaced with the standard annotation JARs. Leaving this for now to reduce number
of changes.
-->
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
<version>3.0.3</version>
</dependency>
<!-- GEOTOOLS AND JTS TOPOLOGY: geometry, rasters and projections. -->
<!-- GEOTOOLS includes JTS as a transitive dependency. -->
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-coverage</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geotiff</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-api</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geojson-core</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>de.grundid.opendatalab</groupId>
<artifactId>geojson-jackson</artifactId>
<version>1.14</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.15.2</version>
</dependency>
<dependency>
<groupId>io.github.origin-energy</groupId>
<artifactId>java-snapshot-testing-junit5</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<profile>
<id>prettierCheck</id>
<properties>
<!-- In the CI environment we want to validate that code is formatted -->
<plugin.prettier.goal>check</plugin.prettier.goal>
</properties>
</profile>
<profile>
<id>prettierSkip</id>
<activation>
<property>
<!--
This works as a short alias to enable this from the command line. To skip
prettier, set the 'ps' system property with the '-D ps' parameter:
# mvn test -D ps
-->
<name>ps</name>
<value/>
</property>
</activation>
<properties>
<plugin.prettier.skip>true</plugin.prettier.skip>
</properties>
</profile>
<profile>
<id>clean-test-snapshots</id>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.build.testSourceDirectory}</directory>
<includes>
<include>**/__snapshots__/*</include>
<include>**/__snapshots__</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deployGitHub</id>
<distributionManagement>
<repository>
<id>github</id>
<name>OpenTripPlanner Maven Repository on Github Packages</name>
<url>https://maven.pkg.github.com/${GITHUB_REPOSITORY}/</url>
</repository>
</distributionManagement>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<!-- We sign in the verify phase, which means it will happen before install and deploy (the last two phases)
but not before earlier phases like test or package. -->
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>74ED86891C2BCCD1352D928460B7785172A9FE89</keyname>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Recommended way to deploy to OSSRH , which allows deferred manual release to Central. -->
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>