title: Grails not picking jars from Maven repository based on pom.xml
body: <p>I am getting some compilation error because of Grails not picking jars from Maven repository based on pom.xml file. </p>
  
  <p>My BuildConfig.groovy</p>
  
  <pre><code>grails.project.dependency.resolution = {
      // inherit Grails' default dependencies
      inherits("global") {
          // uncomment to disable ehcache
          // excludes 'ehcache'
          //excludes "grails-plugin-log4j"
      }
  
      log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
      checksums true // Whether to verify checksums on resolve
      //excludes   "grails-plugin-log4j"
      pom true
      repositories {
          inherits true // Whether to inherit repository definitions from plugins
          //grailsPlugins()
         /// grailsHome()
        //  grailsCentral()
  
          mavenCentral()
          mavenLocal()
  
          // These are for the hudson machine
          // mavenRepo "/apps/profiler/ci/hudson/workspace/RMSPortal2/m2_repo"
          // mavenRepo "/apps/profiler/ci/hudson/workspace/RMSPortal2/m2_repo"
  
          //mavenRepo "http://snapshots.repository.codehaus.org"
          //mavenRepo "http://repository.codehaus.org"
          // mavenRepo "http://download.java.net/maven/2/"
          //mavenRepo "http://repository.jboss.com/maven2/"
      }
  
      dependencies {
          // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
          runtime 'mysql:mysql-connector-java:5.1.5'
                  compile 'org.apache.activemq:activemq-core:5.3.0'
          test 'org.objenesis:objenesis:1.2'
          compile 'org.slf4j:slf4j-log4j12:1.6.6'
          //compile "spring-security-config:3.0.1.RELEASE"
      }
  
      plugins {
          compile ":spring-security-core:1.2.7.3"
          compile ":spring-security-ui:0.2"
          compile ":jquery-ui:1.8.15"
          compile ":jqgrid:3.8.0.1"
          compile ":famfamfam:1.0.1"
          compile ":mail:1.0"
          compile ":jms:1.2"
          compile ":calendar:1.2.1"   
          compile ':gpars:0.3'
          compile ":lang-selector:0.3"
          compile ":crypto:2.0"
          compile ":grails-melody:1.13"
          runtime ":hibernate:$grailsVersion"
          runtime ":jquery:1.7.1"
          //runtime ":resources:1.1.6"
          runtime ":resources:1.2.RC2"
          runtime ":export:1.5"
  
          // Uncomment these (or add new ones) to enable additional resources capabilities
          //runtime ":zipped-resources:1.0"
          //runtime ":cached-resources:1.0"
          //runtime ":yui-minify-resources:0.1.4"
           build ":tomcat:$grailsVersion"
           test ":spock:0.6"
      }
  }
  </code></pre>
  
  <p>I am getting error like this:</p>
  
  <pre><code> Configuring classpath.
  | Environment set to development.....
  | Packaging Grails application.....
  | Compiling 141 source files.
  | Error Compilation error: startup failed:
  /mycompany/dev/rmaddidev/wsmavenTest/pro/src/groovy/com/mycompany/rms/common/RMSExportService.groovy: 15: unable to resolve class org.xhtmlrenderer.pdf.ITextRenderer
   @ line 15, column 1.
     import org.xhtmlrenderer.pdf.ITextRenderer
     ^
  1 error
  </code></pre>
  
  <p>ITextRenderer class exist in core-renderer.jar i specified in maven pom as below.</p>
  
  <p>if i add those jars in BuildConfig.groovy, then it working fine.</p>
  
  <pre><code> compile 'org.xhtmlrenderer:core-renderer:R8'
      compile 'com.lowagie:itext:2.0.8'
  </code></pre>
  
  <p>And My Pom file:</p>
  
  <pre><code>&lt;dependencies&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.xhtmlrenderer&lt;/groupId&gt;
      &lt;artifactId&gt;core-renderer&lt;/artifactId&gt;
      &lt;version&gt;R8&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.lowagie&lt;/groupId&gt;
      &lt;artifactId&gt;itext&lt;/artifactId&gt;
      &lt;version&gt;2.0.8&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>