title: Unable to compile and create .avro file from .avsc using Maven
body: <p>I'm new to Maven and have been looking at tutorials and web for documentation on how to build a .avro from a schema file .avsc. Based on the documentation that on the apache.maven.org site. I have to add the following </p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
    &lt;artifactId&gt;avro&lt;/artifactId&gt;
    &lt;version&gt;1.7.5&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;plugin&gt;
    &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
    &lt;artifactId&gt;avro-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.7.5&lt;/version&gt;
    &lt;executions&gt;
      &lt;execution&gt;
        &lt;phase&gt;generate-sources&lt;/phase&gt;
        &lt;goals&gt;
          &lt;goal&gt;schema&lt;/goal&gt;
        &lt;/goals&gt;
        &lt;configuration&gt;
          &lt;sourceDirectory&gt;${project.basedir}/src/main/avro/&lt;/sourceDirectory&gt;
          &lt;outputDirectory&gt;${project.basedir}/src/main/java/&lt;/outputDirectory&gt;
        &lt;/configuration&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  &lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
    &lt;configuration&gt;
      &lt;source&gt;1.6&lt;/source&gt;
      &lt;target&gt;1.6&lt;/target&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I've added the same into my POM.xml file. I have 2 schema files (.avsc) and following is my directory structure with contents</p>
  
  <ul>
  <li>ProjectDir
  <ul>
  <li>src
  <ul>
  <li>main
  <ul>
  <li>java</li>
  <li>avrò
  <ul>
  <li>abc.avsc</li>
  </ul></li>
  <li>resources</li>
  </ul></li>
  </ul></li>
  <li>test</li>
  </ul></li>
  <li>pom.xml</li>
  </ul>
  
  <p>My POM.xml is </p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;org.training&lt;/groupId&gt;
    &lt;artifactId&gt;TestAvro&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;TestAvro&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.basedir&gt;/Users/vsank2/TestAvro&lt;/project.basedir&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
          &lt;artifactId&gt;avro&lt;/artifactId&gt;
          &lt;version&gt;1.7.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
          &lt;artifactId&gt;avro-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.7.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
          &lt;artifactId&gt;avro-compiler&lt;/artifactId&gt;  
          &lt;version&gt;1.7.5&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;build&gt;
    &lt;pluginManagement&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
              &lt;artifactId&gt;avro-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.7.5&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;schema&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;sourceDirectory&gt;${project.basedir}/src/main/avro/&lt;/sourceDirectory&gt;
                          &lt;outputDirectory&gt;${project.basedir}/src/main/java/&lt;/outputDirectory&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugin&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
              &lt;source&gt;1.6&lt;/source&gt;
              &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/pluginManagement&gt;   
    &lt;/build&gt;
   &lt;/project&gt;
  </code></pre>
  
  <p>I executed the following</p>
  
  <p>mvn clean generate-sources and I get the following output</p>
  
  <pre><code>INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building TestAvro 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ TestAvro ---
  [INFO] Deleting /Users/vsank2/TestAvro/target
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 0.514s
  [INFO] Finished at: Mon Dec 23 16:08:51 PST 2013
  [INFO] Final Memory: 2M/81M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>Appreciate any help in this regard. thank you</p>