title: Maven: JAR will be empty - no content was marked for inclusion
body: <p>I have a minor problem with maven. When I run the command mvn package I get the following warning:</p>
  
  <p><strong>[WARNING] JAR will be empty - no content was marked for inclusion!</strong></p>
  
  <p>The build is successful but the produced jar-file is empty as the warning says.</p>
  
  <p>Why is this and what am I doing wrong?</p>
  
  <p>Here is my pom.xml</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;framework&lt;/groupId&gt;
  &lt;artifactId&gt;framework&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;framework&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      My dependencies
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;directory&gt;target&lt;/directory&gt;
      &lt;outputDirectory&gt;target/classes&lt;/outputDirectory&gt;
      &lt;finalName&gt;${project.artifactId}-${project.version}&lt;/finalName&gt;
      &lt;testOutputDirectory&gt;target/test-classes&lt;/testOutputDirectory&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
      &lt;scriptSourceDirectory&gt;src&lt;/scriptSourceDirectory&gt;
      &lt;testSourceDirectory&gt;src&lt;/testSourceDirectory&gt;
      &lt;testResources&gt;
          &lt;testResource&gt;
              &lt;directory&gt;test&lt;/directory&gt;
          &lt;/testResource&gt;
      &lt;/testResources&gt;
  
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;includes&gt;
                      &lt;include&gt;src&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;outputDirectory&gt;lib&lt;/outputDirectory&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>