Reputation: 266900
with a grails project, do you put java code inside the same project or do you have to somehow import the java libraries you created from another java project?
Upvotes: 1
Views: 1109
Reputation: 39877
I put any java source in the src/java directory and it gets automatically compiled when I run the app. When I have jar files with out associated code such as third party libraries or librarys from another group in the company I just drop them in the lib directory and grails automatically allows you to use them.
Upvotes: 2
Reputation: 5687
In addition, if you use Maven for the Java project, you can set pom=true in the BuildConfig.groovy file and create a dependency on the original JAR; it will get pulled in with each build.
Upvotes: 1
Reputation: 346240
Both alternatives you mention work fine. IIRC, Grails even automatically creates a "java" source folder for your Java classes.
Upvotes: 1