title: How to download source code from Maven Central for a project
body: <p>I want to download the source code for the project XBee-api v9.3 from Maven Central so that I can modify the code for my application. I am using Netbeans and I have managed to produce a POM that validates and compiles successfully.
  I have then run the command </p>
  
  <pre><code>mvn dependency:resources
  </code></pre>
  
  <p>from the same directory as the POM to force download of the source code.</p>
  
  <p>I have a few problems:
  When I look inside the project with Netbeans, I see the class files (which I think may actually be jars).  When I open up any class, I only get the method headers, but not the source code.</p>
  
  <p>When I open a class file, there is the option in the top right of the window to "Attach Sources...".   When I select "Download", I get a message in the lower left of the window saying "Downloading source jar from known Maven Repositories for local repository file" but nothing seems to be happening.</p>
  
  <p>When I open up the folder either with explorer or Netbeans files view, the folder is empty except for the POM.  If I use Projects view in Netbeans, I can see a project structure and what appears to be the generated source files, but no source code.</p>
  
  <p>I can't find answers on Google.  </p>
  
  <p>My questions are:
  What am I doing wrong?
  How do I download the source code?</p>
  
  <p>Any help would be much appreciated.</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;com.rapplogic&lt;/groupId&gt;
          &lt;artifactId&gt;xbee-api&lt;/artifactId&gt;
          &lt;packaging&gt;jar&lt;/packaging&gt;
          &lt;version&gt;0.9.3&lt;/version&gt;
          &lt;name&gt;${project.groupId}:${project.artifactId}&lt;/name&gt;
          &lt;description&gt;A java library for communicating with XBee radios&lt;/description&gt;
          &lt;url&gt;https://github.com/andrewrapp/xbee-api/&lt;/url&gt;
  
          &lt;licenses&gt;
              &lt;license&gt;
                  &lt;name&gt;GPL license, Version 3.0&lt;/name&gt;
                  &lt;url&gt;https://www.gnu.org/licenses/gpl-3.0.html&lt;/url&gt;
              &lt;/license&gt;
          &lt;/licenses&gt;
  
          &lt;developers&gt;
              &lt;developer&gt;
                  &lt;name&gt;Andrew Rapp&lt;/name&gt;
                  &lt;email&gt;andrew.rapp+github.com@gmail.com&lt;/email&gt;
              &lt;/developer&gt;
          &lt;/developers&gt;
  
          &lt;properties&gt;
              &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
              &lt;maven.compiler.source&gt;1.6&lt;/maven.compiler.source&gt;
              &lt;maven.compiler.target&gt;1.6&lt;/maven.compiler.target&gt;
          &lt;/properties&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.rapplogic/xbee-api --&gt;
  
          &lt;dependencies&gt;
              &lt;dependency&gt;
              &lt;groupId&gt;com.rapplogic&lt;/groupId&gt;
              &lt;artifactId&gt;xbee-api&lt;/artifactId&gt;
              &lt;version&gt;0.9.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;/dependencies&gt; 
      &lt;/project&gt;
  </code></pre>