Create a new default repository configuration.
@return the newly-created default repository configuration
512890
public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
		MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
		List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<>();
		repositoryConfiguration.add(MAVEN_CENTRAL);
		if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
			repositoryConfiguration.add(SPRING_MILESTONE);
			repositoryConfiguration.add(SPRING_SNAPSHOT);
		}
		addDefaultCacheAsRepository(mavenSettings.getLocalRepository(),
				repositoryConfiguration);
		addActiveProfileRepositories(mavenSettings.getActiveProfiles(),
				repositoryConfiguration);
		return repositoryConfiguration;
	}
1030347
@PostConstruct
    public void buildRepository() {
        try {
            LOGGER.info("Using repo config (classpath): {}", repositoryConfiguration.getURL());
            getPropertiesLoader().loadSystemProperties();

            final RepositoryConfiguration config =
                    RepositoryConfiguration.read(repositoryConfiguration.getURL());
            repository = modeShapeEngine.deploy(config);

            // next line ensures that repository starts before the factory is used.
            final org.modeshape.common.collection.Problems problems =
                    repository.getStartupProblems();
            for (final org.modeshape.common.collection.Problem p : problems) {
                LOGGER.error("ModeShape Start Problem: {}", p.getMessageString());
                // TODO determine problems that should be runtime errors
            }
        } catch (final Exception e) {
            throw new RepositoryRuntimeException(e);
        }
    }
185118
@SuppressWarnings("static-method")
	protected OutputConfiguration createStandardOutputConfiguration() {
		final OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
		defaultOutput.setDescription(Messages.SarlOutputConfigurationProvider_0);
		defaultOutput.setOutputDirectory(SARLConfig.FOLDER_SOURCE_GENERATED);
		defaultOutput.setOverrideExistingResources(true);
		defaultOutput.setCreateOutputDirectory(true);
		defaultOutput.setCanClearOutputDirectory(false);
		defaultOutput.setCleanUpDerivedResources(true);
		defaultOutput.setSetDerivedProperty(true);
		defaultOutput.setKeepLocalHistory(false);
		return defaultOutput;
	}
398172
@Nonnull
    public static GitHubPluginConfig configuration() {
        return defaultIfNull(
                GitHubPluginConfig.all().get(GitHubPluginConfig.class),
                GitHubPluginConfig.EMPTY_CONFIG
        );
    }
1003028
protected function configureRepositories()
    {
        $repositoryManager = new RepositoryManager();
        $this['repository-manager'] = $repositoryManager;

        $path = sprintf('%s/src/Repository', $this->getRootPath());

        $ns = (new \ReflectionObject($this))->getNamespaceName() . '\\Repository';
        $repositoryManager->autoloadPdoRepositories($path, $ns, $this->pdo);

        foreach ($repositoryManager->getRepositories() as $repository) {
            if (is_a($repository, 'Radvance\\Repository\\PermissionRepositoryInterface')) {
                $this->configurePermissionRepository($repository);
            }

            if (is_a($repository, 'Radvance\\Repository\\SpaceRepositoryInterface')) {
                $this->configureSpaceRepository($repository);
            }

            // Register the class for autowiring
            $this[get_class($repository)] = $repository;
        }
    }
619590
private static Configuration getDefault(){
        Configuration config = new Configuration();
        config.addHandler(new ConsoleAuditHandler());
        config.setMetaData(new DummyMetaData());
        config.setLayout(new SimpleLayout());
        config.addProperty("log.file.location", "user.dir");
        return config;
    }
724394
private static File generateDefaultConfigFile() {
		final File jaasConfFile;
		try {
			Path jaasConfPath = Files.createTempFile("jaas-", ".conf");
			try (InputStream resourceStream = JaasModule.class.getClassLoader().getResourceAsStream(JAAS_CONF_RESOURCE_NAME)) {
				Files.copy(resourceStream, jaasConfPath, StandardCopyOption.REPLACE_EXISTING);
			}
			jaasConfFile = jaasConfPath.toFile();
			jaasConfFile.deleteOnExit();
		} catch (IOException e) {
			throw new RuntimeException("unable to generate a JAAS configuration file", e);
		}
		return jaasConfFile;
	}
475199
@Override
    protected RepositoryImpl createRepository() throws IOException {

        try {
            final RepositoryConfig config = createRepositoryConfiguration();
            return RepositoryImpl.create(config);
        } catch (final ConfigurationException e) {
            LOG.error("Configuration invalid", e);
            throw new AssertionError(e.getMessage(), e);
        } catch (RepositoryException e) {
            LOG.error("Could not create repository", e);
            throw new AssertionError(e.getMessage(), e);
        }
    }
842103
private String createConfiguration() {

        CmsResourceManager resManager = OpenCms.getResourceManager();
        if (resManager == null) {
            // can happen during the OpenCms startup
            return "";
        }
        List<I_CmsResourceType> resTypes = resManager.getResourceTypes();
        List<String> options = new ArrayList<String>();
        for (I_CmsResourceType resType : resTypes) {
            if (resType.isDirectEditable()) {
                options.add(resType.getTypeName());
            }
        }
        Collections.sort(options);
        return Joiner.on("|").join(options);
    }
152035
@Override
	public void init() {
		RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension();
		RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension);

		registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser);
	}
1292444
public function createDefaultFolders()
    {
        foreach ($this->config()->default_folders as $class) {
            
            if (!self::find($class)) {
                
                $folder = Injector::inst()->create($class);
                
                $folder->Sort = 0;
                
                $folder->write();
                $folder->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
                $folder->flushCache();
                
                DB::alteration_message(sprintf('Creating %s.%s', $class, $folder->Title), 'created');
                
            }
            
        }
    }
1343418
def create_default_config(self):
        
        # make config directory with the minimal possible permission
        self._config_file.parent.mkdir(mode=0o700, exist_ok=True)
        self["network.kovan"]   = {"default_eth_rpc_endpoint": "https://kovan.infura.io",   "default_gas_price" : "medium"}
        self["network.mainnet"] = {"default_eth_rpc_endpoint": "https://mainnet.infura.io", "default_gas_price" : "medium"}
        self["network.ropsten"] = {"default_eth_rpc_endpoint": "https://ropsten.infura.io", "default_gas_price" : "medium"}
        self["network.rinkeby"] = {"default_eth_rpc_endpoint": "https://rinkeby.infura.io", "default_gas_price" : "medium"}
        self["ipfs"] = {"default_ipfs_endpoint": "http://ipfs.singularitynet.io:80"}
        self["session"] = {
        "network": "kovan" }
        self._persist()
        print("We've created configuration file with default values in: %s\n"%str(self._config_file))
177877
public static Configuration createBasicConfiguration()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createBasicConfiguration()");

        Configuration config = new Configuration();

        try
        {
            config.loadFromPropertyFile();
        }
        catch (IOException ioe)
        {
            //No FFDC Code Needed.
            config.datasourceClassname = "org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource";
            config.datasourceProperties.setProperty("databaseName",System.getProperty("js.test.dbname","msdb"));
            config.datasourceProperties.setProperty("createDatabase","create");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createBasicConfiguration()", config);

        return(config);
    }
1080027
public String getRepository() {
        if (!allowReleases && !allowSnapshots) {
            throw new IllegalStateException(
                "Does not make sense to disallow both releases and snapshots.");
        }
        // start with a plus to append default repositories from settings.xml and Maven Cental
        // to the list of repositories defined by options
        final StringBuilder url = new StringBuilder("+");
        url.append(this.repositoryUrl);
        if (allowSnapshots) {
            url.append("@snapshots");
        }
        if (!allowReleases) {
            url.append("@noreleases");
        }
        if (id != null) {
            url.append("@id=");
            url.append(id);
        }
        return url.toString();
    }
635341
public void createRepository(RepositoryEntry rEntry) throws RepositoryConfigurationException, RepositoryException
   {
      // Need privileges to manage repository.
      SecurityManager security = System.getSecurityManager();
      if (security != null)
      {
         security.checkPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
      }

      if (repositoryContainers.containsKey(rEntry.getName()))
      {
         throw new RepositoryConfigurationException("Repository container " + rEntry.getName() + " already started");
      }

      final RepositoryContainer repositoryContainer =
         new RepositoryContainer(parentContainer, rEntry, addNamespacesPlugins);

      // Storing and starting the repository container under
      // key=repository_name
      try
      {
         if (repositoryContainers.putIfAbsent(rEntry.getName(), repositoryContainer) == null)
         {
            SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
            {
               public Void run()
               {
                  repositoryContainer.start();
                  return null;
               }
            });
         }
         else
         {
            throw new RepositoryConfigurationException("Repository container " + rEntry.getName() + " already started");
         }
      }
      catch (Throwable t) //NOSONAR
      {
         repositoryContainers.remove(rEntry.getName());

         throw new RepositoryConfigurationException("Repository container " + rEntry.getName() + " was not started.", t);
      }

      if (!config.getRepositoryConfigurations().contains(rEntry))
      {
         config.getRepositoryConfigurations().add(rEntry);
      }

      registerNodeTypes(rEntry.getName());

      // turn on Repository ONLINE
      ManageableRepository mr =
         (ManageableRepository)repositoryContainer.getComponentInstanceOfType(ManageableRepository.class);
      mr.setState(ManageableRepository.ONLINE);
   }
1038438
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public JenkinsConfiguration newConfiguration(@RequestBody JenkinsConfiguration configuration) {
        return jenkinsService.newConfiguration(configuration);
    }
293172
private Properties loadConfig() throws IOException {
		String configUrl = String.format("%s/%s/%s", defaultRepositoryUrl, DIST_DIR, RESOLVE_CONFIG_FILE);
		log.info("Looking for repository-config at {}", configUrl);

		CloseableHttpClient client = HttpClients.createDefault();

		HttpGet httpget = new HttpGet(configUrl);
		CloseableHttpResponse contentResponse;
		try {
			contentResponse = client.execute(httpget);
		} catch (ConnectTimeoutException e) {
			throw new ConnectException(e.getMessage());
		}

		int statusCode = contentResponse.getStatusLine().getStatusCode();
		log.debug("HttpGet at {}, Status is {}", configUrl, statusCode);
		if (statusCode == HttpStatus.SC_NOT_FOUND) {
			log.info("No repository-config found at {}", configUrl);

			return null;
		} else if (statusCode != HttpStatus.SC_OK) {
			String msg = "Error loading " + configUrl + ":\n";
			msg += contentResponse.getStatusLine().toString();

			throw new RuntimeException(msg);
		}

		HttpEntity entity = contentResponse.getEntity();
		BufferedInputStream inputStream = new BufferedInputStream(entity.getContent());

		Properties properties = new Properties();
		properties.load(inputStream);

		contentResponse.close();
		client.close();

		return properties;
	}