事象
- YCSB をビルドしようとすると "invalid target release: 1.8" と怒られる。
$ git clone https://github.com/brianfrankcooper/YCSB.git
$ mvn clean package
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hm_app: Fatal error compiling: invalid target release: 1.8 -> [Help 1]
解決策
$ sudo yum -y install java-1.8.0-openjdk-devel
$ sudo update-alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
Enter to keep the current selection[+], or type selection number: 2
$ mvn clean package