Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable directories for plugins and extensions #20

Open
h-man2 opened this issue Oct 1, 2021 · 0 comments
Open

Configurable directories for plugins and extensions #20

h-man2 opened this issue Oct 1, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@h-man2
Copy link
Contributor

h-man2 commented Oct 1, 2021

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:

  1. Hardcoded path for OCL extensions (/oclextensions)
  2. 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 module use-core must contain the empty folder lib/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());
[...]
@h-man2 h-man2 added the enhancement New feature or request label Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant