use
use copied to clipboard
Configurable directories for plugins and extensions
Is your feature request related to a problem? Please describe. USE is applied in different contexts, e.g., unit tests, integration tests. But these environments differ, but need to be aligned to some fixed assumtions by USE:
- Hardcoded path for OCL extensions (
/oclextensions
) - Hardcoded path for plugins (
lib/plugins
) This makes each switch of context for USE hard, since the environment must be aligned to these assumptions. For example, the integrationtests for the shell require to start USE without any warnings in the shell. Therefore, the moduleuse-core
must contain the empty folderlib/plugins
(see [ShellIT.java]),
Describe the solution you'd like Both hardcoded paths should be changeable at startup. Maybe using a startup argument.
Describe alternatives you've considered Using properties file, but this again requires a fixed file location.
Additional context Excerpt from ShellIT:
[...]
private List<String> runUSE(Path useFile, Path cmdFile) {
ProcessBuilder pb = new ProcessBuilder(
javaBinary.toString(),
"-Duser.country=US",
"-Duser.language=en",
"-jar",
useJar.get().toString(),
"-nogui",
"-nr",
"-t",
"-oclAnyCollectionsChecks:E",
"-extendedTypeSystemChecks:E",
/* This is currently an unstable workaround
USE determines the plugin and the extensions to OCL by fixed paths.
For now, the use-core module contains the directories including the extensions
and an empty plugins folder.
The folder is located: use/use-core/target/classes
Therefore, this is used as the USE home
*/
"-H=" + useJar.get().getParent().resolve("../../use-core/target/classes").toString(),
useFile.getFileName().toString(),
cmdFile.getFileName().toString());
[...]