title: How can I force maven to package my project against 1.5?
body: <p>I am trying to compile a maven project, the source code uses Generics and other featuers of Java 1.5, thus causing my build to fail</p>
  
  <p>In my <code>POM.xml</code> I have configured the build configuration against 1.5 for the source and target properties, but this doesn't solve my issue</p>
  
  <p>Is my <code>POM.xml</code> correct, or am I missing something?</p>
  
  <p>Thanks</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;name&gt;MyClass&lt;/name&gt;
      &lt;groupId&gt;uk.co.mydomain&lt;/groupId&gt;
      &lt;artifactId&gt;MyClass&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
  
      &lt;build&gt;
        &lt;finalName&gt;MyClass&lt;/finalName&gt;
        &lt;plugins&gt;
          &lt;plugin&gt;
            &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
            &lt;configuration&gt;
              &lt;source&gt;1.5&lt;/source&gt;
              &lt;target&gt;1.5&lt;/target&gt;
              &lt;descriptors&gt;
                &lt;descriptor&gt;src/main/resources/dist.xml&lt;/descriptor&gt;
              &lt;/descriptors&gt;
              &lt;archive&gt;
                &lt;manifestFile&gt;src/main/resources/META-INF/MANIFEST.MF&lt;/manifestFile&gt;
              &lt;/archive&gt;
            &lt;/configuration&gt;
          &lt;/plugin&gt;
        &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;sun-repo-2&lt;/id&gt;
              &lt;url&gt;http://download.java.net/maven/2/&lt;/url&gt;
              &lt;releases&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/releases&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Output when attemtping to build</p>
  
  <pre><code>generics are not supported in -1.3 (use -source 5 or higher to enable generics)
  </code></pre>