org.ops4j.pax.url.mvn.MavenResolvers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pax-url-aether Show documentation
Show all versions of pax-url-aether Show documentation
OPS4J Pax Url - aether: protocol handler.
Detailed information to be found at http://wiki.ops4j.org/confluence/x/CoA6.
The newest version!
/**
* Copyright 2014, Guillaume Nodet.
*
* Red Hat licenses this file to you 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.ops4j.pax.url.mvn;
import java.util.Dictionary;
import org.ops4j.pax.url.mvn.internal.AetherBasedResolver;
import org.ops4j.pax.url.mvn.internal.config.MavenConfigurationImpl;
import org.ops4j.util.property.DictionaryPropertyResolver;
import org.ops4j.util.property.PropertiesPropertyResolver;
public final class MavenResolvers {
public static MavenResolver createMavenResolver(Dictionary properties, String pid) {
return createMavenResolver(null, properties, pid);
}
public static MavenResolver createMavenResolver(MirrorInfo mirror, Dictionary properties, String pid) {
PropertiesPropertyResolver syspropsResolver = new PropertiesPropertyResolver(System.getProperties());
DictionaryPropertyResolver propertyResolver = new DictionaryPropertyResolver(properties, syspropsResolver);
MavenConfigurationImpl config = new MavenConfigurationImpl(propertyResolver, pid);
return new AetherBasedResolver(config, mirror);
}
private MavenResolvers() { }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy