java-pkg current has dojar for installing JARs. This is sufficient for most situations, but there are times when it would be nice to have a newjar function, which would take a given JAR, and install it into /usr/share/${PN}-${SLOT}/lib with a specified destination filename. This function would be particularly useful for combatting versioned JARs, but would be useful whenever it is necessary to rename an installed JAR (without having to patch the build.xml).
Created attachment 59177 [details, diff] proprosed patch for newjar The function was mostly copied from java-pkg_dojar. It takes two arugments. The first is a path to a JAR file, and the second is the name that the JAR should be installed as.
Created attachment 59178 [details] sample ebuild using java-pkg_newjar: dev-java/velocity This is the ebuild I submitted for #92884, modified to use java-pkg_newjar.
commited a java-pkg_newjar slighty smaller and similar to the new* function (ie, rename to ${T} and call java-pkg_dojar) Thanks!