Skip to content

Commit

Permalink
fix: resolve build error (#6312)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong authored Dec 15, 2023
1 parent 793931a commit 62ae1a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: mvn -s settings.xml -Prelease clean package verify source:jar javadoc:jar gpg:sign deploy -DreleaseTesting --no-transfer-progress --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
run: mvn -V -s settings.xml -Prelease clean package verify source:jar javadoc:jar gpg:sign deploy -DreleaseTesting --no-transfer-progress --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: SARIF Multitool
uses: microsoft/sarif-actions@v0.1
with:
Expand Down Expand Up @@ -143,6 +143,6 @@ jobs:
- name: Build Docker Image
run: ./build-docker.sh
- name: build scan target
run: mvn -s settings.xml package -DskipTests=true --no-transfer-progress --batch-mode
run: mvn -V -s settings.xml package -DskipTests=true --no-transfer-progress --batch-mode
- name: Test Docker Image
run: ./test-docker.sh
4 changes: 2 additions & 2 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Test with Maven
id: build
run: |
mvn -s settings.xml -pl utils,core,cli,ant,archetype -am compile verify --no-transfer-progress --batch-mode
mvn -V -s settings.xml -pl utils,core,cli,ant,archetype -am compile verify --no-transfer-progress --batch-mode
- name: SARIF Multitool
uses: microsoft/sarif-actions@v0.1
with:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: |
mvn -s settings.xml -pl utils,core,maven -am compile verify -DtestMavenPlugin -DreleaseTesting --no-transfer-progress --batch-mode
mvn -V -s settings.xml -pl utils,core,maven -am compile verify -DtestMavenPlugin -DreleaseTesting --no-transfer-progress --batch-mode
- name: Archive IT test logs
id: archive-logs
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: |
mvn -s settings.xml -Prelease "-DnexusUrl=https://oss.sonatype.org/" clean package source:jar javadoc:jar gpg:sign deploy site site:stage -DreleaseTesting --no-transfer-progress --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
mvn -V -s settings.xml -Prelease "-DnexusUrl=https://oss.sonatype.org/" clean package source:jar javadoc:jar gpg:sign deploy site site:stage -DreleaseTesting --no-transfer-progress --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: Archive code coverage results
id: archive-coverage
uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import static java.lang.String.format;

import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
Expand Down Expand Up @@ -139,7 +140,8 @@ public void fetchFile(URL url, File outputPath, boolean useProxy, String userKey
FileChannel destChannel = new FileOutputStream(outputPath).getChannel()) {
ByteBuffer buffer = ByteBuffer.allocateDirect(8192);
while (sourceChannel.read(buffer) != -1) {
buffer.flip();
// cast is a workaround, see https://github.com/plasma-umass/doppio/issues/497#issuecomment-334740243
((Buffer)buffer).flip();
destChannel.write(buffer);
buffer.compact();
}
Expand Down

0 comments on commit 62ae1a1

Please sign in to comment.