I do
mvn install
and I get the error:
[ERROR] Failed to fulfill the goal org.alfresco.maven.plugin: open-air-Maven-plugin: 2.1.0: set-version (default-set-version) for componentX-share component of the project: Run default-set-version of goal org.alfresco.maven.plugin: open-air-Maven-plugin: 2.1.0: set-version failed: Could not load mojo 'set-version' in the plugin 'org.alfresco.maven.plugin: alfresco-maven -plugin: 2.1.0 'due to API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org / alfresco / maven / plugin / VersionMojo: Unsupported major.minor version 52.0
But I already saw if the java versions are equal and that is correct.
Like:
javac → /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/javac
java → /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java
javac → -version javac 1.7.0_79
java → -version java version "1.7.0_79" OpenJDK (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1) 64- OpenJDK ( 24.79-b02, )
mvn -v → Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T12: 57: 37 + 01: 00) Maven :/home/patricia/Transferências/apache-maven-3.3.3 Java: 1.7.0_79, : Oracle Corporation Java home:/usr/lib/jvm/java-7-openjdk-amd64/jre : pt_PT, : UTF-8 : "linux", : "3.19.0-25-generic", arch: "amd64", family: "unix"
, . pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>componentX-share</artifactId>
<version>1.0-SNAPSHOT</version>
<name>componentX-share AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the componentX-share AMP (Alfresco Module Package)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>2.1.0</version>
</parent>
<properties>
<app.amp.client.war.artifactId>${alfresco.share.artifactId}</app.amp.client.war.artifactId>
<maven.tomcat.port>8081</maven.tomcat.port>
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-platform-distribution</artifactId>
<version>${alfresco.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>enterprise</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-enterprise</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
pom.xml, :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
"stackoverflow", . Java ( ), Java 7. ?
Java 8, .
.