ninja-core/src/main/java/ninja/utils/NinjaModeHelper.java
public static NinjaMode determineModeFromSystemPropertiesOrProdIfNotSet() {
        
        Optional<NinjaMode> ninjaModeOptional = determineModeFromSystemProperties();
        NinjaMode ninjaMode;
        
        if (!ninjaModeOptional.isPresent()) {
            ninjaMode = NinjaMode.prod;
        } else {
            ninjaMode = ninjaModeOptional.get();
        }
        
        logger.info("Ninja is running in mode {}", ninjaMode.toString());
        
        return ninjaMode;
        
    }
public static NinjaMode determineModeFromSystemPropertiesOrProdIfNotSet() {
        
        Optional<NinjaMode> ninjaModeOptional = determineModeFromSystemProperties();
        NinjaMode ninjaMode;
        
        if (!ninjaModeOptional.isPresent()) {
            ninjaMode = NinjaMode.prod;
        } else {
            ninjaMode = ninjaModeOptional.get();
        }
        
        logger.info("Ninja is running in mode {}", ninjaMode.toString());
        
        return ninjaMode;
        
    }
public static NinjaMode determineModeFromSystemPropertiesOrProdIfNotSet ( ) { Optional < NinjaMode > ninjaModeOptional = determineModeFromSystemProperties ( ) ; NinjaMode ninjaMode ; if ( ! ninjaModeOptional . isPresent ( ) ) { ninjaMode = NinjaMode . prod ; } else { ninjaMode = ninjaModeOptional . get ( ) ; } logger . info ( "Ninja is running in mode {}" , ninjaMode . toString ( ) ) ; return ninjaMode ; }
returns NinjaMode.dev if no mode is set. Or the valid mode
set via a System Property called "ninja.mode".

E.g. under mvn you can use mvn ... -Dninja.mode=prod or so. Valid values
for ninja.mode are "prod", "dev", "test".

@return The valid mode set via a System Property called "ninja.mode"
or NinjaMode.dev if it is not set.
returns NinjaMode . dev if no mode is set . Or the valid mode set via a System Property called ninja . mode .