title: Maven cannot find opencsv csv parser
body: <p>I've come across one problem with maven and opencsv</p>
  
  <p>I am trying to use the csvparser as followed:</p>
  
  <pre><code>import java.io.IOException;
  import au.com.bytecode.opencsv.CSVParser;
  import org.apache.hadoop.io.*;
  import org.apache.hadoop.mapreduce.Mapper;
  
  public class FlightsByCarrierMapper extends
                  Mapper&lt;LongWritable, Text, Text, IntWritable&gt; {
      @Override
      protected void map(LongWritable key, Text value, Context context)
              throws IOException, InterruptedException {
  
          if (key.get() &gt; 0) {
              String[] lines = new
          CSVParser().parseLine(value.toString());
              context.write(new Text(lines[8]), new IntWritable(1));
          }
      }
  }
  </code></pre>
  
  <p>I've added the opencsv dependency and can use the csvreader without problem. The csvparser though cannot be resolved and throws and error whenever I try to compile the code.</p>
  
  <p>Maven then throws the following error.</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project FlightsByCarrier: Compilation failure: Compilation failure:
  [ERROR] /root/workspace/FlightsByCarrier/src/main/java/com/root/hadoop/FlightsByCarrier/FlightsByCarrierMapper.java:[6,30] error: cannot find symbol
  [ERROR] package au.com.bytecode.opencsv
  [ERROR] /root/workspace/FlightsByCarrier/src/main/java/com/root/hadoop/FlightsByCarrier/FlightsByCarrierMapper.java:[18,2] error: cannot find symbol
  </code></pre>
  
  <p>The dependency looks like this right now:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;dependency&gt;
      &lt;groupId&gt;net.sf.opencsv&lt;/groupId&gt;
      &lt;artifactId&gt;opencsv&lt;/artifactId&gt;
      &lt;version&gt;1.8&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>