/** * @see ConnectionFactory#createConection(BundleContext, URL, Object) */ public URLConnection createConection( final BundleContext bundleContext, final URL url, final MavenConfiguration config ) throws MalformedURLException { URLConnection con = new Connection( url, config ); return con; }
@Override public URLConnection openConnection(URL url) throws IOException { MavenResolver resolver = MavenResolvers.createMavenResolver(null, ServiceConstants.PID); Connection conn = new Connection(url, resolver); conn.setUseCaches(false);// to avoid concurent thread to have an IllegalStateException. return conn; }
/** * {@inheritDoc} */ @Override protected URLConnection openConnection( final URL url ) throws IOException { final MavenConfigurationImpl config = new MavenConfigurationImpl( new PropertiesPropertyResolver( System.getProperties() ), ServiceConstants.PID ); config.setSettings( new MavenSettingsImpl( config.getSettingsFileUrl(), config.useFallbackRepositories() ) ); return new Connection( url, config ); }