Skip to content

Commit

Permalink
Merge branch 'OneBusAway:master' into features/stops-for-agency
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloAvv authored Sep 8, 2024
2 parents 32c9878 + e78162b commit 92cc8e3
Show file tree
Hide file tree
Showing 47 changed files with 853 additions and 794 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ onebusaway-admin-webapp/overlays/
onebusaway-enterprise-acta-webapp/overlays/

onebusaway-enterprise-webapp/overlays/

build/*
!build/.gitkeep
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ When you are submitting code to OneBusAway, here are a few guidelines to go by:
* For each commit to the repository, reference the issue number in the commit message. Something like `Issue #5: Adding this cool feature`. This will automatically link your commit to the issue and make it easier to track changes to the codebase.
* Code style: check out the [Code Style](https://github.com/OneBusAway/onebusaway/wiki/Code-Style) documentation for details on how configure your IDE to match the OneBusAway code-style conventions. In general, try to match the existing code style when adding new code.
* Write unit tests.
* Don't break the build. You can run `mvn verify` to run all the unit tests and checks for a Maven project to verify that your changes haven't broken anything. Also keep an eye on our [Continuous Integration Server](http://ci.onebusaway.org/). Some projects also have Travis CI added, which provides an additional reference for builds.
* Don't break the build. You can run `mvn verify` to run all the unit tests and checks for a Maven project to verify that your changes haven't broken anything.
* Code reviews. If you are new to OneBusAway development or if you are working on a core piece of OneBusAway, it's a good idea to get someone to do a codereview of your change before committing it to the master repository. GitHub makes codereviews pretty simple with their [Pull Request](https://help.github.com/articles/using-pull-requests) feature.

## Commit Access
Expand Down
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (C) 2012 Brian Ferris <bdferris@onebusaway.org>
#
# Licensed 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.
#

FROM maven:3-eclipse-temurin-11

# Install additional development tools if needed
RUN apt-get update && apt-get install -y \
git \
vim \
&& rm -rf /var/lib/apt/lists/*

mkdir -p /root/.m2/repository

WORKDIR /src

# Set the entrypoint to bash so the container doesn't exit immediately
ENTRYPOINT ["/bin/bash"]
3 changes: 0 additions & 3 deletions README

This file was deleted.

16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ There are two options for setting up your own OneBusAway instance:
* [Configuration and Deployment Guide for v2.x](https://github.com/OneBusAway/onebusaway/wiki/Configuration-and-Deployment-Guide-for-v2.x) - Designed to provide a comprehensive deployment method for users who wish to set up a simple OneBusAway application with minimal configurations.
* [onebusaway-docker (Under development)](https://github.com/OneBusAway/onebusaway-docker) - A community-supported Docker configuration for OneBusAway v2.x is currently under development.

## Docker Development Instructions

Build the image:

```
docker build -t oba-app-modules .
docker exec -it onebusaway-application-modules-builder-1 /bin/bash
./build-and-test.sh
```



## Status

* Latest Stable Release - `2.4.18-cs`:
Expand Down Expand Up @@ -92,8 +104,8 @@ To create a local copy of the repository, use the following command:
* IRC channel:
- `#onebusaway` on Freenode
- You can connect using your favorite IRC client or [chat through the web](http://webchat.freenode.net/?channels=onebusaway) (just enter a username and click *Connect*)


## Contact Info

There are [lots of ways to get in touch with us](https://github.com/OneBusAway/onebusaway/wiki/Contact-Us).
There are [lots of ways to get in touch with us](https://github.com/OneBusAway/onebusaway/wiki/Contact-Us).
83 changes: 83 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/usr/bin/env bash
#
# Copyright (C) 2012 Brian Ferris <bdferris@onebusaway.org>
#
# Licensed 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.
#

#!/bin/bash

# Function to print help message
print_help() {
echo "Usage: $0 [OPTIONS]"
echo "Wrapper script for Maven build command with customizable options."
echo
echo "Options:"
echo " --help Display this help message"
echo " --clean Run the clean phase before building (optional)"
echo " --check-updates Force a check for updated releases and snapshots"
echo " --test Run tests (disabled by default)"
echo " --javadoc Generate JavaDoc (disabled by default)"
echo " --validate-silent VALUE Set the validate.silent option (default: true)"
echo " --log4j-config VALUE Set the log4j.configuration option (default: empty)"
echo
echo "Example:"
echo " $0 --clean --check-updates --test --javadoc --validate-silent false --log4j-config my-log4j.properties"
}

# Default values
clean=""
check_updates=""
run_tests="false"
generate_javadoc="false"
validate_silent="true"
log4j_config=""

# Parse command line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--help) print_help; exit 0;;
--clean) clean="clean ";;
--check-updates) check_updates="-U ";;
--test) run_tests="true";;
--javadoc) generate_javadoc="true";;
--validate-silent) validate_silent="$2"; shift;;
--log4j-config) log4j_config="$2"; shift;;
*) echo "Unknown parameter: $1"; print_help; exit 1;;
esac
shift
done

# Construct the Maven command
cmd="mvn ${check_updates}${clean}install"

# Add options based on parsed arguments
if [ "$run_tests" = "false" ]; then
cmd="$cmd -DskipTests=true"
fi

if [ "$generate_javadoc" = "false" ]; then
cmd="$cmd -Dmaven.javadoc.skip=true"
fi

cmd="$cmd -Dvalidate.silent=$validate_silent"

if [ -n "$log4j_config" ]; then
cmd="$cmd -Dlog4j.configuration=$log4j_config"
else
cmd="$cmd -Dlog4j.configuration="
fi

# Execute the command
echo "Executing: $cmd"
eval $cmd
Empty file added build/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Copyright (C) 2012 Brian Ferris <bdferris@onebusaway.org>
#
# Licensed 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.
#

services:
builder:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./build:/root/.m2/repository
- .:/src
stdin_open: true
tty: true
39 changes: 16 additions & 23 deletions onebusaway-admin-webapp/pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<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.onebusaway</groupId>
<artifactId>onebusaway-application-modules</artifactId>
<version>2.5.13-otsf</version>
</parent>
<artifactId>onebusaway-admin-webapp</artifactId>
<packaging>war</packaging>
<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.onebusaway</groupId>
<artifactId>onebusaway-application-modules</artifactId>
<version>2.5.13-otsf</version>
</parent>
<artifactId>onebusaway-admin-webapp</artifactId>
<packaging>war</packaging>

<name>onebusaway-admin-webapp</name>
<properties>
Expand Down Expand Up @@ -373,7 +375,8 @@
<skipPoms>false</skipPoms>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
<generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename>
<!-- travis takes some shortcuts with git so we need to tell the plugin to ignore git errors -->
<!-- travis takes some shortcuts with git so we need to tell the plugin to
ignore git errors -->
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<gitDescribe>
Expand All @@ -385,17 +388,6 @@
</gitDescribe>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
-->
</plugins>
<resources>
<resource>
Expand All @@ -421,7 +413,8 @@
</configuration>
</plugin>

<!--This plugin's configuration is used to store Eclipse m2e settings
<!--This
plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down Expand Up @@ -477,4 +470,4 @@
</plugins>
</pluginManagement>
</build>
</project>
</project>
10 changes: 6 additions & 4 deletions onebusaway-agency-metadata/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<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">
<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>org.onebusaway</groupId>
Expand Down Expand Up @@ -76,10 +78,10 @@
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

</project>
</project>
11 changes: 6 additions & 5 deletions onebusaway-alerts-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?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">
<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">
<parent>
<artifactId>onebusaway-application-modules</artifactId>
<groupId>org.onebusaway</groupId>
Expand Down Expand Up @@ -53,11 +55,10 @@
We don't actually want to build gtfs-realtime.proto, since it's included in
io.mobilitydata.transit:gtfs-realtime-bindings, but we do need it to be available for the extension
.proto files to import. Thus, it is excluded here.
-->
com/google/transit/realtime/gtfs-realtime.proto
</exclude>
--> com/google/transit/realtime/gtfs-realtime.proto </exclude>
</excludes>
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>
com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</plugin>
<!-- This is where we control the master plugin version used by all modules -->
Expand Down
24 changes: 13 additions & 11 deletions onebusaway-alerts-persistence/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0"?>
<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">
<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.onebusaway</groupId>
Expand Down Expand Up @@ -43,11 +45,11 @@
<artifactId>gson</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down Expand Up @@ -94,10 +96,10 @@
<artifactId>onebusaway-gtfs-realtime-api</artifactId>
<version>${gtfs-api-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
</dependencies>
<build>
<!-- This is where we control the master plugin version used by all modules -->
Expand All @@ -110,4 +112,4 @@
</build>


</project>
</project>
6 changes: 4 additions & 2 deletions onebusaway-api-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<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">
<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>org.onebusaway</groupId>
Expand Down Expand Up @@ -36,4 +38,4 @@
</dependency>
</dependencies>

</project>
</project>
Loading

0 comments on commit 92cc8e3

Please sign in to comment.