Skip to content

Commit

Permalink
Merge pull request #370 from OneBusAway/fix-license
Browse files Browse the repository at this point in the history
Fix license
  • Loading branch information
aaronbrethorst authored Sep 6, 2024
2 parents bc2f8ae + 0d2c44e commit e78162b
Show file tree
Hide file tree
Showing 42 changed files with 778 additions and 818 deletions.
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"
}
23 changes: 0 additions & 23 deletions build-and-test.sh

This file was deleted.

73 changes: 66 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,69 @@
# limitations under the License.
#

mvn -U clean install \
-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 \
-DskipTests=true \
-Dlicense.skip=true \
-Dmaven.javadoc.skip=true \
-Dvalidate.silent=true \
-Dlog4j.configuration=
#!/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
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# 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:
Expand Down
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 e78162b

Please sign in to comment.