I have a quarkus project which uses jib. I'm using skaffold to deploy the application to a local k8s cluster, this is my skaffold.yaml file:
apiVersion: skaffold/v1
kind: Config
build:
artifacts:
- image: local-registry.localhost:12345/rc/my-image-name
jib:
args: ['-DskipTests']
deploy:
kubectl:
manifests:
- target/kubernetes/kubernetes.yml
However, when I run skaffold dev I get the following issue:
listing files: could not fetch dependencies for workspace .: initial Jib dependency refresh failed: failed to get Jib dependencies: running [mvn jib:_skaffold-fail-if-jib-out-of-date -Djib.requiredVersion=1.4.0 --non-recursive jib:_skaffold-files-v2 --quiet --batch-mode]
- stdout: "[ERROR] No plugin found for prefix 'jib' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/dev/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]\n[ERROR] \n[ERROR]
How can I fix that " No plugin found for prefix 'jib' in the current project and in the plugin groups" error?
Update to the question:
I added the following profile to the pom.xml, the same way I've done in a spring boot project:
<profiles>
<profile>
<id>jib</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.1.4</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
However, now I am getting the following issue:
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.1.4:dockerBuild (default-cli) on project report-center-reports: Main class was not found, perhaps you should add a `mainClass` configuration to jib-maven-plugin -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
maven build failed: exit status 1. See the build transcript for suggestions..