GRAILS + Eclipse Project Dependencies

I am working on a Grails project, which consists of a grails-app wizard and several grails plugins. One of Grails plugins is "Core" and contains several classes groovy and java domain and utility. Currently, the main project is the grails plugin, but Id loves pulling sources from src / groovy and src / java into the groovy class library, which ultimately packs into a jar file.

I like to understand how to properly configure this method in Eclipse, so that the plugins reference the new groovy library, and the application refers to the plugins, and everything builds fine. If I distribute the Grails plugin and then add the groovy project to the build path using eclipse, I can get the plugin to create a fine. The problem is that now I am adding the plugin link from the grails web application to this plugin and the grails application will not create. I added the groovy library to the build path of the web application, but when Greil tries to add the plugin, he complains that he does not know about the classes in my groovy library. Heres project structure

core server (groovy project)

Ia-security-plugin plugin (Grails plugin project) (the server core is on the build path, it builds great)

server-core-web (grails application project) (ia-security-plugin links in Build.config) (wont build)

+4
source share
1 answer

During development, add the following line to your BuildConfig.groovy

grails.plugin.location.'plugin-project'="../PluginProject" 

where PluginProject is the eclipse project relative to your current project, and the plug-in project is the name of the plug-in project. This requires you to rebuild your plugins and all reference problems. You can even debug your main project in a plugin project.

For deployment time, I installed Artifactory with the Maven repository identifier (in the plugin project) and [Main Project] BuildConfig.groovy on

 compile (":plugin-name:latest.release") 

together with

 mavenRepo "http://location-of-local-artifactory/ 

Use http://grails.org/plugin/release to configure release and storage settings.

Hudson automatically picks up the plugin and builds the war file on the build machine.

Alternatively, you can simply create a war file and deploy it to the server if your project consists of several developers.

0
source

All Articles