I have tried to follow and understand the threads on resolving with mavenLocal and cannot get gradle to work with it. hence starting a new thread. i looked at other thread
I’m trying to run gradle v.10 with a new project and that has an org.easyrules jar dependency. when i first tried to find the maven repo via google it found a v1.0 build string, but the examples from easyrules are based on 2.2.0.
so i cloned the project from github. then ran the mvn build, and mvn clean install. This put the generated jar into my local .m2 repository ( I have no settings/xml defined in that .m2 repo). this publishes a number of jars to the repo - that contain the pom and the jar at the same time - so i get a directory created like this for example
C:\Users\William.m2\repository\org\easyrules\easyrules-core\2.2.1-SNAPSHOT, containing a easyrules-core-2.2.1-SNAPSHOT.jar, and easyrules-core-2.2.1-SNAPSHOT.pom.
so far so good.
I then go to my gradle project inside intellij and tried to add mavenLocal() (after and before mavenCentral ()).
i even tried this (and various derivatives thereof)
repositories {
mavenCentral()
//mavenLocal()
maven {
url new File(System.getProperty("user.home"), ".m2/repository").toURI().toURL() //file:///C:/Users/William/.m2/repository'
}
}
to no avail. Gradle refused to resolve the jar.
In the end. I went back to google and searched harder for easyrules repo and found ref for v2.1.0, and so i removed all the local stuff and went back to remote dependency via maven central (no ‘SNAPSHOT’ this time), and gradle then refreshed and added it to the libraries.
so my simple query is this. If you get a local mvn project and build/publish to your local .m2, how do you configure build.gradle to look at the local .m2 repo to resolve. I could not get this to work
regards in advance - i just know this issue is going to hit me again one day, and i’ve wasted time trying to resolve and failed. hence ask the community.