Summary
I have a drools workbench server that I want to push data model jars to from maven. I can push jars to it, but when I do, the artefacts do not resolve. If I try to upload the artefacts manually through the drools UI, I get other maven errors.
Details
I have a drools installation of drools and KIE 7.24 (and 23) (https://hub.docker.com/r/jboss/jbpm-server-full/) running in a local docker container. I want to push data models to workbench. My pom.xml
of the project containing the facts looks like
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<properties>
<maven.compiler.release>11</maven.compiler.release>
</properties>
<groupId>decisions</groupId>
<artifactId>fact</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>kjar</packaging>
<name>Facts</name>
<description>Facts</description>
<build>
<plugins>
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>7.24.0.Final</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>workbench</id>
<url>http://localhost:8080/business-central/maven2</url>
</repository>
</distributionManagement>
</project>
A mvn deploy
on the host succeeds and builds. When I log into the drools container, I can verify that all the files are in $DROOLS_HOME/bin/repositories/kia/global
and when I bring up the artifacts screen, they are visible in the list.
When I try to add them as a project dependency, I get warnings from drools
07:49:16,790 WARN [org.appformer.maven.integration.MavenRepository] (default task-50) Unable to resolve artifact: decisions:fact:1.0.0
07:49:16,791 ERROR [org.kie.scanner.MavenClassLoaderResolver] (default task-50) Dependency artifact not found for: decisions:fact:1.0.0
Everything in the drools workbench maven repositories looks perfectly ok, but no matter what I do, the artifact will not resolve.
If I try to upload it manually to the artifact store using the workbench admin repository tool, I get a huge stack trace from drools:
08:14:06,447 ERROR [io.undertow.request] (default task-56) UT005023: Exception handling request to /business-central/maven2: java.lang.RuntimeException: org.eclipse.aether.deployment.DeploymentException: Failed to retrieve remote metadata com.lendi.decisions:fact:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.lendi.decisions:fact:1.0.0-SNAPSHOT/maven-metadata.xml from/to workbench (http://localhost:8080/business-central/maven2): Unauthorized (401)
at org.guvnor.m2repo.backend.server.repositories.DistributionManagementArtifactRepository.deploy(DistributionManagementArtifactRepository.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
at org.guvnor.m2repo.backend.server.repositories.ArtifactRepository$475362908$Proxy$_$$_WeldClientProxy.deploy(Unknown Source)
at org.guvnor.m2repo.backend.server.GuvnorM2Repository.lambda$deployArtifact$4(GuvnorM2Repository.java:300)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
Neither the drools manual or any references seem to have advice.