Skip to content

Commit

Permalink
breaking change: client library now requires Java 11 (#214)
Browse files Browse the repository at this point in the history
* breaking change: client library now requires Java 11

* build: bump version
  • Loading branch information
jeremylong authored Sep 30, 2024
1 parent 57923ce commit 2f35ed1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 6.2.0
version = 7.0.0
4 changes: 2 additions & 2 deletions open-vulnerability-clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ See API usage examples in the [open-vulnerability-store](https://github.com/jere
<dependency>
<groupId>io.github.jeremylong</groupId>
<artifactId>open-vulnerability-clients</artifactId>
<version>6.2.0</version>
<version>7.0.0</version>
</dependency>
```

### gradle

```groovy
implementation 'io.github.jeremylong:open-vulnerability-clients:6.2.0'
implementation 'io.github.jeremylong:open-vulnerability-clients:7.0.0'
```

### api usage
Expand Down
6 changes: 0 additions & 6 deletions open-vulnerability-clients/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ plugins {

description = 'Clients for vulnerability sources'

compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
}

task addVesionResource (type: Copy) {
from ('../')
include 'gradle.properties'
Expand Down
22 changes: 11 additions & 11 deletions vulnz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ After running `install` you may need to restart your shell for the completion to
```bash
./gradlew vulnz:build
cd vulnz/build/libs
./vulnz-6.2.0.jar install
./vulnz-7.0.0.jar install
vulnz cve --cveId CVE-2021-44228 --prettyPrint
```

Expand Down Expand Up @@ -76,7 +76,7 @@ export JAVA_OPTS="-Xmx2g"
Alternatively, run the CLI using the `-Xmx2g` argument:

```bash
java -Xmx2g -jar ./vulnz-6.2.0.jar
java -Xmx2g -jar ./vulnz-7.0.0.jar
```

### Creating the Cache
Expand All @@ -91,7 +91,7 @@ vulnz cve --cache --directory ./cache
Alternatively, without using the above install command:

```bash
./vulnz-6.2.0.jar cve --cache --directory ./cache
./vulnz-7.0.0.jar cve --cache --directory ./cache
```

When creating the cache all other arguments to the vulnz cli
Expand All @@ -112,16 +112,16 @@ There are a couple of ENV vars

```bash
# replace the NVD_API_KEY with your NVD api key
docker run --name vulnz -e NVD_API_KEY=myapikey jeremylong/open-vulnerability-data-mirror:v6.2.0
docker run --name vulnz -e NVD_API_KEY=myapikey jeremylong/open-vulnerability-data-mirror:v7.0.0

# if you like use a volume
docker run --name vulnz -e NVD_API_KEY=myapikey -v cache:/usr/local/apache2/htdocs ghcr.io/jeremylong/vulnz:6.2.0
docker run --name vulnz -e NVD_API_KEY=myapikey -v cache:/usr/local/apache2/htdocs jeremylong/open-vulnerability-data-mirror:7.0.0

# adjust the memory usage
docker run --name vulnz -e JAVA_OPT=-Xmx2g jeremylong/open-vulnerability-data-mirror:v6.2.0
docker run --name vulnz -e JAVA_OPT=-Xmx2g jeremylong/open-vulnerability-data-mirror:v7.0.0

# you can also adjust the delay
docker run --name vulnz -e NVD_API_KEY=myapikey -e DELAY=3000 jeremylong/open-vulnerability-data-mirror:v6.2.0
docker run --name vulnz -e NVD_API_KEY=myapikey -e DELAY=3000 jeremylong/open-vulnerability-data-mirror:v7.0.0

```

Expand All @@ -133,10 +133,10 @@ docker exec -u mirror vulnz /mirror.sh

### Build

Assuming the current version is `6.2.0`
Assuming the current version is `7.0.0`

```bash
export TARGET_VERSION=6.2.0
export TARGET_VERSION=7.0.0
./gradlew vulnz:build -Pversion=$TARGET_VERSION
docker build vulnz/ -t ghcr.io/jeremylong/vulnz:$TARGET_VERSION --build-arg BUILD_VERSION=$TARGET_VERSION
```
Expand All @@ -145,7 +145,7 @@ docker build vulnz/ -t ghcr.io/jeremylong/vulnz:$TARGET_VERSION --build-arg BUIL

```bash
# checkout the repo
git tag vulnz/6.2.0
git tag vulnz/7.0.0
git push --tags
# this will build vulnz 6.2.0 on publish the docker image tagged 6.2.0
# this will build vulnz 7.0.0 on publish the docker image tagged 7.0.0
```

0 comments on commit 2f35ed1

Please sign in to comment.