title: Unsupported major.minor version 52.0 - Maven Error JAVA
body: <p>I'm making</p>
  <blockquote>
  <p>mvn install</p>
  </blockquote>
  <p>and i get the error:</p>
  <blockquote>
  <p>[ERROR] Failed to execute goal
  org.alfresco.maven.plugin:alfresco-maven-plugin:2.1.0:set-version
  (default-set-version) on project componentX-share: Execution
  default-set-version of goal
  org.alfresco.maven.plugin:alfresco-maven-plugin:2.1.0:set-version
  failed: Unable to load the mojo 'set-version' in the plugin
  'org.alfresco.maven.plugin:alfresco-maven-plugin:2.1.0' due to an API
  incompatibility:
  org.codehaus.plexus.component.repository.exception.ComponentLookupException:
  org/alfresco/maven/plugin/VersionMojo : Unsupported major.minor
  version 52.0</p>
  </blockquote>
  <p>But I already saw if the versions of java are equal, and it's correct.</p>
  <p>Like:</p>
  <blockquote>
  <p>which javac -&gt; /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/javac</p>
  <p>which java -&gt; /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java</p>
  <p>javac -&gt; -version javac 1.7.0_79</p>
  <p>java  -&gt; -version java version &quot;1.7.0_79&quot; OpenJDK Runtime Environment
  (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1) OpenJDK 64-Bit Server VM
  (build 24.79-b02, mixed mode)</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>mvn -v -&gt;
  Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T12:57:37+01:00)
  Maven home: /home/patricia/Transferências/apache-maven-3.3.3
  Java version: 1.7.0_79, vendor: Oracle Corporation
  Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
  Default locale: pt_PT, platform encoding: UTF-8
  OS name: &quot;linux&quot;, version: &quot;3.19.0-25-generic&quot;, arch: &quot;amd64&quot;, family: &quot;unix&quot;</p>
  </blockquote>
  <p>I think all it's correct. And my pom.xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.acme&lt;/groupId&gt;
      &lt;artifactId&gt;componentX-share&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;componentX-share AMP project&lt;/name&gt;
      &lt;packaging&gt;amp&lt;/packaging&gt;
      &lt;description&gt;Manages the lifecycle of the componentX-share AMP (Alfresco Module Package)&lt;/description&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.alfresco.maven&lt;/groupId&gt;
          &lt;artifactId&gt;alfresco-sdk-parent&lt;/artifactId&gt;
          &lt;version&gt;2.1.0&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;!-- 
          SDK properties have sensible defaults in the SDK parent,
          but you can override the properties below to use another version.
          For more available properties see the alfresco-sdk-parent POM.
         --&gt;
      &lt;properties&gt;
          &lt;!-- The following are default values for data location and Alfresco version.
               Uncomment if you need to change
          &lt;alfresco.version&gt;${alfresco.community.default.version}&lt;/alfresco.version&gt; --&gt;
  
          &lt;!-- This control the root logging level for all apps uncomment and change, defaults to WARN
              &lt;app.log.root.level&gt;WARN&lt;/app.log.root.level&gt;
          --&gt;
  
          &lt;!-- Set the enviroment to use, this controls which properties will be picked in src/test/properties
               for embedded run, defaults to the 'local' environment. See SDK Parent POM for more info.
          &lt;env&gt;other environment name&lt;/env&gt;
          --&gt;
  
          &lt;!-- The Maven artifact ID to use when loading the Share.WAR that the AMP should be applied to,
                      defaults to the alfresco.war artifact ID, so we need to override here. --&gt;
          &lt;app.amp.client.war.artifactId&gt;${alfresco.share.artifactId}&lt;/app.amp.client.war.artifactId&gt;
  
          &lt;!-- Since Alfresco.WAR (i.e. the Repository) is already running on port 8080, we run Share.WAR on port 8081 --&gt;
          &lt;maven.tomcat.port&gt;8081&lt;/maven.tomcat.port&gt;
  
          &lt;!-- Used in share-config-custom.xml. By default points to local installation of Alfresco Repo --&gt;
          &lt;alfresco.repo.url&gt;http://localhost:8080/alfresco&lt;/alfresco.repo.url&gt;
          &lt;maven.compiler.target&gt;1.7&lt;/maven.compiler.target&gt;
          &lt;maven.compiler.source&gt;1.7&lt;/maven.compiler.source&gt;
      &lt;/properties&gt;
  
      &lt;!-- Here we realize the connection with the Alfresco selected platform 
          (e.g.version and edition) --&gt;
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;!-- This will import the dependencyManagement for all artifacts in the selected Alfresco version/edition
                  (see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies) 
                  NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement. NOTE: It defaults 
                  to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;${alfresco.groupId}&lt;/groupId&gt;
                  &lt;artifactId&gt;alfresco-platform-distribution&lt;/artifactId&gt;
                  &lt;version&gt;${alfresco.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;!-- Following dependencies are needed for compiling Java code in src/main/java;  --&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;${alfresco.groupId}&lt;/groupId&gt;
              &lt;artifactId&gt;share&lt;/artifactId&gt;
              &lt;version&gt;${alfresco.version}&lt;/version&gt;
              &lt;classifier&gt;classes&lt;/classifier&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.extensions.surf&lt;/groupId&gt;
              &lt;artifactId&gt;spring-surf-api&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;!-- Compress JavaScript files and store as *-min.js --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;net.alchim31.maven&lt;/groupId&gt;
                  &lt;artifactId&gt;yuicompressor-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;profiles&gt;
          &lt;!--
              Brings in the extra Enterprise specific share classes,
              if the 'enterprise' profile has been activated, needs to be activated manually. --&gt;
          &lt;profile&gt;
              &lt;id&gt;enterprise&lt;/id&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;${alfresco.groupId}&lt;/groupId&gt;
                      &lt;artifactId&gt;share-enterprise&lt;/artifactId&gt;
                      &lt;version&gt;${alfresco.version}&lt;/version&gt;
                      &lt;classifier&gt;classes&lt;/classifier&gt;
                      &lt;scope&gt;provided&lt;/scope&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  <p>I already try to add lines to pom.xml like:</p>
  <pre><code> &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  </code></pre>
  <p>that I saw in other solutions in &quot;stackoverflow&quot; but I can't solve the problem. I don't want to upgrade the version of Java (if it is the solution) I wanted to run in Java 7. Any idea?</p>
  <p>If the solution is only upgrade for Java 8, say me too.</p>
  <p>Thanks.</p>