Closed oren closed 9 years ago
investigating...
Confirmed the issue Downloading: https://repo1.maven.org/maven2/com/sun/jersey/jersey-project/1.9/jersey-project-1.9.pom 17K downloaded (jersey-project-1.9.pom) Downloading: http://download.java.net/maven/2/net/java/jvnet-parent/1/jvnet-parent-1.pom [INFO] Unable to find resource 'net.java:jvnet-parent:pom:1' in repository m2.java.net (http://download.java.net/maven/2) Downloading: http://repository.jboss.org/nexus/content/groups/public//net/java/jvnet-parent/1/jvnet-parent-1.pom [INFO] Unable to find resource 'net.java:jvnet-parent:pom:1' in repository repository.jboss.org (http://repository.jboss.org/nexus/content/groups/public/) Downloading: http://maven.glassfish.org/content/groups/glassfish/net/java/jvnet-parent/1/jvnet-parent-1.pom 178b downloaded (jvnet-parent-1.pom) [WARNING] *\ CHECKSUM FAILED - Checksum failed on download: local = '81ffbd1712afe8cdf138b570c0fc9934742c33c1'; remote = '
Seems like the version of maven you installed is not following HTTP 301 redirect. Install a later version of Maven. Because you need a JDK and not just JRE so install the JDK:
sudo apt-get remove maven2
sudo apt-get install maven
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
Then it seems that mvn install
works.
I enforced maven version 3.0 or greater in the POM. Closing.
(I am not familiar with the Java echo-system so I apologize if the issues I have are trivial)
java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
nvm install
Downloading: https://repo.maven.apache.org/maven2/com/google/collections/google-collections/1.0/google-collections-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.5/plexus-compiler-javac-2.5.jar (19 KB at 95.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar (131 KB at 425.7 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/log4j/log4j/1.2.12/log4j-1.2.12.jar (350 KB at 1131.7 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar (44 KB at 213.5 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar (118 KB at 462.0 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/com/google/collections/google-collections/1.0/google-collections-1.0.jar (625 KB at 1435.9 KB/sec)
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 58 source files to /home/oren/projects/dynamodb-titan-storage-backend/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:10.835s
[INFO] Finished at: Sun Aug 23 11:27:55 PDT 2015
[INFO] Final Memory: 20M/151M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project dynamodb-titan054-storage-backend: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
You need to install a JDK - Maven wants to compile the source code and it cannot due to lack of a compiler. As far as I know, the last four commands in the snippet install the JDK. Can you run them and comment that your issue is resolved?
I followed your instructions. I see oracle-java8-installer and oracle-java8-set-default.
aptitude search oracle
p cl-sql-oracle - CLSQL database backend, Oracle
p libdatetime-format-oracle-perl - module for parsing and formatting Oracle dates and timestamps
p libmono-oracle2.0-cil - Mono Oracle library (for CLI 2.0)
p libmono-oracle4.0-cil - Mono Oracle library (for CLI 4.0)
p oracle-java6-installer - Oracle Java(TM) Development Kit (JDK) 6
p oracle-java6-set-default - Set Oracle JDK 6 as default Java
v oracle-java7-bin -
v oracle-java7-fonts -
p oracle-java7-installer - Oracle Java(TM) Development Kit (JDK) 7
v oracle-java7-jdk -
v oracle-java7-jre -
v oracle-java7-plugin -
p oracle-java7-set-default - Set Oracle JDK 7 as default Java
p oracle-java7-unlimited-jce-policy - Unlimited JCE Policy for Oracle Java 7
v oracle-java8-bin -
v oracle-java8-fonts -
i oracle-java8-installer - Oracle Java(TM) Development Kit (JDK) 8
v oracle-java8-jdk -
v oracle-java8-jre -
v oracle-java8-plugin -
i oracle-java8-set-default - Set Oracle JDK 8 as default Java
p oracle-java8-unlimited-jce-policy - Unlimited JCE Policy for Oracle Java 8
v oracle-java9-bin -
v oracle-java9-fonts -
p oracle-java9-installer - Oracle Java(TM) Development Kit (JDK) 9
v oracle-java9-jdk -
v oracle-java9-jre -
v oracle-java9-plugin -
p oracle-java9-set-default - Set Oracle JDK 9 as default Java
p oracle-java9-unlimited-jce-policy - Unlimited JCE Policy for Oracle Java 9
p oracle-jdk7-installer - Oracle JDK7 Installer meta package
p spamoracle - A statistical analysis spam filter based on Bayes' formula
p spamoracle:i386 - A statistical analysis spam filter based on Bayes' formula
v spamoracle-byte -
v spamoracle-byte:i386 -
btw i also noticed i have the following:
i A openjdk-7-jre
i A openjdk-7-jre-headless
I am not sure if it's relevant, but just wanted to make sure.
Thanks again for your help.
Those are JRE packages, not the Java Development Kit that provides javac.
echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk-amd64
I have an export line in my .bashrc. after changing it to: export JAVA_HOME=/usr/lib/jvm/java-8-oracle
the install was successful. thanks!
(ubuntu 15.04) sudo apt-get install maven2 mvn install