public class Resources extends Object
When specifying paths to resources, one should avoid a leading / on the resource path as it
uses a ClassLoader
to load resources, which is different behavior to getClass().getResourceAsStream()
.
Constructor and Description |
---|
Resources(ClassLoader classLoader,
String pathVersionFooter,
String pathMavenProperties,
String pathUsageHeader,
String pathUsageFooter,
Optional<String> pathTasksFooter) |
Modifier and Type | Method and Description |
---|---|
String |
tasksFooter()
Footer-message used after "show tasks".
|
String |
usageFooter()
Footer-message that describes usage.
|
String |
usageHeader()
Header-message that describes usage.
|
String |
versionFooter()
Footer-message that accompanies a version message, if it exists.
|
String |
versionFromMavenProperties()
Gets the current version of the software by reading a properties-file provided by the Maven
build
|
public String usageHeader()
public String usageFooter()
public String tasksFooter()
public String versionFooter()
public String versionFromMavenProperties() throws IOException
NOTE that this pom.proper
IOException
- if the properties file cannot be read, or is missing the appropriate
version keyCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.