title: Create a single jar that will contain compiled classes and javadoc with Maven
body: <p>I'm trying to generate a jar file that will contain an API SDK for our product, so our customers can create plugins and compile it against our API. All classes/interfaces that we provide as part of our API SDK jar are also included into our main product, so API developers won't need to include our API SDK jar into their plugin jar. Hence, I'm not worried about the size of our API SDK jar. However, I would like to make plugin developers' life easier and just provide one jar file that will contain both the compiled classes and the javadoc (so developers can see inline comments as part of the auto-complete feature as they develop).</p>
  
  <p>We use Maven to compile and I added the following configuration to the API SDK pom.xml:</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.7&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;attach-javadoc&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;jar&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>This works, however this generates two jar files - one with compiled classes and one with javadoc. Instead I would like to generate just one jar file with everything.</p>
  
  <p>We currently use Maven to compile this project, however we are free to use other build tools.</p>