![JAR search and dependency download from the Maven repository](/logo.png)
com.carrotgarden.maven.scalor.util.JarRes.scala Maven / Gradle / Ivy
package com.carrotgarden.maven.scalor.util
import java.net.URL
import java.util.Properties
/**
* Resolve resource only from current jar file.
*/
trait JarRes {
/**
* Discover class location URL as string.
*/
def location = getClass.getProtectionDomain.getCodeSource.getLocation.toExternalForm
/**
* Discover resource location URL only from current jar file.
*/
def resourceURL( resource : String ) = new URL( s"jar:${location}!/${resource}" )
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy