I'm generating a custom JAR to publish to our companies internal JFrog artifact repo. Able to generate the JAR file locally just fine using mvn clean install
. Not working from CircleCI for some reason.
Error I'm seeing in CircleCI:
[main] ERROR org.apache.maven.cli.MavenCli - Cannot invoke "org.eclipse.aether.impl.RemoteRepositoryFilterManager.getRemoteRepositoryFilter(org.eclipse.aether.RepositorySystemSession)" because "this.remoteRepositoryFilterManager" is null
config.yml
:
version: 2.1
jobs:
create-build-package:
docker:
- image: cimg/openjdk:17.0.10
working_directory: ~/repo
steps:
- checkout
- run:
name: Install JFrog CLI
command: curl -fL https://getcli.jfrog.io | sh
- run:
name: Configure JFrog Creds
command: |
./jfrog config add myCompany \
--artifactory-url $ARTIFACTORY_URL \
--user $ARTIFACTORY_USER \
--apikey $ARTIFACTORY_APIKEY \
--interactive=false
- run:
name: Create Maven Build Config
command: ./jfrog rt mvnc
- run:
name: Install Maven
command: |
./jfrog rt mvn clean install
- run:
name: Upload Package to JFrog
command: |
./jfrog rt u "multi*/*.jar" release \
--build-name=karate \
--build-number=$CIRCLE_BUILD_NUM \
--flat=false
./jfrog rt bce karate $CIRCLE_BUILD_NUM # collects all environment variables on the agent
./jfrog rt bp karate $CIRCLE_BUILD_NUM # attaches ^^ to the build in artifactory
workflows:
build:
jobs:
- create-build-package:
context: artifactory
POM does not have any references to JFrog artifact repo, so not included.
The above error is due to running the old version of JFrog CLI. It has been fixed in v2: https://github.com/jfrog/jfrog-cli/issues/1863