I am using the kie-server docker image and sending curl commands to perform necessary actions.
In my settings.xml I am defining a remote repo as so:
<profiles>
<profile>
<id>kie</id>
<properties>
</properties>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://mynexus:8081/nexus/content/repositories/releases</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
... plugin repo also set ...
</profiles>
<activeProfiles>
<activeProfile>kie</activeProfile>
</activeProfiles>
When I try to create a container and define an artifact in the nexus repo, I get the following output:
09:29:35,236 WARN [org.appformer.maven.integration.embedder.MavenSettings] (default task-1) Environment variable M2_HOME is not set
09:29:36,033 INFO [org.appformer.maven.integration.Aether] (default task-1) The local repository directory /opt/jboss/.m2/repository doesn't exist. Creating it.
09:30:06,421 WARN [org.appformer.maven.integration.MavenRepository] (default task-1) Unable to resolve artifact: myGroup:myArtifact:0.0.1
09:30:36,542 ERROR [org.kie.server.services.impl.KieServerImpl] (default task-1) Error creating container 'myContainer' for module 'myGroup:myArtifact:0.0.1': java.lang.RuntimeException: Cannot find KieModule: myGroup:myArtifact:0.0.1
It looks like it is ignoring my remote repo settings and trying to use a local repo (and creating it first as it doesn't exist).
If I set a local maven repo and put the required artifact in there, the container creates fine and I can run the rules, so the rule/jar/container data are all ok.
I have checked the kie-server docker container once it's running, and the correct settings.xml file is in the /opt/jboss/.m2 folder which I believe is right.
Thanks in advance.