// Path: srcdeps-maven-base/src/main/java/org/srcdeps/mvn/config/ConfigurationProducer.java
// @Named
// public class ConfigurationProducer {
// 
//     private final Configuration configuration;
//     private final Path multimoduleProjectRootDirectory;
// 
//     public ConfigurationProducer() throws ConfigurationException {
//         super();
// 
//         String basePathString = System.getProperty(Constants.MAVEN_MULTI_MODULE_PROJECT_DIRECTORY_PROPERTY);
//         if (basePathString == null || basePathString.isEmpty()) {
//             throw new RuntimeException(String.format("The system property %s must not be null or empty",
//                     Constants.MAVEN_MULTI_MODULE_PROJECT_DIRECTORY_PROPERTY));
//         }
//         multimoduleProjectRootDirectory = Paths.get(basePathString).toAbsolutePath();
// 
//         this.configuration = new ConfigurationLocator(System.getProperties(), true) //
//                 .locate(multimoduleProjectRootDirectory, new YamlConfigurationReader()) //
//                 .accept(new OverrideVisitor(System.getProperties())) //
//                 .accept(new DefaultsAndInheritanceVisitor()) //
//                 .forwardPropertyValue(Maven.getSrcdepsMavenVersionProperty(), Constants.SRCDEPS_MAVEN_VERSION)
//                 .build();
// 
//     }
// 
//     public Configuration getConfiguration() {
//         return configuration;
//     }
// 
//     /**
//      * @return the root directory of the Maven multimodule project.
//      */
//     public Path getMultimoduleProjectRootDirectory() {
//         return multimoduleProjectRootDirectory;
//     }
// 
// }


import org.srcdeps.core.BuildService;
import org.srcdeps.core.ScmService;
import org.srcdeps.core.SrcVersion;
import org.srcdeps.core.fs.PathLocker;
import org.srcdeps.mvn.config.ConfigurationProducer;
import io.takari.aether.localrepo.TakariLocalRepositoryManagerFactory;
import java.util.Map;
import java.util.Map.Entry;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.repository.LocalRepository;
import org.eclipse.aether.repository.LocalRepositoryManager;
import org.eclipse.aether.repository.NoLocalRepositoryManagerException;
import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * Copyright 2015-2018 Maven Source Dependencies
 * Plugin contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.srcdeps.mvn.localrepo;





/**
 * A {@link LocalRepositoryManagerFactory} that produces {@link SrcdepsLocalRepositoryManager}. This is done through
 * looking up the {@link LocalRepositoryManagerFactory} implementations visible from the present Guice module, choosing
 * the one specified in the {@code "srcdeps.repomanager.delegate.factory"} system property. If the
 * {@code "srcdeps.repomanager.delegate.factory"} system property was not set, the
 * {@value #DEFAULT_SRCDEPS_REPOMANAGER_DELAGATE_FACTORY} is used. The selected {@link LocalRepositoryManagerFactory}
 * implementation is then used as a delegate.
 *
 * @author <a href="https://github.com/ppalaga">Peter Palaga</a>
 */
@Named("srcdeps")
public class SrcdepsRepositoryManagerFactory implements LocalRepositoryManagerFactory {
    public static final String DEFAULT_SRCDEPS_REPOMANAGER_DELAGATE_FACTORY = TakariLocalRepositoryManagerFactory.class
            .getName();
    public static final float DEFAULT_SRCDEPS_REPOMANAGER_PRIORITY = 30;
    private static final Logger log = LoggerFactory.getLogger(SrcdepsRepositoryManagerFactory.class);
    public static final String SRCDEPS_REPOMANAGER_DELAGATE_FACTORY = "srcdeps.repomanager.delegate.factory";
    public static final String SRCDEPS_REPOMANAGER_PRIORITY = "srcdeps.repomanager.priority";

    /** Passed to {@link SrcdepsLocalRepositoryManager} */
    @Inject
    private BuildService buildService;
    @Inject
// Path: srcdeps-maven-base/src/main/java/org/srcdeps/mvn/config/ConfigurationProducer.java
// @Named
// public class ConfigurationProducer {
// 
//     private final Configuration configuration;
//     private final Path multimoduleProjectRootDirectory;
// 
//     public ConfigurationProducer() throws ConfigurationException {
//         super();
// 
//         String basePathString = System.getProperty(Constants.MAVEN_MULTI_MODULE_PROJECT_DIRECTORY_PROPERTY);
//         if (basePathString == null || basePathString.isEmpty()) {
//             throw new RuntimeException(String.format("The system property %s must not be null or empty",
//                     Constants.MAVEN_MULTI_MODULE_PROJECT_DIRECTORY_PROPERTY));
//         }
//         multimoduleProjectRootDirectory = Paths.get(basePathString).toAbsolutePath();
// 
//         this.configuration = new ConfigurationLocator(System.getProperties(), true) //
//                 .locate(multimoduleProjectRootDirectory, new YamlConfigurationReader()) //
//                 .accept(new OverrideVisitor(System.getProperties())) //
//                 .accept(new DefaultsAndInheritanceVisitor()) //
//                 .forwardPropertyValue(Maven.getSrcdepsMavenVersionProperty(), Constants.SRCDEPS_MAVEN_VERSION)
//                 .build();
// 
//     }
// 
//     public Configuration getConfiguration() {
//         return configuration;
//     }
// 
//     /**
//      * @return the root directory of the Maven multimodule project.
//      */
//     public Path getMultimoduleProjectRootDirectory() {
//         return multimoduleProjectRootDirectory;
//     }
// 
// }


// Path: srcdeps-maven-local-repository/src/main/java/org/srcdeps/mvn/localrepo/SrcdepsRepositoryManagerFactory.java
import org.srcdeps.core.BuildService;
import org.srcdeps.core.ScmService;
import org.srcdeps.core.SrcVersion;
import org.srcdeps.core.fs.PathLocker;
import org.srcdeps.mvn.config.ConfigurationProducer;
import io.takari.aether.localrepo.TakariLocalRepositoryManagerFactory;
import java.util.Map;
import java.util.Map.Entry;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.repository.LocalRepository;
import org.eclipse.aether.repository.LocalRepositoryManager;
import org.eclipse.aether.repository.NoLocalRepositoryManagerException;
import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Copyright 2015-2018 Maven Source Dependencies
 * Plugin contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.srcdeps.mvn.localrepo;





/**
 * A {@link LocalRepositoryManagerFactory} that produces {@link SrcdepsLocalRepositoryManager}. This is done through
 * looking up the {@link LocalRepositoryManagerFactory} implementations visible from the present Guice module, choosing
 * the one specified in the {@code "srcdeps.repomanager.delegate.factory"} system property. If the
 * {@code "srcdeps.repomanager.delegate.factory"} system property was not set, the
 * {@value #DEFAULT_SRCDEPS_REPOMANAGER_DELAGATE_FACTORY} is used. The selected {@link LocalRepositoryManagerFactory}
 * implementation is then used as a delegate.
 *
 * @author <a href="https://github.com/ppalaga">Peter Palaga</a>
 */
@Named("srcdeps")
public class SrcdepsRepositoryManagerFactory implements LocalRepositoryManagerFactory {
    public static final String DEFAULT_SRCDEPS_REPOMANAGER_DELAGATE_FACTORY = TakariLocalRepositoryManagerFactory.class
            .getName();
    public static final float DEFAULT_SRCDEPS_REPOMANAGER_PRIORITY = 30;
    private static final Logger log = LoggerFactory.getLogger(SrcdepsRepositoryManagerFactory.class);
    public static final String SRCDEPS_REPOMANAGER_DELAGATE_FACTORY = "srcdeps.repomanager.delegate.factory";
    public static final String SRCDEPS_REPOMANAGER_PRIORITY = "srcdeps.repomanager.priority";

    /** Passed to {@link SrcdepsLocalRepositoryManager} */
    @Inject
    private BuildService buildService;
    @Inject
    private ConfigurationProducer configurationProducer;