Separating compile and link deps for java libs