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
- Place
config.yml in the src/main/resources folder of the module (like loadflow or merging).
- Run the Maven command as described in the README for the module you want to test.
mvn clean package exec:exec@run
- 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.
Describe the current behavior
When running the Maven command:
the
powsybl.config.dirsproperty is ignored.The console always shows:
PlatformConfig does not recognize the
powsybl.config.dirssystem property defined in the plugin, and continues to load the default YAML from the user home directory.The plugin has the following configuration.
Describe the expected behavior
PlatformConfigshould load theconfig.ymlfrom the directory specified inpowsybl.config.dirs(src/main/resources).Describe the steps
config.ymlin thesrc/main/resourcesfolder of the module (like loadflow or merging).You should see that
PlatformConfigdoes not load theconfig.ymlfromsrc/main/resourcesand instead uses the default YAML from the user home directory.Environment
2.1.0-SNAPSHOT3.9.12Linux Ubuntu 22.04.5 LTSRelevant Log Output
loadflow
sensitivity
Extra Information
It appears that
systemPropertiesdefined in the child module are not applied when the execution is defined in the parent module.