From 0e99a6fef2037dd0b06fea7161c31c5f691e17b9 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sat, 9 Jan 2021 10:09:29 +0100 Subject: [PATCH] Document build with Ant --- .github/workflows/java.yml | 42 +++++++++++++++++++++++++++++++++++--- README.md | 17 ++++++++++++++- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index bb3952f..f244c20 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -3,9 +3,8 @@ name: Java CI on: [push, pull_request] jobs: - build: - runs-on: ubuntu-latest - + maven-ubuntu18: + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - run: sudo apt-get install protobuf-compiler @@ -15,3 +14,40 @@ jobs: java-version: 1.8 - name: Build with Maven run: mvn -B package --file pom.xml + + maven-ubuntu20: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - run: sudo apt-get install protobuf-compiler + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Maven + run: mvn -B package --file pom.xml + + ant-ubuntu18: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - run: sudo apt-get install protobuf-compiler libprotobuf-java + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Ant + run: ant + + ant-ubuntu20: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - run: sudo apt-get install protobuf-compiler libprotobuf-java + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Ant + run: ant + diff --git a/README.md b/README.md index 5460b2f..1d2a84e 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ something more complete see [libosmium](https://osmcode.org/libosmium/). ## Java Version +### Building with Maven + We publish the Java library to [Maven Central](https://search.maven.org/): ```xml @@ -34,8 +36,21 @@ To build the Java library run: mvn package ``` -For a Java usage example, see [`ReadFileTest`](https://github.com/openstreetmap/OSM-binary/blob/master/test.java/crosby/binary/ReadFileTest.java) +For a Java usage example, see +[`ReadFileTest`](https://github.com/openstreetmap/OSM-binary/blob/master/test.java/crosby/binary/ReadFileTest.java). +### Building with Ant + +If you can not use Maven for some reason you can use the +[Ant](https://ant.apache.org/) instead: + +```sh +ant +``` + +This will build `osmpbf.jar` in the main directory. + +This build is also used for Debian packaging. ## C++ Version