title: Downloading Jetty source and Javadoc jars with maven and linking them to binary jars in Eclipse
body: <p>I am working on a web app project written in Java (1.6) using Eclipse IDE (3.6), and have decided to use Jetty (8.0.4) as the web server and servlet container.  I am using maven (2) for dependency and build management.  To get started, I decided to write a simple test application to make sure I had things working end-to-end.  This is working fine, and I am able to start up the server and create some simple servlets.  However, the source and Javadoc jars were not downloaded by maven, so when the mouse hovers over method names or classes, no documentation is found.  It just reports the following:</p>
  
  <blockquote>
  Open Declaration javax.servlet.http.HttpServletResponse
  
  Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.
  </blockquote>
  
  <p>I've searched for how to do this, and all I could find was <a href="http://wiki.eclipse.org/Jetty/Starting/Downloads#Source_Download" rel="nofollow">this page</a> on the Eclipse website describing how to configure maven to download the source modules as well.  It says that the source module jars have the same name as the binary jars, with the suffix "-sources".  I added source module dependencies to my maven config for each binary module, like so:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
      &lt;artifactId&gt;jetty-server&lt;/artifactId&gt;
      &lt;version&gt;${jettyVersion}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
      &lt;artifactId&gt;jetty-server-sources&lt;/artifactId&gt;
      &lt;version&gt;${jettyVersion}&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>However, maven failed to find the source module dependencies:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Jetty Servlet Example 0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server-sources/8.0.4.v20111024/jetty-server-sources-8.0.4.v20111024.pom
  [WARNING] The POM for org.eclipse.jetty:jetty-server-sources:jar:8.0.4.v20111024 is missing, no dependency information available
  Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet-sources/8.0.4.v20111024/jetty-servlet-sources-8.0.4.v20111024.pom
  [WARNING] The POM for org.eclipse.jetty:jetty-servlet-sources:jar:8.0.4.v20111024 is missing, no dependency information available
  Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util-sources/8.0.4.v20111024/jetty-util-sources-8.0.4.v20111024.pom
  [WARNING] The POM for org.eclipse.jetty:jetty-util-sources:jar:8.0.4.v20111024 is missing, no dependency information available
  Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server-sources/8.0.4.v20111024/jetty-server-sources-8.0.4.v20111024.jar
  Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet-sources/8.0.4.v20111024/jetty-servlet-sources-8.0.4.v20111024.jar
  Downloading: http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util-sources/8.0.4.v20111024/jetty-util-sources-8.0.4.v20111024.jar
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3.098s
  [INFO] Finished at: Sun Apr 15 15:42:59 PDT 2012
  [INFO] Final Memory: 5M/180M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal on project hello-world: Could not resolve dependencies for project org.example:hello-world:jar:0.1-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.jetty:jetty-server-sources:jar:8.0.4.v20111024, org.eclipse.jetty:jetty-servlet-sources:jar:8.0.4.v20111024, org.eclipse.jetty:jetty-util-sources:jar:8.0.4.v20111024: Could not find artifact org.eclipse.jetty:jetty-server-sources:jar:8.0.4.v20111024 in central (http://repo1.maven.org/maven2) -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
  </code></pre>
  
  <p>Any pointers on how to configure maven to download the Jetty sources and javadocs?</p>