Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

3 changed files:

Changes:

  • client/configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
    ... ... @@ -542,6 +542,8 @@ public class ClientConfig extends GeneratedClientConfig implements TripMapConfig
    542 542
         public void initConfig(String... args) throws ArgumentsParserException {
    
    543 543
             ApplicationConfig applicationConfig = get();
    
    544 544
             applicationConfig.parse(args);
    
    545
    +        applicationConfig.fixFileOptionsForWindows(options());
    
    546
    +
    
    545 547
             File userConfigFile = applicationConfig.getUserConfigFile();
    
    546 548
             if (userConfigFile.exists() && (Files.notExists(getServerDataSourceConfigurationsFile().toPath()) || Files.notExists(getRemoteDataSourceConfigurationsFile().toPath()))) {
    
    547 549
                 Properties old = new Properties();
    

  • pom.xml
    ... ... @@ -23,7 +23,7 @@
    23 23
       <parent>
    
    24 24
         <groupId>io.ultreia.maven</groupId>
    
    25 25
         <artifactId>pom</artifactId>
    
    26
    -    <version>2024.26</version>
    
    26
    +    <version>2024.28</version>
    
    27 27
       </parent>
    
    28 28
       <groupId>fr.ird.observe</groupId>
    
    29 29
       <artifactId>ird-observe</artifactId>
    

  • server/configuration/src/main/java/fr/ird/observe/server/configuration/ServerConfig.java
    ... ... @@ -162,10 +162,6 @@ public class ServerConfig extends GeneratedServerConfig implements CleanTemporar
    162 162
             log.info(String.format("Generate empty log4j configuration file to: %s", log4jConfigurationFile));
    
    163 163
         }
    
    164 164
     
    
    165
    -    public boolean isWindows() {
    
    166
    -        return get().getOsName().toLowerCase().contains("windows");
    
    167
    -    }
    
    168
    -
    
    169 165
         public void init(boolean strict) {
    
    170 166
             log.info("Starts to init ObServe server configuration...");
    
    171 167
     
    
    ... ... @@ -196,7 +192,7 @@ public class ServerConfig extends GeneratedServerConfig implements CleanTemporar
    196 192
                 if (strict && !commonSecurityConfigurationFile.exists()) {
    
    197 193
                     throw new IllegalStateException(String.format("Can not start application. Could not find security.yml file.\n\nPlease add it to one of this places:\n\t%s\n\t%s", commonSecurityConfigurationFile, securityConfigurationFile));
    
    198 194
                 }
    
    199
    -            boolean generated = ServerResources.SECURITY_CONFIGURATION.setStrict(strict).setForWindows(isWindows()).copyResource(commonSecurityConfigurationFile.toPath(), securityConfigurationFile);
    
    195
    +            boolean generated = ServerResources.SECURITY_CONFIGURATION.setStrict(strict).setForWindows(get().isWindowsOs()).copyResource(commonSecurityConfigurationFile.toPath(), securityConfigurationFile);
    
    200 196
                 if (generated) {
    
    201 197
                     log.info("Generate default security.yml");
    
    202 198
                 } else {
    
    ... ... @@ -227,6 +223,7 @@ public class ServerConfig extends GeneratedServerConfig implements CleanTemporar
    227 223
         private void parse() {
    
    228 224
             try {
    
    229 225
                 get().parse();
    
    226
    +            get().fixFileOptionsForWindows(options());
    
    230 227
             } catch (ArgumentsParserException e) {
    
    231 228
                 throw new ObserveWebApplicationConfigInitException("could not parse configuration", e);
    
    232 229
             }