I have a few Java/Maven projects that I want to use in a Grails 2.0.4 project. I have tried various approaches, such as:
- Installing the JAR files in my local maven repository, and executing
grails install-dependency com.foo:my-project:0.0.1-SNAPSHOT
- Copying the JAR files into the
lib
folder of grails. - Adding
compile com.foo:my-project:0.0.1-SNAPSHOT
to the dependencies section ofBuildConfig.groovy
- Uncommenting
mavenLocal()
and passing/home/me/.m2/repository
I may have tried a few other things, such as superstitiously throwing in a grails clean
whenever convenient. In every case grails compile
yields the following result: compilation fails, unable to resolve every reference to any of the classes in either of the JARs.
Any idea what I’m missing?
Advertisement
Answer
Putting the jar in the lib folder should do the trick. We are using the same approach currently without problems.