Improve resource management to support resources in JAR
Currently, all resources need to be outside of the deployed JAR. This means that the release folder gets cluttered with files that a user doesn't need to see. These include images, constraints and libraries for JOGL.
The resource management should be improved such that both the IDE and JAR are supported. I.e., the JAR should contain these resources.
This is critical, because as of right now, the latest release v4.0.0b1 does not contain the constraints.
Comments (4)
-
reporter -
reporter - changed status to resolved
Resolved issue
#176: Improved resource management. Added support to locate resources either within the file system (IDE) or a JAR (deployed).The resources need to be located in a source folder. Then, a package can be created for different kinds of resources. This allows to use the class loader to find those resources, even when running it from a JAR.
To achieve that, a new ResourceUtil class in commons is used.
Checkstyle is disabled for resources.
Unfortunately, it is currently not possible to load native libraries from within a JAR. This needs a separate class loader or the appropriate libraries need to be extracted to the file system (JOGL 2 supports that, see issue
#14).→ <<cset d9619b4ea7d8>>
-
References issue
#176: Fixed resource paths for constraints and icons (using / no matter which OS it is, instead of File.separator), because of problems with the path on Windows (\ is encoded).→ <<cset fecae1656c66>>
-
reporter References issue
#176: Made getResourceListing more fail-safe in case the path could not be found.→ <<cset 966ad3948789>>
- Log in to comment
References issue
#176: Added source folder for resources with packages for each kind of resource. A resource folder is necessary, because it makes it a lot easier to find resources and their paths and load them. If they are not, then it is more difficult to find them using regular Java means (e.g., calling getResource on the class or class loader).→ <<cset 5f2e3b30f548>>