title: Generate Javadoc for OSGi bundle
body: <p>I'm newbie in OSGi world but I was able to do some Camel and OSGi bundles to do some tasks in a middleware. Everything I made since was a proof of concept, but now I want to refactor some part of my code and I start writing a OSGi bundle who will contain common functionalities shared among other OSGi bundles.</p>
  
  <p>To make it clean, I decide to write comments and use javadoc to get sleek documentation, but I'm stuck with this error:</p>
  
  <pre><code>Error resolving version for plugin 
  'org.apache.maven.plugins:maven-javadoc-plugin' from the repositories
  </code></pre>
  
  <p>I was able to run javadoc for another Camel component;</p>
  
  <p>We have a local repository with the dependency maven-javadoc-plugin in;</p>
  
  <p>I add the dependency maven-javadoc-plugin to my project;</p>
  
  <p>I'm running out of ideas why it doesn't work.</p>
  
  <p>Maybe I'm wrong and I using OSGi bundle in a wrong way...</p>
  
  <p><strong>UPDATE</strong></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&lt;/groupId&gt;
  &lt;artifactId&gt;test&lt;/artifactId&gt;
  &lt;version&gt;0.0.1&lt;/version&gt;
  &lt;packaging&gt;bundle&lt;/packaging&gt;
  
  &lt;name&gt;uces OSGi Bundle&lt;/name&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.osgi&lt;/groupId&gt;
          &lt;artifactId&gt;org.osgi.core&lt;/artifactId&gt;
          &lt;version&gt;4.3.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.thoughtworks.xstream&lt;/groupId&gt;
          &lt;artifactId&gt;xstream&lt;/artifactId&gt;
          &lt;version&gt;1.4.8&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.10.3&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
              &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.7&lt;/version&gt;
              &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;configuration&gt;
                  &lt;instructions&gt;
                      &lt;Bundle-Activator&gt;org.test.Activator&lt;/Bundle-Activator&gt;
                      &lt;Export-Package&gt;org.test&lt;/Export-Package&gt;
                  &lt;/instructions&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;build-for-felix&lt;/id&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.apache.felix.main&lt;/artifactId&gt;
                  &lt;version&gt;4.0.3&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;!-- To include a shell:
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.apache.felix.gogo.shell&lt;/artifactId&gt;
                  &lt;version&gt;0.10.0&lt;/version&gt;
              &lt;/dependency&gt;
              --&gt;
          &lt;/dependencies&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                      &lt;version&gt;1.7&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;compile&lt;/id&gt;
                              &lt;phase&gt;package&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;run&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;configuration&gt;
                                  &lt;target&gt;
                                      &lt;pathconvert property="plugins.jars" pathsep="${path.separator}"&gt;
                                          &lt;path refid="maven.runtime.classpath"/&gt;
                                          &lt;map from="${project.build.directory}${file.separator}classes" to=""/&gt;
                                      &lt;/pathconvert&gt;
                                      &lt;pathconvert pathsep=" " property="bundles"&gt;
                                          &lt;path path="${plugins.jars}"/&gt;
                                          &lt;mapper&gt;
                                              &lt;chainedmapper&gt;
                                                  &lt;flattenmapper/&gt;
                                                  &lt;globmapper from="*" to="file:modules/*" casesensitive="no"/&gt;
                                              &lt;/chainedmapper&gt;
                                          &lt;/mapper&gt;
                                      &lt;/pathconvert&gt;
                                      &lt;propertyfile file="${project.build.directory}/config.properties"&gt;
                                          &lt;entry key="felix.auto.start" value="${bundles} file:modules/${project.build.finalName}.jar"/&gt;
                                          &lt;entry key="org.osgi.framework.bootdelegation" value="*"/&gt;
                                      &lt;/propertyfile&gt;
                                      &lt;copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar"/&gt;
                                  &lt;/target&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-assembly-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.3&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;create-executable-jar&lt;/id&gt;
                              &lt;phase&gt;package&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;single&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;configuration&gt;
                                  &lt;descriptors&gt;
                                      &lt;descriptor&gt;${basedir}/src/main/assembly/felix.xml&lt;/descriptor&gt;
                                  &lt;/descriptors&gt;
                                  &lt;finalName&gt;${project.build.finalName}&lt;/finalName&gt;
                              &lt;/configuration&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
          &lt;id&gt;run-on-felix&lt;/id&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.apache.felix.main&lt;/artifactId&gt;
                  &lt;version&gt;4.0.3&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless from Maven since stdin is swallowed --&gt;
          &lt;/dependencies&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                      &lt;version&gt;1.7&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;target&gt;
                              &lt;property name="vm.args" value=""/&gt;
                              &lt;pathconvert property="plugins.jars" pathsep="${path.separator}"&gt;
                                  &lt;path refid="maven.runtime.classpath"/&gt;
                                  &lt;map from="${project.build.directory}${file.separator}classes" to=""/&gt;
                              &lt;/pathconvert&gt;
                              &lt;makeurl property="urls" separator=" "&gt;
                                  &lt;path path="${plugins.jars}"/&gt;
                                  &lt;path location="${project.build.directory}/${project.build.finalName}.jar"/&gt;
                              &lt;/makeurl&gt;
                              &lt;propertyfile file="${project.build.directory}/run.properties"&gt;
                                  &lt;entry key="felix.auto.start" value="${urls}"/&gt;
                                  &lt;entry key="felix.auto.deploy.action" value="uninstall,install,update,start"/&gt;
                                  &lt;entry key="org.osgi.framework.storage" value="${project.build.directory}${file.separator}felix-cache"/&gt;
                                  &lt;entry key="org.osgi.framework.bootdelegation" value="*"/&gt;
                              &lt;/propertyfile&gt;
                              &lt;makeurl property="run.properties.url" file="${project.build.directory}/run.properties"/&gt;
                              &lt;java fork="true" jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}"&gt;
                                  &lt;sysproperty key="felix.config.properties" value="${run.properties.url}"/&gt;
                                  &lt;jvmarg line="${vm.args}"/&gt;
                              &lt;/java&gt;
                          &lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p></p>