GiraffaFS / giraffa

Giraffa FileSystem (Slack: giraffa-fs.slack.com)
https://giraffa.ci.cloudbees.com
Apache License 2.0
17 stars 6 forks source link

Make tool.jar available as dependency on different platforms. #114

Closed octo47 closed 9 years ago

octo47 commented 9 years ago

While working on HBase1.0 stumbled on a problem with antrun plugin. It does incorrect java_home resolving, so it can substitute correct jdk home with jre home. Similar problem discussed here: http://stackoverflow.com/questions/2022622/java-home-gets-mangled-by-maven

shvachko commented 9 years ago

Is it HBase1.0 specific? Why other Mac users don't see it? I am on Linux, so cannot see it.

octo47 commented 9 years ago

That depend on what version of Java they use and did or not they created some symlinks in java installation. That generally commonly used hack for maven. Similar thing can be found in hadoop-common-project/hadoop-annotations/pom.xml or hbase-annotations/pom.xml.

shvachko commented 9 years ago

I don't see "apple-jdk" anywhere. @c0s could you look at it please.

ghost commented 9 years ago

Yeah, I think it's ok - after all when dealing with crap like Apple you have to be prepared for some nuts dances.

octo47 commented 9 years ago

@shvachko, I didn't copy&paste from hadoop/hbase, that is just more correct way to handle discrepancy in java distributions

ghost commented 9 years ago

+1

milandesai commented 9 years ago

This doesn’t resolve the error for me, though it does for Plamen and Konstantin. I am still getting the same error where the JAVA_HOME is going to the jre and there’s no tools.jar as a result.

On May 13, 2015, at 1:39 PM, Cos notifications@github.com wrote:

+1

— Reply to this email directly or view it on GitHub https://github.com/GiraffaFS/giraffa/issues/114#issuecomment-101807818.

octo47 commented 9 years ago

interesting, what command ls $(/usr/libexec/java_home)/lib shows? and /usr/libexec/java_home too

milandesai commented 9 years ago

It shows a bunch of files, including tools.jar, but no classes.jar. Is it supposed to showing classes.jar?

octo47 commented 9 years ago

No, it is ok. It should pick up tools.jar. Hard to say what is broken, I'd try to set java_home using tool which report correct path to java. May be that can help.

export JAVA_VERSION=1.7
export JAVA_HOME=$(/usr/libexec/java_home)
milandesai commented 9 years ago

Yeah that's exactly what I do right now. No worries - looking into the issue.

shvachko commented 9 years ago

Going to commit it now.

shvachko commented 9 years ago

Committed. Thank you Andrey.