Maven repository in Business Central

921 views
Skip to first unread message

Chris Selwyn

unread,
Apr 6, 2016, 7:21:25 AM4/6/16
to Drools Setup
I keep getting "Non-resolvable import POM" when trying to upload jar files into the Business Central repository.

The jar file was built from a Maven project and contains a dependency on another artifact.
I know that the artifact is available in both my local .m2 repository and also in a Nexus that I have setup.

The Business Central is installed into a JBoss EAP 6.4.6 and is running as my own username (on a Windows 7 desktop).

It seems that the Business Central does not use my ${user.home}/.m2/settings.xml because otherwise it would find the artifact just fine.

Does Business Central only use its own local M2 repository in bin/repositories/kie?
Or can I convince it to use other repositories via some Maven settings.xml file or equivalent somewhere?

Chris Selwyn

Michael Anstis

unread,
Apr 6, 2016, 7:41:15 AM4/6/16
to drools...@googlegroups.com

Business Central doesn't limit itself to its internal repository it should adhere to maven conventions and as such additional repositories not in maven's master parent pom should be configured in settings.xml.

That said you imply you have your nexus repository configured there already. I assume the profile is active by default?

I don't suppose there's a stack trace you can share?

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/db409bd3-0b34-462b-b9ba-51ab416d542a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Selwyn

unread,
Apr 6, 2016, 8:24:44 AM4/6/16
to drools...@googlegroups.com
My settings.xml is stored in ${user.home}/.m2/settings.xml but the ${user.home} is in an unconventional place because of company policy... \\<server>\cselwyn\Profile.
When I run maven from command line or from NetBeans then the settings.xml in that directory gets picked up just fine.
I can see that the nexus is being accessed just fine as directed by the repositories section of a profile which has activeByDefault= true.

However, it seems that the maven in JBoss isn't picking up the settings.xml from that directory and I don't know how to find out where it is trying to find its settings from.
Is there some logging that I can use to find out where the maven in JBoss is looking for its settings.xml?

Chris Selwyn

Michael Anstis

unread,
Apr 6, 2016, 8:30:22 AM4/6/16
to drools...@googlegroups.com

You can instruct KIE to use a custom location for settings.xml otherwise it'll default to .m2. I cannot remember the System Property name but BCC a colleague who will know.

Chris Selwyn

unread,
Apr 6, 2016, 8:59:36 AM4/6/16
to drools...@googlegroups.com
I am aware of the "org.guvnor.m2repo.dir" which is described in the Admin and Config guide.
That defaults to repositories/kie but I don't think that is it.
That is the private repository itself which is not the same as where to look for the settings.xml file.

If you could give your colleague a nudge that would be most appreciated.

Chris

Michael Anstis

unread,
Apr 6, 2016, 10:21:56 AM4/6/16
to drools...@googlegroups.com
Hi Chris,

I managed to get to a computer and dug out the System Property name: kie.maven.settings.custom.


With kind regards,

Mike

Chris Selwyn

unread,
Apr 6, 2016, 10:26:33 AM4/6/16
to drools...@googlegroups.com
You're very kind.
I have actually just stumbled across this setting myself!
Now making progress :-)

Chris

Chris Selwyn

unread,
Apr 6, 2016, 12:43:51 PM4/6/16
to drools...@googlegroups.com
It turns out (I think) that the two different versions of Java that I am using determine the user.home property in different ways.
Which is very inconvenient because Maven finds all sorts of things (not just the settings.xml) relative that directory.

My JBoss EAP running the business central is on Java 8 and decided that my user.home should be c:\Users\cselwyn
My command line tools and NetBeans are (for historical reasons) on Java 6 and decided that my user.home should be \\<server>\cselwyn\Profile

So I overrode the setting of the user.home on JBoss by predefining its value in the standalone.xml to be the  same as is used by my command line Java 6.
Now all is well because everything uses the same settings!

Chris
Reply all
Reply to author
Forward
0 new messages