diff --git a/.github/workflows/maven.yml b/.github/workflows/build.yml similarity index 62% rename from .github/workflows/maven.yml rename to .github/workflows/build.yml index 3890931..a289840 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,13 @@ -name: Maven CI +name: Build CI -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +on: [push, pull_request] jobs: build: + name: Check source and build jar + if: + github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -16,9 +16,7 @@ jobs: with: java-version: '11' distribution: 'adopt' + - name: Check style + run: mvn --batch-mode --update-snapshots checkstyle:check - name: Build with Maven run: mvn --batch-mode --update-snapshots verify - - name: Run Javadoc with Maven - run: mvn --batch-mode --update-snapshots javadoc:javadoc - - name: Check style with Maven - run: mvn --batch-mode --update-snapshots checkstyle:check diff --git a/README.md b/README.md index eca4a9a..6f179ee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Maven CI](https://github.com/csdms/bmi-java/actions/workflows/maven.yml/badge.svg)](https://github.com/csdms/bmi-java/actions/workflows/maven.yml) +[![Build CI](https://github.com/csdms/bmi-java/actions/workflows/build.yml/badge.svg)](https://github.com/csdms/bmi-java/actions/workflows/build.yml) # bmi-java @@ -49,10 +49,44 @@ target `-- inputFiles.lst ``` -To install the jar file to your local Maven repository for use with other packages, run +To install the jar file to your local Maven repository +(typically `~/.m2/repository`) +for use with other packages, run $ mvn install +The result in the local repository will look like +```bash +edu +`-- colorado + `-- csdms + `-- bmi + |-- 2.0 + | |-- _remote.repositories + | |-- bmi-2.0.jar + | |-- bmi-2.0.jar.md5 + | |-- bmi-2.0.jar.sha1 + | |-- bmi-2.0.pom + | |-- bmi-2.0.pom.md5 + | `-- bmi-2.0.pom.sha1 + |-- maven-metadata-local.xml + |-- maven-metadata-local.xml.md5 + `-- maven-metadata-local.xml.sha1 + +4 directories, 10 files +``` + +### Developer note: Deploy + +The `bmi` package is hosted on the [CSDMS Apache Maven Repository](https://csdms.colorado.edu/repository). +To deploy the `bmi` package to this site, run +``` +$ mvn deploy +``` +on a machine where you have provided [server settings and encrypted login credentials](http://maven.apache.org/guides/mini/guide-encryption.html#how-to-encrypt-server-passwords) +for the site in your local `settings.xml` file. + + ## Use To write a BMI for a model, diff --git a/pom.xml b/pom.xml index 419a14f..ebf249a 100644 --- a/pom.xml +++ b/pom.xml @@ -2,6 +2,7 @@ + 4.0.0 Basic Model Interface for Java @@ -58,18 +59,6 @@ bmi - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - 8 - - http://github.com/csdms/bmi-java - - true - - maven-compiler-plugin 3.6.1 @@ -78,6 +67,17 @@ 1.8 + + maven-install-plugin + 2.5.2 + + true + + + + maven-deploy-plugin + 2.8.2 + org.apache.maven.plugins maven-checkstyle-plugin @@ -95,6 +95,20 @@ + + + org.apache.maven.wagon + wagon-ssh-external + 3.0.0 + + - 4.0.0 + + + + csdms + CSDMS Apache Maven Packages + scpexe://arroyo.colorado.edu/data/web/html/csdms.colorado.edu/repository + +