Optimize java_lib build

No point in recursive dependency enumeration for java libraries
that include all dependencies.