title: Grails and Local Maven Dependencies
body: <p>I'm developing a small web frontend in Grails. It is basically a "ultra light-weight" client app that is connected async through JMS.</p>
  
  <p>I have two dependencies in the project that I would like to pull from a Maven repository. They is <code>activemq</code> and <code>acme-adapter-api</code>, a in-house dependency, not available at the remote repository. </p>
  
  <p>I set up my <code>BuildConfig.groovy</code> (<strong>Grails 1.2M4</strong>) file like this, in order to access my dependencies:</p>
  
  <pre><code>repositories {
      grailsPlugins()
      grailsHome()
      mavenCentral()
      mavenRepo('D:/maven-repo')
  } dependencies {
      compile 'org.apache.activemq:apache-activemq:4.1.1'
      compile 'com.acme:acme-adapter-api:1.3-SNAPSHOT'
  }
  </code></pre>
  
  <p>When I run <code>grails dependency-report</code>, I can see this line concerning the <code>acme-adapter-api</code>, for example:</p>
  
  <pre><code>acme-adapter-api by com.acme  
  108 kB (0 kB downloaded, 108 kB in cache)
  </code></pre>
  
  <p>When I try to run <code>grails compile</code>, I don't get lucky, as it then complains it is unable to resolve the classes from the <code>com.acme</code> group. </p>
  
  <p>Interestingly the <code>activemq</code> dependencies don't seem to be a problem...</p>
  
  <p>The difference is that the acme dependencies are not in <code>mavenCentral()</code>, but only in <code>mavenRepo("D:/maven-repo")</code>. So I thought: "Maybe it is not picking it up from  the local disk then..." and changed the version to some funny (1.999-SNAPSHOT) value that doens't exist in the <code>BuildConfig.groovy</code> file. When running <code>grails compile</code> again, the command timed out, saying that version could not be found:</p>
  
  <pre><code>UNRESOLVED DEPENDENCIES
  D:/maven-repo: unable to get resource for com/acme#acme-adapter-api;1.999-SNAPSHOT
  </code></pre>
  
  <p>So obviously the local dependency gets resolved but somehow not applied in the next step, compilation...</p>