Linking a Corporate Maven Repository

63 views
Skip to first unread message

Nikita Rahman

unread,
Jul 30, 2024, 2:48:32 PM7/30/24
to jBPM Setup
Hi,

I'm trying to use jBPM for a work project, but due to a corporate firewall I am unable to access the Maven repo that is automatically used to download artifacts. How can I change this configuration to replace the given Maven with my company's internal mirrored Maven repo?

Thank you!

László Tóth

unread,
Jul 31, 2024, 3:04:12 AM7/31/24
to jBPM Setup
Hi!
You can create local repo.
JAVA_OPTS="$JAVA_OPTS -Dkie.maven.settings.custom=/yourM2Path/settings.xml"

<settings>
   <localRepository>/opt/em/local-maven</localRepository>
</settings>

So, by deploy you open internet and you can download jar-s to the localRepository. Wildfly all time can use localRepository.
H.

Nikita

unread,
Jul 31, 2024, 3:44:07 PM7/31/24
to jBPM Setup
Hi,

Thank you for your response! The person I'm working with tried to add a settings.xml file, then mounted the directory in the docker container, and passed the environment variable in the command line. This didn't work. There was also an attempt to add a repositories section in the pom.xml, but that didn't do anything either. Is there something we are doing wrong/a step we are missing?

Thank you!

László Tóth

unread,
Jul 31, 2024, 5:35:46 PM7/31/24
to jBPM Setup
Hi!
Sorry I copied bad settings.xml, our deploy settings.xml!

The good one

<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/
  <localRepository>SOME_DIR_WILDFLY_HOME?/.m2/repository</localRepository>
  <mirrors>
    <mirror>
      <mirrorOf>*</mirrorOf>
      <url>file:///DIR_OF_LOCAL_REPO</url>
      <id>internal</id>
    </mirror>
  </mirrors>
</settings>

JAVA_OPTS="$JAVA_OPTS -Dkie.maven.settings.custom=DIR_OF_SETTINGS_XML/settings.xml"

The other settings.xml is out deploy settings.xml which load our jars from our companie's nexus and put to local repo, which is used by 'kie.maven.settings.custom' settings.xml

H.

nikitar...@gmail.com a következőt írta (2024. július 30., kedd, 20:48:32 UTC+2):

Nikita

unread,
Aug 13, 2024, 9:04:12 AM8/13/24
to jBPM Setup
Hi!

We adjusted our settings.xml to be using our company's maven repository now, however when trying to build a project in business central we are still getting errors. It says that it is unable to create project from the input stream (ProjectBuildingException) and also that there is a non readable POM:input contained no data. Are you familiar with these errors/know why we might still be unable to build properly?

Thank you!
Nikita
Reply all
Reply to author
Forward
0 new messages