private void failIfParametersAreNotInTheirValidValueRanges()

in src/main/java/org/apache/maven/plugins/jmod/JModCreateMojo.java [361:393]


    private void failIfParametersAreNotInTheirValidValueRanges()
        throws MojoFailureException
    {
        if ( warnIfResolved != null )
        {
            String x = warnIfResolved.toLowerCase().trim();
            if ( !"deprecated".equals( x ) && "deprecated-for-removal".equals( x ) && "incubating".equals( x ) )
            {
                String message = "The parameter warnIfResolved does not contain a valid value. "
                    + "Valid values are 'deprecated', 'deprecated-for-removal' or 'incubating'.";
                getLog().error( message );
                throw new MojoFailureException( message );

            }
        }

        throwExceptionIfNotExistOrNotADirectory( handleConfigurationListWithDefault( cmds, DEFAULT_CMD_DIRECTORY ),
                                                 "cmd" );
        throwExceptionIfNotExistOrNotADirectory( handleConfigurationListWithDefault( configs,
                                                                                     DEFAULT_CONFIG_DIRECTORY ),
                                                 "config" );
        throwExceptionIfNotExistOrNotADirectory( handleConfigurationListWithDefault( libs, DEFAULT_LIB_DIRECTORY ),
                                                 "lib" );
        throwExceptionIfNotExistOrNotADirectory( handleConfigurationListWithDefault( headerFiles,
                                                                                     DEFAULT_HEADER_FILES_DIRECTORY ),
                                                 "headerFile" );
        throwExceptionIfNotExistOrNotADirectory( handleConfigurationListWithDefault( legalNotices,
                                                                                     DEFAULT_LEGAL_NOTICES_DIRECTORY ),
                                                 "legalNotice" );
        throwExceptionIfNotExistOrNotADirectory( handleConfigurationListWithDefault( manPages,
                                                                                     DEFAULT_MAN_PAGES_DIRECTORY ),
                                                 "manPage" );
    }