Skip to content

System property powsybl.config.dirs ignored in child module execution #85

@samirromdhani

Description

@samirromdhani

Describe the current behavior

When running the Maven command:

mvn clean package exec:exec@run

the powsybl.config.dirs property is ignored.

The console always shows:

INFO com.powsybl.commons.config.PlatformConfig - Platform configuration defined by YAML file /home/user/.itools/config.yml

PlatformConfig does not recognize the powsybl.config.dirs system property defined in the plugin, and continues to load the default YAML from the user home directory.

The plugin has the following configuration.

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <configuration>
        <systemProperties>
            <systemProperty>
                <key>powsybl.config.dirs</key>
                <value>${project.basedir}/src/main/resources</value>
            </systemProperty>
        </systemProperties>
    </configuration>
</plugin>

Describe the expected behavior

PlatformConfig should load the config.yml from the directory specified in powsybl.config.dirs (src/main/resources).

Describe the steps

  1. Place config.yml in the src/main/resources folder of the module (like loadflow or merging).
  2. Run the Maven command as described in the README for the module you want to test.
mvn clean package exec:exec@run
  1. Observe the console output.
    You should see that PlatformConfig does not load the config.yml from src/main/resources and instead uses the default YAML from the user home directory.

Environment

  • Powsybl tutorials Version: 2.1.0-SNAPSHOT
  • Maven version: 3.9.12
  • OS: Linux Ubuntu 22.04.5 LTS

Relevant Log Output

loadflow

[INFO] --- exec:3.6.2:exec (run) @ loadflow ---
[main] INFO com.powsybl.tutorials.loadflow.LoadflowTutorial - Starting the load flow tutorial execution
[main] INFO com.powsybl.commons.config.PlatformConfig - Using platform configuration provider classic
[main] INFO com.powsybl.commons.config.PlatformConfig - Platform configuration defined by YAML file /home/user/.itools/config.yml

sensitivity

[INFO] --- exec:3.6.2:exec (run) @ sensitivity ---
[main] INFO com.powsybl.commons.config.PlatformConfig - Using platform configuration provider classic
[main] INFO com.powsybl.commons.config.PlatformConfig - Platform configuration defined by YAML file /home/user/.itools/config.yml

Extra Information

It appears that systemProperties defined in the child module are not applied when the execution is defined in the parent module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions