开发者

Can I grails project have java code in it, or you have to import?

开发者 https://www.devze.com 2023-01-04 14:14 出处:网络
with a grails project, do you put java code inside the s开发者_StackOverflowame project or do you have to somehow import the java libraries you created from another java project?I put any java source

with a grails project, do you put java code inside the s开发者_StackOverflowame project or do you have to somehow import the java libraries you created from another java project?


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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消