Mavenlocal() not recognized

hi together

In my gradle.build I referenced a KJAR (Kie Jar containing rules) with
“implementation ‘com.esalute:esalutebasic:1.0.0-SNAPSHOT’”. The package (JAR) and the associated POM was build with mvn install and is located in the directory C:\users\myUsername.m2\Repository\com\esalute\esalutebasic.

mavenlocal() is defined as follows:
repositories {
mavenLocal()
mavenCentral()
maven {
url ‘https://global.repo.jmix.io/repository/public
}
maven {
url = ‘https://global.repo.jmix.io/repository/premium
credentials {
username(rootProject.hasProperty(‘premiumRepoUser’) ?
rootProject[‘premiumRepoUser’] : System.getenv(‘PREMIUM_REPO_USER’))
password(rootProject.hasProperty(‘premiumRepoPass’) ?
rootProject[‘premiumRepoPass’] : System.getenv(‘PREMIUM_REPO_PASS’))
}
}
}

Compiling the project leads to the following error message:

Execution failed for task ‘:compileJava’.

Could not resolve all files for configuration ‘:compileClasspath’.
Could not resolve com.esalute:esalutebasic:1.0.0-SNAPSHOT.
Required by:
project :
Could not resolve com.esalute:esalutebasic:1.0.0-SNAPSHOT.
Unable to load Maven meta-data from https://global.repo.jmix.io/repository/premium/com/esalute/esalutebasic/1.0.0-SNAPSHOT/maven-metadata.xml.
Could not GET ‘https://global.repo.jmix.io/repository/premium/com/esalute/esalutebasic/1.0.0-SNAPSHOT/maven-metadata.xml’. Received status code 403 from server: Forbidden

To me it looks like jmix is not able to locate “mavenlocal()”. But the environmental variables and paths are set in a correct manner.

Any idea? Any hint is welcome since I am totally stucked here.

thx and best regards

Michael

Hi,

Make sure that there are no typos in the lib name and the version in the maven local is the same as you defined in the build.gradle. Jmix itself doesn’t prevent Mavel local usage as it’s gradle setting.

Regards,
Gleb

Hi Gleb, thx for your response.

I reviewed every single factor of the settings but no typo of wrong reference was detected. So I am still stucked at that point.

This is the path to my maven repo including the JAR-/POM-files and maven-metadata.xml: “C:\Users\Michael Lutz.m2\repository\com\esalute\esalutebasic\1.0.0-SNAPSHOT”.

In the gradle.build settings I am referring to this as under ‘dependencies’ as:
implementation ‘com.esalute:esalutebasic:1.0.0-SNAPSHOT’

Do you see anything wrong at first glance?

Thx in advance

Michael

1 Like

The only thing that is concerns me is the path C:\Users\Michael Lutz.m2\repository\...
The correct path must be C:\Users\Michael Lutz\.m2\repository\.. as .m2 is a folder in the users directory.

hi Gleb, thanks for the hint but that was a typo in my message. In reality everything was spelled in the right manner.

Unfortunately, I have no idea. Could you please try to create a small demo project and attach both project and esalutebasic from maven local? I’ll try to reproduce the problem on my PC.

hello Gleb, I took a different approach now by using KIE ServerClient. But the original problem as described still exists.

I try to produce a small projects to enable you reproducing the problem.

Thx for your patience and caring.

best regards,

Michael

Hi Gleb, just wan’t to inform you, that I found a workaround. So the original reason opening this thread still exists but no need to dig into it any further at this time. Thx for your help anyway.

1 Like