I'm using:
My approach was to create a Grails application, then convert it to a Maven project and then I added a Java Maven project as dependency through the "Java Build Path" -> "Projects" option. But every time I want to run the Grails application the Grails application is unable to resolve those classes from my other Java Maven project. Might be a very simple problem but I couldn't find any solution so far.
Thank you in advance!
I think a better approach would be publishing your jar into your local repository, then you can add your dependency into your grails application by configuring BuildConfig.groovy:
1) Add your local maven repo to your project:
repositories {
inherits true
checksums false
grailsPlugins()
mavenLocal()
mavenCentral()
}
2) add your dependency:
dependencies {
compile: "<your_group_id> : <your_artifact_id> : <version>"
...
}
When you're launching your project in grails env, it will download automatically your jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With