tags:

views:

42

answers:

3

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?

+1  A: 

Both alternatives you mention work fine. IIRC, Grails even automatically creates a "java" source folder for your Java classes.

Michael Borgwardt
+2  A: 

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.

Jared
cool, so does your IDE internally call the grails command line tool?
Blankman
Where did he mention IDE in that answer? Grails does this on its own regardless of the IDE in use (if there even is one).
Matt Lachman
A: 

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.

ecodan