Skip to content

Commit

Permalink
Generate GTFS Realtime protobuf files in separate Maven module
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Oct 21, 2024
1 parent 0ae34a8 commit d562a52
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 21 deletions.
8 changes: 8 additions & 0 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
<name>OpenTripPlanner - Application</name>

<dependencies>
<!-- project dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gtfs-realtime-protobuf</artifactId>
<version>${project.version}</version>
</dependency>

<!-- 3rd party dependencies -->
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
Expand Down
44 changes: 44 additions & 0 deletions gtfs-realtime-protobuf/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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>
<parent>
<groupId>org.opentripplanner</groupId>
<artifactId>otp-root</artifactId>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>gtfs-realtime-protobuf</artifactId>
<name>OpenTripPlanner - GTFS Realtime (protobuf)</name>

<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<!-- compile the gtfs-realtime.proto file to Java code
To update the proto file run the following command:
curl https://raw.githubusercontent.com/google/transit/master/gtfs-realtime/proto/gtfs-realtime.proto -o src/main/proto/gtfs-realtime.proto
-->
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.22.0:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</plugin>
</plugins>
</build>
</project>
22 changes: 1 addition & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

<modules>
<module>application</module>
<module>gtfs-realtime-protobuf</module>
</modules>

<build>
Expand Down Expand Up @@ -357,27 +358,6 @@
</extraDirectories>
</configuration>
</plugin>

<!-- compile the gtfs-realtime.proto file to Java code
To update the proto file run the following command:
curl https://raw.githubusercontent.com/google/transit/master/gtfs-realtime/proto/gtfs-realtime.proto -o src/main/proto/gtfs-realtime.proto
-->
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.22.0:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit d562a52

Please sign in to comment.