src/java/fr/jayasoft/ivy/Ivy.java
/**
     * Call this method to ask ivy to configure some variables using either a remote or a local properties file
     */
Call this method to ask ivy to configure some variables using either a remote or a local properties file
Call this method to ask ivy to configure some variables using either a remote or a local properties file
public void configureRepositories(boolean remote) {
        IvyContext.getContext().setIvy(this);
        if (!_repositoriesConfigured) {
            Properties props = new Properties();
            boolean configured = false;
            if (_useRemoteConfig && remote) {
                try {
                    URL url = new URL("http://www.jayasoft.org/ivy/repository.properties");
                    Message.verbose("configuring repositories with "+url);
                    props.load(URLHandlerRegistry.getDefault().openStream(url));
                    configured = true;
                } catch (Exception ex) {
                    Message.verbose("unable to use remote repository configuration: "+ex.getMessage());
                    props = new Properties();
                }
            }
            if (!configured) {
                try {
                    props.load(Ivy.class.getResourceAsStream("repository.properties"));
                } catch (IOException e) {
                    Message.error("unable to use internal repository configuration: "+e.getMessage());
                }
            }
            addAllVariables(props, false);
            _repositoriesConfigured = true;
        }
    }
public void configureRepositories ( boolean remote ) { IvyContext . getContext ( ) . setIvy ( this ) ; if ( ! _repositoriesConfigured ) { Properties props = new Properties ( ) ; boolean configured = false ; if ( _useRemoteConfig && remote ) { try { URL url = new URL ( "http://www.jayasoft.org/ivy/repository.properties" ) ; Message . verbose ( "configuring repositories with " + url ) ; props . load ( URLHandlerRegistry . getDefault ( ) . openStream ( url ) ) ; configured = true ; } catch ( Exception ex ) { Message . verbose ( "unable to use remote repository configuration: " + ex . getMessage ( ) ) ; props = new Properties ( ) ; } } if ( ! configured ) { try { props . load ( Ivy . class . getResourceAsStream ( "repository.properties" ) ) ; } catch ( IOException e ) { Message . error ( "unable to use internal repository configuration: " + e . getMessage ( ) ) ; } } addAllVariables ( props , false ) ; _repositoriesConfigured = true ; } }
Call this method to ask ivy to configure some variables using either a remote or a local properties file
Call this method to ask ivy to configure some variables using either a remote or a local properties file