diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java
index 5bef561..84f02cd 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ObrCommandImpl.java
@@ -38,6 +38,7 @@
     private static final String DEPLOY_CMD = "deploy";
     private static final String START_CMD = "start";
     private static final String SOURCE_CMD = "source";
+    private static final String JAVADOC_CMD = "javadoc";
 
     private static final String EXTRACT_SWITCH = "-x";
 
@@ -113,6 +114,10 @@
                 {
                     source(commandLine, command, out, err);
                 }
+                else if (command.equals(JAVADOC_CMD))
+                {
+                    javadoc(commandLine, command, out, err);
+                }
                 else
                 {
                     err.println("Unknown command: " + command);
@@ -419,6 +424,37 @@
         }
     }
 
+    private void javadoc(
+        String commandLine, String command, PrintStream out, PrintStream err)
+        throws IOException, InvalidSyntaxException
+    {
+        // Parse the command line to get all local targets to update.
+        ParsedCommand pc = parseSource(commandLine);
+        for (int i = 0; i < pc.getTargetCount(); i++)
+        {
+            Resource resource = selectNewestVersion(
+                searchRepository(pc.getTargetId(i), pc.getTargetVersion(i)));
+            if (resource == null)
+            {
+                err.println("Unknown bundle and/or version: "
+                    + pc.getTargetId(i));
+            }
+            else
+            {
+                URL docURL = (URL) resource.getProperties().get("javadoc");
+                if (docURL != null)
+                {
+                    FileUtil.downloadSource(
+                        out, err, docURL, pc.getDirectory(), pc.isExtract());
+                }
+                else
+                {
+                    err.println("Missing javadoc URL: " + pc.getTargetId(i));
+                }
+            }
+        }
+    }
+
     private Resource[] searchRepository(String targetId, String targetVersion)
     {
         // Try to see if the targetId is a bundle ID.
@@ -978,6 +1014,27 @@
                 "specified local directory.");
             out.println("");
         }
+        else if (command.equals(JAVADOC_CMD))
+        {
+            out.println("");
+            out.println("obr " + JAVADOC_CMD
+                + " [" + EXTRACT_SWITCH
+                + "] <local-dir> <bundle-name>[;<version>] ...");
+            out.println("");
+            out.println(
+                "This command retrieves the javadoc archives of the specified\n" +
+                "bundles and saves them to the specified local directory; use\n" +
+                "the \"" + EXTRACT_SWITCH + "\" switch to automatically extract the javadoc archives.\n" +
+                "If a bundle name contains spaces, then it must be surrounded\n" +
+                "by quotes. It is also possible to specify a precise version if\n" +                "more than one version exists, such as:\n" +
+                "\n" +
+                "    obr javadoc /home/rickhall/tmp \"Bundle Repository\";1.0.0\n" +
+                "\n" +
+                "The above example retrieves the javadoc archive of version \"1.0.0\"\n" +
+                "of the bundle named \"Bundle Repository\" and saves it to the\n" +
+                "specified local directory.");
+            out.println("");
+        }
         else
         {
             out.println("obr " + HELP_CMD
@@ -987,7 +1044,7 @@
                 + " | " + LIST_CMD
                 + " | " + INFO_CMD
                 + " | " + DEPLOY_CMD + " | " + START_CMD
-                + " | " + SOURCE_CMD + "]");
+                + " | " + SOURCE_CMD + " | " + JAVADOC_CMD + "]");
             out.println("obr " + ADDURL_CMD + " [<repository-file-url> ...]");
             out.println("obr " + REMOVEURL_CMD + " [<repository-file-url> ...]");
             out.println("obr " + LISTURL_CMD);
@@ -1001,6 +1058,9 @@
             out.println("obr " + SOURCE_CMD
                 + " [" + EXTRACT_SWITCH
                 + "] <local-dir> <bundle-name>[;<version>] ...");
+            out.println("obr " + JAVADOC_CMD
+                + " [" + EXTRACT_SWITCH
+                + "] <local-dir> <bundle-name>[;<version>] ...");
         }
     }
 
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java
index fb57b28..70040c2 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResourceImpl.java
@@ -39,6 +39,7 @@
     private String m_docURI = null;
     private String m_licenseURI = null;
     private String m_sourceURI = null;
+    private String m_javadocURI = null;
     private boolean m_converted = false;
 
     public ResourceImpl()
@@ -178,6 +179,10 @@
         {
             m_sourceURI = (String) value;
         }
+        else if (key.equals("javadoc"))
+        {
+            m_javadocURI = (String) value;
+        }
         else if (key.equals(URI))
         {
             m_resourceURI = (String) value;
@@ -222,6 +227,10 @@
                 {
                     m_map.put(SOURCE_URL, new URL(base, m_sourceURI));
                 }
+                if (m_javadocURI != null)
+                {
+                    m_map.put("javadoc", new URL(base, m_javadocURI));
+                }
                 m_converted = true;
             }
             catch (MalformedURLException ex)
