I am trying to start a Grails application that consists of multiple plug-ins each of which is stored as a separate Maven module. Dependencies are specified within BuildConfig.groovy
files. While starting the app classes (both Java and Groovy) stored in other plugins are not loaded. I've checked the classpath and it seems it does not include classed generated by other plugins.
Dependencies within BuildConfig.groovy
look like this:
grails.project.class.dir = "target/classes" grails.project.test.class.dir = "target/test-classes" grails.project.test.reports.dir = "target/test-reports" grails.plugin.location.'plugin-one' = "${basedir}/../plugin-one" grails.plugin.location.'plugin-two' = "${basedir}/../plugin-two" grails.project.dependency.resolution = { inherits("global") { excludes 'commons-logging', 'commons-collections' } log "warn" repositories { inherit false mavenRepo "http://my.maven.repo" } plugins { runtime ':tomcat:1.3.7' runtime ':hibernate:1.3.7' ... } dependencies { compile "org.apache.httpcomponents:httpclient:4.2.1" compile "org.apache.httpcomponents:httpmime:4.2.1" compile "commons-collections:commons-collections:3.2.1" build "org.apache.httpcomponents:httpclient:4.2.1" build "org.apache.httpcomponents:httpmime:4.2.1" build "commons-collections:commons-collections:3.2.1" ... } } gwt.version = "2.3.0"
The structure of Maven modules is as follows:
/pom.xml /my-app/pom.xml /plugin-one/pom.xml /plugin-two/pom.xml ...