http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/ChecksumValidatorTest.java ---------------------------------------------------------------------- diff --git a/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/ChecksumValidatorTest.java b/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/ChecksumValidatorTest.java deleted file mode 100644 index 6d67768..0000000 --- a/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/ChecksumValidatorTest.java +++ /dev/null @@ -1,465 +0,0 @@ -package org.eclipse.aether.connector.basic; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import static org.junit.Assert.*; - -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.aether.internal.test.util.TestFileProcessor; -import org.eclipse.aether.internal.test.util.TestFileUtils; -import org.eclipse.aether.internal.test.util.TestLoggerFactory; -import org.eclipse.aether.spi.connector.checksum.ChecksumPolicy; -import org.eclipse.aether.spi.connector.layout.RepositoryLayout; -import org.eclipse.aether.transfer.ChecksumFailureException; -import org.junit.Before; -import org.junit.Test; - -public class ChecksumValidatorTest -{ - - private static class StubChecksumPolicy - implements ChecksumPolicy - { - - boolean inspectAll; - - boolean tolerateFailure; - - private List<String> callbacks = new ArrayList<String>(); - - private Object conclusion; - - public boolean onChecksumMatch( String algorithm, int kind ) - { - callbacks.add( String.format( "match(%s, %04x)", algorithm, kind ) ); - if ( inspectAll ) - { - if ( conclusion == null ) - { - conclusion = true; - } - return false; - } - return true; - } - - public void onChecksumMismatch( String algorithm, int kind, ChecksumFailureException exception ) - throws ChecksumFailureException - { - callbacks.add( String.format( "mismatch(%s, %04x)", algorithm, kind ) ); - if ( inspectAll ) - { - conclusion = exception; - return; - } - throw exception; - } - - public void onChecksumError( String algorithm, int kind, ChecksumFailureException exception ) - throws ChecksumFailureException - { - callbacks.add( String.format( "error(%s, %04x, %s)", algorithm, kind, exception.getCause().getMessage() ) ); - } - - public void onNoMoreChecksums() - throws ChecksumFailureException - { - callbacks.add( String.format( "noMore()" ) ); - if ( conclusion instanceof ChecksumFailureException ) - { - throw (ChecksumFailureException) conclusion; - } - else if ( !Boolean.TRUE.equals( conclusion ) ) - { - throw new ChecksumFailureException( "no checksums" ); - } - } - - public void onTransferRetry() - { - callbacks.add( String.format( "retry()" ) ); - } - - public boolean onTransferChecksumFailure( ChecksumFailureException exception ) - { - callbacks.add( String.format( "fail(%s)", exception.getMessage() ) ); - return tolerateFailure; - } - - void assertCallbacks( String... callbacks ) - { - assertEquals( Arrays.asList( callbacks ), this.callbacks ); - } - - } - - private static class StubChecksumFetcher - implements ChecksumValidator.ChecksumFetcher - { - - Map<URI, Object> checksums = new HashMap<URI, Object>(); - - List<File> checksumFiles = new ArrayList<File>(); - - private List<URI> fetchedFiles = new ArrayList<URI>(); - - public boolean fetchChecksum( URI remote, File local ) - throws Exception - { - fetchedFiles.add( remote ); - Object checksum = checksums.get( remote ); - if ( checksum == null ) - { - return false; - } - if ( checksum instanceof Exception ) - { - throw (Exception) checksum; - } - TestFileUtils.writeString( local, checksum.toString() ); - checksumFiles.add( local ); - return true; - } - - void mock( String algo, Object value ) - { - checksums.put( toUri( algo ), value ); - } - - void assertFetchedFiles( String... algos ) - { - List<URI> expected = new ArrayList<URI>(); - for ( String algo : algos ) - { - expected.add( toUri( algo ) ); - } - assertEquals( expected, fetchedFiles ); - } - - private static URI toUri( String algo ) - { - return newChecksum( algo ).getLocation(); - } - - } - - private static final String SHA1 = "SHA-1"; - - private static final String MD5 = "MD5"; - - private StubChecksumPolicy policy; - - private StubChecksumFetcher fetcher; - - private File dataFile; - - private static RepositoryLayout.Checksum newChecksum( String algo ) - { - return RepositoryLayout.Checksum.forLocation( URI.create( "file" ), algo ); - } - - private List<RepositoryLayout.Checksum> newChecksums( String... algos ) - { - List<RepositoryLayout.Checksum> checksums = new ArrayList<RepositoryLayout.Checksum>(); - for ( String algo : algos ) - { - checksums.add( newChecksum( algo ) ); - } - return checksums; - } - - private ChecksumValidator newValidator( String... algos ) - { - return new ChecksumValidator( new TestLoggerFactory().getLogger( "" ), dataFile, new TestFileProcessor(), - fetcher, policy, newChecksums( algos ) ); - } - - private Map<String, ?> checksums( String... algoDigestPairs ) - { - Map<String, Object> checksums = new LinkedHashMap<String, Object>(); - for ( int i = 0; i < algoDigestPairs.length; i += 2 ) - { - String algo = algoDigestPairs[i]; - String digest = algoDigestPairs[i + 1]; - if ( digest == null ) - { - checksums.put( algo, new IOException( "error" ) ); - } - else - { - checksums.put( algo, digest ); - } - } - return checksums; - } - - @Before - public void init() - throws Exception - { - dataFile = TestFileUtils.createTempFile( "" ); - dataFile.delete(); - policy = new StubChecksumPolicy(); - fetcher = new StubChecksumFetcher(); - } - - @Test - public void testValidate_NullPolicy() - throws Exception - { - policy = null; - ChecksumValidator validator = newValidator( SHA1 ); - validator.validate( checksums( SHA1, "ignored" ), null ); - fetcher.assertFetchedFiles(); - } - - @Test - public void testValidate_AcceptOnFirstMatch() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1 ); - fetcher.mock( SHA1, "foo" ); - validator.validate( checksums( SHA1, "foo" ), null ); - fetcher.assertFetchedFiles( SHA1 ); - policy.assertCallbacks( "match(SHA-1, 0000)" ); - } - - @Test - public void testValidate_FailOnFirstMismatch() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1 ); - fetcher.mock( SHA1, "foo" ); - try - { - validator.validate( checksums( SHA1, "not-foo" ), null ); - fail( "expected exception" ); - } - catch ( ChecksumFailureException e ) - { - assertEquals( "foo", e.getExpected() ); - assertEquals( "not-foo", e.getActual() ); - assertTrue( e.isRetryWorthy() ); - } - fetcher.assertFetchedFiles( SHA1 ); - policy.assertCallbacks( "mismatch(SHA-1, 0000)" ); - } - - @Test - public void testValidate_AcceptOnEnd() - throws Exception - { - policy.inspectAll = true; - ChecksumValidator validator = newValidator( SHA1, MD5 ); - fetcher.mock( SHA1, "foo" ); - fetcher.mock( MD5, "bar" ); - validator.validate( checksums( SHA1, "foo", MD5, "bar" ), null ); - fetcher.assertFetchedFiles( SHA1, MD5 ); - policy.assertCallbacks( "match(SHA-1, 0000)", "match(MD5, 0000)", "noMore()" ); - } - - @Test - public void testValidate_FailOnEnd() - throws Exception - { - policy.inspectAll = true; - ChecksumValidator validator = newValidator( SHA1, MD5 ); - fetcher.mock( SHA1, "foo" ); - fetcher.mock( MD5, "bar" ); - try - { - validator.validate( checksums( SHA1, "not-foo", MD5, "bar" ), null ); - fail( "expected exception" ); - } - catch ( ChecksumFailureException e ) - { - assertEquals( "foo", e.getExpected() ); - assertEquals( "not-foo", e.getActual() ); - assertTrue( e.isRetryWorthy() ); - } - fetcher.assertFetchedFiles( SHA1, MD5 ); - policy.assertCallbacks( "mismatch(SHA-1, 0000)", "match(MD5, 0000)", "noMore()" ); - } - - @Test - public void testValidate_InlinedBeforeExternal() - throws Exception - { - policy.inspectAll = true; - ChecksumValidator validator = newValidator( SHA1, MD5 ); - fetcher.mock( SHA1, "foo" ); - fetcher.mock( MD5, "bar" ); - validator.validate( checksums( SHA1, "foo", MD5, "bar" ), checksums( SHA1, "foo", MD5, "bar" ) ); - fetcher.assertFetchedFiles( SHA1, MD5 ); - policy.assertCallbacks( "match(SHA-1, 0001)", "match(MD5, 0001)", "match(SHA-1, 0000)", "match(MD5, 0000)", - "noMore()" ); - } - - @Test - public void testValidate_CaseInsensitive() - throws Exception - { - policy.inspectAll = true; - ChecksumValidator validator = newValidator( SHA1 ); - fetcher.mock( SHA1, "FOO" ); - validator.validate( checksums( SHA1, "foo" ), checksums( SHA1, "foo" ) ); - policy.assertCallbacks( "match(SHA-1, 0001)", "match(SHA-1, 0000)", "noMore()" ); - } - - @Test - public void testValidate_MissingRemoteChecksum() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1, MD5 ); - fetcher.mock( MD5, "bar" ); - validator.validate( checksums( MD5, "bar" ), null ); - fetcher.assertFetchedFiles( SHA1, MD5 ); - policy.assertCallbacks( "match(MD5, 0000)" ); - } - - @Test - public void testValidate_InaccessibleRemoteChecksum() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1, MD5 ); - fetcher.mock( SHA1, new IOException( "inaccessible" ) ); - fetcher.mock( MD5, "bar" ); - validator.validate( checksums( MD5, "bar" ), null ); - fetcher.assertFetchedFiles( SHA1, MD5 ); - policy.assertCallbacks( "error(SHA-1, 0000, inaccessible)", "match(MD5, 0000)" ); - } - - @Test - public void testValidate_InaccessibleLocalChecksum() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1, MD5 ); - fetcher.mock( SHA1, "foo" ); - fetcher.mock( MD5, "bar" ); - validator.validate( checksums( SHA1, null, MD5, "bar" ), null ); - fetcher.assertFetchedFiles( MD5 ); - policy.assertCallbacks( "error(SHA-1, 0000, error)", "match(MD5, 0000)" ); - } - - @Test - public void testHandle_Accept() - throws Exception - { - policy.tolerateFailure = true; - ChecksumValidator validator = newValidator( SHA1 ); - assertEquals( true, validator.handle( new ChecksumFailureException( "accept" ) ) ); - policy.assertCallbacks( "fail(accept)" ); - } - - @Test - public void testHandle_Reject() - throws Exception - { - policy.tolerateFailure = false; - ChecksumValidator validator = newValidator( SHA1 ); - assertEquals( false, validator.handle( new ChecksumFailureException( "reject" ) ) ); - policy.assertCallbacks( "fail(reject)" ); - } - - @Test - public void testRetry_ResetPolicy() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1 ); - validator.retry(); - policy.assertCallbacks( "retry()" ); - } - - @Test - public void testRetry_RemoveTempFiles() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1 ); - fetcher.mock( SHA1, "foo" ); - validator.validate( checksums( SHA1, "foo" ), null ); - fetcher.assertFetchedFiles( SHA1 ); - assertEquals( 1, fetcher.checksumFiles.size() ); - for ( File file : fetcher.checksumFiles ) - { - assertTrue( file.getAbsolutePath(), file.isFile() ); - } - validator.retry(); - for ( File file : fetcher.checksumFiles ) - { - assertFalse( file.getAbsolutePath(), file.exists() ); - } - } - - @Test - public void testCommit_SaveChecksumFiles() - throws Exception - { - policy.inspectAll = true; - ChecksumValidator validator = newValidator( SHA1, MD5 ); - fetcher.mock( MD5, "bar" ); - validator.validate( checksums( SHA1, "foo", MD5, "bar" ), checksums( SHA1, "foo" ) ); - assertEquals( 1, fetcher.checksumFiles.size() ); - for ( File file : fetcher.checksumFiles ) - { - assertTrue( file.getAbsolutePath(), file.isFile() ); - } - validator.commit(); - File checksumFile = new File( dataFile.getPath() + ".sha1" ); - assertTrue( checksumFile.getAbsolutePath(), checksumFile.isFile() ); - assertEquals( "foo", TestFileUtils.readString( checksumFile ) ); - checksumFile = new File( dataFile.getPath() + ".md5" ); - assertTrue( checksumFile.getAbsolutePath(), checksumFile.isFile() ); - assertEquals( "bar", TestFileUtils.readString( checksumFile ) ); - for ( File file : fetcher.checksumFiles ) - { - assertFalse( file.getAbsolutePath(), file.exists() ); - } - } - - @Test - public void testClose_RemoveTempFiles() - throws Exception - { - ChecksumValidator validator = newValidator( SHA1 ); - fetcher.mock( SHA1, "foo" ); - validator.validate( checksums( SHA1, "foo" ), null ); - fetcher.assertFetchedFiles( SHA1 ); - assertEquals( 1, fetcher.checksumFiles.size() ); - for ( File file : fetcher.checksumFiles ) - { - assertTrue( file.getAbsolutePath(), file.isFile() ); - } - validator.close(); - for ( File file : fetcher.checksumFiles ) - { - assertFalse( file.getAbsolutePath(), file.exists() ); - } - } - -}
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/PartialFileTest.java ---------------------------------------------------------------------- diff --git a/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/PartialFileTest.java b/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/PartialFileTest.java deleted file mode 100644 index edfeee9..0000000 --- a/aether-connector-basic/src/test/java/org/eclipse/aether/connector/basic/PartialFileTest.java +++ /dev/null @@ -1,327 +0,0 @@ -package org.eclipse.aether.connector.basic; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import static org.junit.Assert.*; -import static org.junit.Assume.*; - -import java.io.Closeable; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.channels.FileLock; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.concurrent.CountDownLatch; - -import org.eclipse.aether.internal.test.util.TestFileUtils; -import org.eclipse.aether.internal.test.util.TestLoggerFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class PartialFileTest -{ - - private static class StubRemoteAccessChecker - implements PartialFile.RemoteAccessChecker - { - - Exception exception; - - int invocations; - - public void checkRemoteAccess() - throws Exception - { - invocations++; - if ( exception != null ) - { - throw exception; - } - } - - } - - private static class ConcurrentWriter - extends Thread - { - - private final File dstFile; - - private final File partFile; - - private final File lockFile; - - private final CountDownLatch locked; - - private final int sleep; - - volatile int length; - - Exception error; - - public ConcurrentWriter( File dstFile, int sleep, int length ) - throws InterruptedException - { - super( "ConcurrentWriter-" + dstFile.getAbsolutePath() ); - this.dstFile = dstFile; - partFile = new File( dstFile.getPath() + PartialFile.EXT_PART ); - lockFile = new File( partFile.getPath() + PartialFile.EXT_LOCK ); - this.sleep = sleep; - this.length = length; - locked = new CountDownLatch( 1 ); - start(); - locked.await(); - } - - @Override - public void run() - { - try - { - RandomAccessFile raf = new RandomAccessFile( lockFile, "rw" ); - try - { - FileLock lock = raf.getChannel().lock( 0, 1, false ); - locked.countDown(); - FileOutputStream fos = new FileOutputStream( partFile ); - try - { - for ( int i = 0, n = Math.abs( length ); i < n; i++ ) - { - for ( long start = System.currentTimeMillis(); System.currentTimeMillis() - start < sleep; ) - { - Thread.sleep( 10 ); - } - fos.write( 65 ); - fos.flush(); - System.out.println( " " + System.currentTimeMillis() + " Wrote byte " + ( i + 1 ) + "/" - + n ); - } - if ( length >= 0 && !dstFile.setLastModified( System.currentTimeMillis() ) ) - { - throw new IOException( "Could not update destination file" ); - } - } - finally - { - fos.close(); - } - lock.release(); - } - finally - { - raf.close(); - lockFile.delete(); - } - } - catch ( Exception e ) - { - error = e; - } - } - - } - - private static final boolean PROPER_LOCK_SUPPORT; - - static - { - String javaVersion = System.getProperty( "java.version" ).trim(); - boolean notJava5 = !javaVersion.startsWith( "1.5." ); - String osName = System.getProperty( "os.name" ).toLowerCase( Locale.ENGLISH ); - boolean windows = osName.contains( "windows" ); - PROPER_LOCK_SUPPORT = notJava5 || windows; - } - - private StubRemoteAccessChecker remoteAccessChecker; - - private File dstFile; - - private File partFile; - - private File lockFile; - - private List<Closeable> closeables; - - private PartialFile newPartialFile( long resumeThreshold, int requestTimeout ) - throws Exception - { - PartialFile.Factory factory = - new PartialFile.Factory( resumeThreshold >= 0, resumeThreshold, requestTimeout, - new TestLoggerFactory().getLogger( "" ) ); - PartialFile partFile = factory.newInstance( dstFile, remoteAccessChecker ); - if ( partFile != null ) - { - closeables.add( partFile ); - } - return partFile; - } - - @Before - public void init() - throws Exception - { - closeables = new ArrayList<Closeable>(); - remoteAccessChecker = new StubRemoteAccessChecker(); - dstFile = TestFileUtils.createTempFile( "Hello World!" ); - partFile = new File( dstFile.getPath() + PartialFile.EXT_PART ); - lockFile = new File( partFile.getPath() + PartialFile.EXT_LOCK ); - } - - @After - public void exit() - { - for ( Closeable closeable : closeables ) - { - try - { - closeable.close(); - } - catch ( Exception e ) - { - e.printStackTrace(); - } - } - } - - @Test - public void testCloseNonResumableFile() - throws Exception - { - PartialFile partialFile = newPartialFile( -1, 100 ); - assertNotNull( partialFile ); - assertNotNull( partialFile.getFile() ); - assertTrue( partialFile.getFile().getAbsolutePath(), partialFile.getFile().isFile() ); - partialFile.close(); - assertFalse( partialFile.getFile().getAbsolutePath(), partialFile.getFile().exists() ); - } - - @Test - public void testCloseResumableFile() - throws Exception - { - PartialFile partialFile = newPartialFile( 0, 100 ); - assertNotNull( partialFile ); - assertNotNull( partialFile.getFile() ); - assertTrue( partialFile.getFile().getAbsolutePath(), partialFile.getFile().isFile() ); - assertEquals( partFile, partialFile.getFile() ); - assertTrue( lockFile.getAbsolutePath(), lockFile.isFile() ); - partialFile.close(); - assertTrue( partialFile.getFile().getAbsolutePath(), partialFile.getFile().isFile() ); - assertFalse( lockFile.getAbsolutePath(), lockFile.exists() ); - } - - @Test - public void testResumableFileCreationError() - throws Exception - { - assertTrue( partFile.getAbsolutePath(), partFile.mkdirs() ); - PartialFile partialFile = newPartialFile( 0, 100 ); - assertNotNull( partialFile ); - assertFalse( partialFile.isResume() ); - assertFalse( lockFile.getAbsolutePath(), lockFile.exists() ); - } - - @Test - public void testResumeThreshold() - throws Exception - { - PartialFile partialFile = newPartialFile( 0, 100 ); - assertNotNull( partialFile ); - assertTrue( partialFile.isResume() ); - partialFile.close(); - partialFile = newPartialFile( 1, 100 ); - assertNotNull( partialFile ); - assertFalse( partialFile.isResume() ); - partialFile.close(); - } - - @Test( timeout = 10000 ) - public void testResumeConcurrently_RequestTimeout() - throws Exception - { - assumeTrue( PROPER_LOCK_SUPPORT ); - ConcurrentWriter writer = new ConcurrentWriter( dstFile, 5 * 1000, 1 ); - try - { - newPartialFile( 0, 1000 ); - fail( "expected exception" ); - } - catch ( Exception e ) - { - assertTrue( e.getMessage().contains( "Timeout" ) ); - } - writer.interrupt(); - writer.join(); - } - - @Test( timeout = 10000 ) - public void testResumeConcurrently_AwaitCompletion_ConcurrentWriterSucceeds() - throws Exception - { - assumeTrue( PROPER_LOCK_SUPPORT ); - assertTrue( dstFile.setLastModified( System.currentTimeMillis() - 60 * 1000 ) ); - ConcurrentWriter writer = new ConcurrentWriter( dstFile, 100, 10 ); - assertNull( newPartialFile( 0, 500 ) ); - writer.join(); - assertNull( writer.error ); - assertEquals( 1, remoteAccessChecker.invocations ); - } - - @Test( timeout = 10000 ) - public void testResumeConcurrently_AwaitCompletion_ConcurrentWriterFails() - throws Exception - { - assumeTrue( PROPER_LOCK_SUPPORT ); - assertTrue( dstFile.setLastModified( System.currentTimeMillis() - 60 * 1000 ) ); - ConcurrentWriter writer = new ConcurrentWriter( dstFile, 100, -10 ); - PartialFile partialFile = newPartialFile( 0, 500 ); - assertNotNull( partialFile ); - assertTrue( partialFile.isResume() ); - writer.join(); - assertNull( writer.error ); - assertEquals( 1, remoteAccessChecker.invocations ); - } - - @Test( timeout = 10000 ) - public void testResumeConcurrently_CheckRemoteAccess() - throws Exception - { - assumeTrue( PROPER_LOCK_SUPPORT ); - remoteAccessChecker.exception = new IOException( "missing" ); - ConcurrentWriter writer = new ConcurrentWriter( dstFile, 1000, 1 ); - try - { - newPartialFile( 0, 1000 ); - fail( "expected exception" ); - } - catch ( Exception e ) - { - assertSame( remoteAccessChecker.exception, e ); - } - writer.interrupt(); - writer.join(); - } - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/pom.xml ---------------------------------------------------------------------- diff --git a/aether-impl/pom.xml b/aether-impl/pom.xml deleted file mode 100644 index b7f26b9..0000000 --- a/aether-impl/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF 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. ---> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.aether</groupId> - <artifactId>aether</artifactId> - <version>1.0.3-SNAPSHOT</version> - </parent> - - <artifactId>aether-impl</artifactId> - - <name>Aether Implementation</name> - <description> - An implementation of the repository system. - </description> - - <dependencies> - <dependency> - <groupId>org.apache.maven.aether</groupId> - <artifactId>aether-api</artifactId> - </dependency> - <dependency> - <groupId>org.apache.maven.aether</groupId> - <artifactId>aether-spi</artifactId> - </dependency> - <dependency> - <groupId>org.apache.maven.aether</groupId> - <artifactId>aether-util</artifactId> - </dependency> - <dependency> - <groupId>javax.inject</groupId> - <artifactId>javax.inject</artifactId> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.eclipse.sisu</groupId> - <artifactId>org.eclipse.sisu.inject</artifactId> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.sonatype.sisu</groupId> - <artifactId>sisu-guice</artifactId> - <classifier>no_aop</classifier> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <scope>provided</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.maven.aether</groupId> - <artifactId>aether-test-util</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.eclipse.sisu</groupId> - <artifactId>sisu-maven-plugin</artifactId> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/AetherModule.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/AetherModule.java b/aether-impl/src/main/java/org/eclipse/aether/impl/AetherModule.java deleted file mode 100644 index 4e05ec2..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/AetherModule.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -/** - * A ready-made Guice module that sets up bindings for all components from this library. To acquire a complete - * repository system, clients need to bind an artifact descriptor reader, a version resolver, a version range resolver, - * zero or more metadata generator factories, some repository connector and transporter factories to access remote - * repositories. - * - * @deprecated Use {@link org.eclipse.aether.impl.guice.AetherModule} instead. - */ -@Deprecated -public final class AetherModule - extends org.eclipse.aether.impl.guice.AetherModule -{ - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactDescriptorReader.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactDescriptorReader.java b/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactDescriptorReader.java deleted file mode 100644 index 66f3528..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactDescriptorReader.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.resolution.ArtifactDescriptorException; -import org.eclipse.aether.resolution.ArtifactDescriptorRequest; -import org.eclipse.aether.resolution.ArtifactDescriptorResult; - -/** - * Provides information about an artifact that is relevant to transitive dependency resolution. Each artifact is expected - * to have an accompanying <em>artifact descriptor</em> that among others lists the direct dependencies of the artifact. - * - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface ArtifactDescriptorReader -{ - - /** - * Gets information about an artifact like its direct dependencies and potential relocations. Implementations must - * respect the {@link RepositorySystemSession#getArtifactDescriptorPolicy() artifact descriptor policy} of the - * session when dealing with certain error cases. - * - * @param session The repository session, must not be {@code null}. - * @param request The descriptor request, must not be {@code null} - * @return The descriptor result, never {@code null}. - * @throws ArtifactDescriptorException If the artifact descriptor could not be read. - * @see RepositorySystem#readArtifactDescriptor(RepositorySystemSession, ArtifactDescriptorRequest) - */ - ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request ) - throws ArtifactDescriptorException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactResolver.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactResolver.java b/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactResolver.java deleted file mode 100644 index 3b43592..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/ArtifactResolver.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import java.util.Collection; -import java.util.List; - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.artifact.Artifact; -import org.eclipse.aether.resolution.ArtifactRequest; -import org.eclipse.aether.resolution.ArtifactResolutionException; -import org.eclipse.aether.resolution.ArtifactResult; - -/** - * Resolves artifacts, that is gets a local filesystem path to their binary contents. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface ArtifactResolver -{ - - /** - * Resolves the path for an artifact. The artifact will be downloaded to the local repository if necessary. An - * artifact that is already resolved will be skipped and is not re-resolved. Note that this method assumes that any - * relocations have already been processed and the artifact coordinates are used as-is. - * - * @param session The repository session, must not be {@code null}. - * @param request The resolution request, must not be {@code null}. - * @return The resolution result, never {@code null}. - * @throws ArtifactResolutionException If the artifact could not be resolved. - * @see Artifact#getFile() - * @see RepositorySystem#resolveArtifact(RepositorySystemSession, ArtifactRequest) - */ - ArtifactResult resolveArtifact( RepositorySystemSession session, ArtifactRequest request ) - throws ArtifactResolutionException; - - /** - * Resolves the paths for a collection of artifacts. Artifacts will be downloaded to the local repository if - * necessary. Artifacts that are already resolved will be skipped and are not re-resolved. Note that this method - * assumes that any relocations have already been processed and the artifact coordinates are used as-is. - * - * @param session The repository session, must not be {@code null}. - * @param requests The resolution requests, must not be {@code null}. - * @return The resolution results (in request order), never {@code null}. - * @throws ArtifactResolutionException If any artifact could not be resolved. - * @see Artifact#getFile() - * @see RepositorySystem#resolveArtifacts(RepositorySystemSession, Collection) - */ - List<ArtifactResult> resolveArtifacts( RepositorySystemSession session, - Collection<? extends ArtifactRequest> requests ) - throws ArtifactResolutionException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/DefaultServiceLocator.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/DefaultServiceLocator.java b/aether-impl/src/main/java/org/eclipse/aether/impl/DefaultServiceLocator.java deleted file mode 100644 index 4d71b88..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/DefaultServiceLocator.java +++ /dev/null @@ -1,347 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import java.lang.reflect.Constructor; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.internal.impl.DefaultArtifactResolver; -import org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider; -import org.eclipse.aether.internal.impl.DefaultDependencyCollector; -import org.eclipse.aether.internal.impl.DefaultDeployer; -import org.eclipse.aether.internal.impl.DefaultFileProcessor; -import org.eclipse.aether.internal.impl.DefaultInstaller; -import org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider; -import org.eclipse.aether.internal.impl.DefaultMetadataResolver; -import org.eclipse.aether.internal.impl.DefaultOfflineController; -import org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager; -import org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider; -import org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher; -import org.eclipse.aether.internal.impl.DefaultRepositoryLayoutProvider; -import org.eclipse.aether.internal.impl.DefaultRepositorySystem; -import org.eclipse.aether.internal.impl.DefaultSyncContextFactory; -import org.eclipse.aether.internal.impl.DefaultTransporterProvider; -import org.eclipse.aether.internal.impl.DefaultUpdateCheckManager; -import org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer; -import org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory; -import org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory; -import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory; -import org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory; -import org.eclipse.aether.spi.connector.checksum.ChecksumPolicyProvider; -import org.eclipse.aether.spi.connector.layout.RepositoryLayoutFactory; -import org.eclipse.aether.spi.connector.layout.RepositoryLayoutProvider; -import org.eclipse.aether.spi.connector.transport.TransporterProvider; -import org.eclipse.aether.spi.io.FileProcessor; -import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory; -import org.eclipse.aether.spi.locator.Service; -import org.eclipse.aether.spi.locator.ServiceLocator; -import org.eclipse.aether.spi.log.LoggerFactory; - -/** - * A simple service locator that is already setup with all components from this library. To acquire a complete - * repository system, clients need to add an artifact descriptor reader, a version resolver, a version range resolver - * and optionally some repository connector and transporter factories to access remote repositories. Once the locator is - * fully populated, the repository system can be created like this: - * - * <pre> - * RepositorySystem repoSystem = serviceLocator.getService( RepositorySystem.class ); - * </pre> - * - * <em>Note:</em> This class is not thread-safe. Clients are expected to create the service locator and the repository - * system on a single thread. - */ -public final class DefaultServiceLocator - implements ServiceLocator -{ - - private class Entry<T> - { - - private final Class<T> type; - - private final Collection<Object> providers; - - private List<T> instances; - - public Entry( Class<T> type ) - { - if ( type == null ) - { - throw new IllegalArgumentException( "service type not specified" ); - } - this.type = type; - providers = new LinkedHashSet<Object>( 8 ); - } - - public synchronized void setServices( T... services ) - { - providers.clear(); - if ( services != null ) - { - for ( T service : services ) - { - if ( service == null ) - { - throw new IllegalArgumentException( "service instance not specified" ); - } - providers.add( service ); - } - } - instances = null; - } - - public synchronized void setService( Class<? extends T> impl ) - { - providers.clear(); - addService( impl ); - } - - public synchronized void addService( Class<? extends T> impl ) - { - if ( impl == null ) - { - throw new IllegalArgumentException( "implementation class not specified" ); - } - providers.add( impl ); - instances = null; - } - - public T getInstance() - { - List<T> instances = getInstances(); - return instances.isEmpty() ? null : instances.get( 0 ); - } - - public synchronized List<T> getInstances() - { - if ( instances == null ) - { - instances = new ArrayList<T>( providers.size() ); - for ( Object provider : providers ) - { - T instance; - if ( provider instanceof Class ) - { - instance = newInstance( (Class<?>) provider ); - } - else - { - instance = type.cast( provider ); - } - if ( instance != null ) - { - instances.add( instance ); - } - } - instances = Collections.unmodifiableList( instances ); - } - return instances; - } - - private T newInstance( Class<?> impl ) - { - try - { - Constructor<?> constr = impl.getDeclaredConstructor(); - if ( !Modifier.isPublic( constr.getModifiers() ) ) - { - constr.setAccessible( true ); - } - Object obj = constr.newInstance(); - - T instance = type.cast( obj ); - if ( instance instanceof Service ) - { - ( (Service) instance ).initService( DefaultServiceLocator.this ); - } - return instance; - } - catch ( Exception e ) - { - serviceCreationFailed( type, impl, e ); - } - catch ( LinkageError e ) - { - serviceCreationFailed( type, impl, e ); - } - return null; - } - - } - - private final Map<Class<?>, Entry<?>> entries; - - private ErrorHandler errorHandler; - - /** - * Creates a new service locator that already knows about all service implementations included this library. - */ - public DefaultServiceLocator() - { - entries = new HashMap<Class<?>, Entry<?>>(); - - addService( RepositorySystem.class, DefaultRepositorySystem.class ); - addService( ArtifactResolver.class, DefaultArtifactResolver.class ); - addService( DependencyCollector.class, DefaultDependencyCollector.class ); - addService( Deployer.class, DefaultDeployer.class ); - addService( Installer.class, DefaultInstaller.class ); - addService( MetadataResolver.class, DefaultMetadataResolver.class ); - addService( RepositoryLayoutProvider.class, DefaultRepositoryLayoutProvider.class ); - addService( RepositoryLayoutFactory.class, Maven2RepositoryLayoutFactory.class ); - addService( TransporterProvider.class, DefaultTransporterProvider.class ); - addService( ChecksumPolicyProvider.class, DefaultChecksumPolicyProvider.class ); - addService( RepositoryConnectorProvider.class, DefaultRepositoryConnectorProvider.class ); - addService( RemoteRepositoryManager.class, DefaultRemoteRepositoryManager.class ); - addService( UpdateCheckManager.class, DefaultUpdateCheckManager.class ); - addService( UpdatePolicyAnalyzer.class, DefaultUpdatePolicyAnalyzer.class ); - addService( FileProcessor.class, DefaultFileProcessor.class ); - addService( SyncContextFactory.class, DefaultSyncContextFactory.class ); - addService( RepositoryEventDispatcher.class, DefaultRepositoryEventDispatcher.class ); - addService( OfflineController.class, DefaultOfflineController.class ); - addService( LocalRepositoryProvider.class, DefaultLocalRepositoryProvider.class ); - addService( LocalRepositoryManagerFactory.class, SimpleLocalRepositoryManagerFactory.class ); - addService( LocalRepositoryManagerFactory.class, EnhancedLocalRepositoryManagerFactory.class ); - if ( Slf4jLoggerFactory.isSlf4jAvailable() ) - { - addService( LoggerFactory.class, Slf4jLoggerFactory.class ); - } - } - - private <T> Entry<T> getEntry( Class<T> type, boolean create ) - { - if ( type == null ) - { - throw new IllegalArgumentException( "service type not specified" ); - } - @SuppressWarnings( "unchecked" ) - Entry<T> entry = (Entry<T>) entries.get( type ); - if ( entry == null && create ) - { - entry = new Entry<T>( type ); - entries.put( type, entry ); - } - return entry; - } - - /** - * Sets the implementation class for a service. The specified class must have a no-arg constructor (of any - * visibility). If the service implementation itself requires other services for its operation, it should implement - * {@link Service} to gain access to this service locator. - * - * @param <T> The service type. - * @param type The interface describing the service, must not be {@code null}. - * @param impl The implementation class of the service, must not be {@code null}. - * @return This locator for chaining, never {@code null}. - */ - public <T> DefaultServiceLocator setService( Class<T> type, Class<? extends T> impl ) - { - getEntry( type, true ).setService( impl ); - return this; - } - - /** - * Adds an implementation class for a service. The specified class must have a no-arg constructor (of any - * visibility). If the service implementation itself requires other services for its operation, it should implement - * {@link Service} to gain access to this service locator. - * - * @param <T> The service type. - * @param type The interface describing the service, must not be {@code null}. - * @param impl The implementation class of the service, must not be {@code null}. - * @return This locator for chaining, never {@code null}. - */ - public <T> DefaultServiceLocator addService( Class<T> type, Class<? extends T> impl ) - { - getEntry( type, true ).addService( impl ); - return this; - } - - /** - * Sets the instances for a service. - * - * @param <T> The service type. - * @param type The interface describing the service, must not be {@code null}. - * @param services The instances of the service, may be {@code null} but must not contain {@code null} elements. - * @return This locator for chaining, never {@code null}. - */ - public <T> DefaultServiceLocator setServices( Class<T> type, T... services ) - { - getEntry( type, true ).setServices( services ); - return this; - } - - public <T> T getService( Class<T> type ) - { - Entry<T> entry = getEntry( type, false ); - return ( entry != null ) ? entry.getInstance() : null; - } - - public <T> List<T> getServices( Class<T> type ) - { - Entry<T> entry = getEntry( type, false ); - return ( entry != null ) ? entry.getInstances() : null; - } - - private void serviceCreationFailed( Class<?> type, Class<?> impl, Throwable exception ) - { - if ( errorHandler != null ) - { - errorHandler.serviceCreationFailed( type, impl, exception ); - } - } - - /** - * Sets the error handler to use. - * - * @param errorHandler The error handler to use, may be {@code null} to ignore/swallow errors. - */ - public void setErrorHandler( ErrorHandler errorHandler ) - { - this.errorHandler = errorHandler; - } - - /** - * A hook to customize the handling of errors encountered while locating a service implementation. - */ - public abstract static class ErrorHandler - { - - /** - * Handles errors during creation of a service. The default implemention does nothing. - * - * @param type The interface describing the service, must not be {@code null}. - * @param impl The implementation class of the service, must not be {@code null}. - * @param exception The error that occurred while trying to instantiate the implementation class, must not be - * {@code null}. - */ - public void serviceCreationFailed( Class<?> type, Class<?> impl, Throwable exception ) - { - } - - } - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/DependencyCollector.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/DependencyCollector.java b/aether-impl/src/main/java/org/eclipse/aether/impl/DependencyCollector.java deleted file mode 100644 index 9fa5817..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/DependencyCollector.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.collection.CollectRequest; -import org.eclipse.aether.collection.CollectResult; -import org.eclipse.aether.collection.DependencyCollectionException; - -/** - * Given a collection of direct dependencies, recursively gathers their transitive dependencies and calculates the - * dependency graph. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface DependencyCollector -{ - - /** - * Collects the transitive dependencies of some artifacts and builds a dependency graph. Note that this operation is - * only concerned about determining the coordinates of the transitive dependencies and does not actually resolve the - * artifact files. The supplied session carries various hooks to customize the dependency graph that must be invoked - * throughout the operation. - * - * @param session The repository session, must not be {@code null}. - * @param request The collection request, must not be {@code null}. - * @return The collection result, never {@code null}. - * @throws DependencyCollectionException If the dependency tree could not be built. - * @see RepositorySystemSession#getDependencyTraverser() - * @see RepositorySystemSession#getDependencyManager() - * @see RepositorySystemSession#getDependencySelector() - * @see RepositorySystemSession#getVersionFilter() - * @see RepositorySystemSession#getDependencyGraphTransformer() - * @see RepositorySystem#collectDependencies(RepositorySystemSession, CollectRequest) - */ - CollectResult collectDependencies( RepositorySystemSession session, CollectRequest request ) - throws DependencyCollectionException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/Deployer.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/Deployer.java b/aether-impl/src/main/java/org/eclipse/aether/impl/Deployer.java deleted file mode 100644 index 8f6b8fc..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/Deployer.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.deployment.DeployRequest; -import org.eclipse.aether.deployment.DeployResult; -import org.eclipse.aether.deployment.DeploymentException; - -/** - * Publishes artifacts to a remote repository. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface Deployer -{ - - /** - * Uploads a collection of artifacts and their accompanying metadata to a remote repository. - * - * @param session The repository session, must not be {@code null}. - * @param request The deployment request, must not be {@code null}. - * @return The deployment result, never {@code null}. - * @throws DeploymentException If any artifact/metadata from the request could not be deployed. - * @see RepositorySystem#deploy(RepositorySystemSession, DeployRequest) - * @see MetadataGeneratorFactory#newInstance(RepositorySystemSession, DeployRequest) - */ - DeployResult deploy( RepositorySystemSession session, DeployRequest request ) - throws DeploymentException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/Installer.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/Installer.java b/aether-impl/src/main/java/org/eclipse/aether/impl/Installer.java deleted file mode 100644 index a9ebed6..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/Installer.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.installation.InstallRequest; -import org.eclipse.aether.installation.InstallResult; -import org.eclipse.aether.installation.InstallationException; - -/** - * Publishes artifacts to the local repository. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface Installer -{ - - /** - * Installs a collection of artifacts and their accompanying metadata to the local repository. - * - * @param session The repository session, must not be {@code null}. - * @param request The installation request, must not be {@code null}. - * @return The installation result, never {@code null}. - * @throws InstallationException If any artifact/metadata from the request could not be installed. - * @see RepositorySystem#install(RepositorySystemSession, InstallRequest) - * @see MetadataGeneratorFactory#newInstance(RepositorySystemSession, InstallRequest) - */ - InstallResult install( RepositorySystemSession session, InstallRequest request ) - throws InstallationException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/LocalRepositoryProvider.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/LocalRepositoryProvider.java b/aether-impl/src/main/java/org/eclipse/aether/impl/LocalRepositoryProvider.java deleted file mode 100644 index d5f4be2..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/LocalRepositoryProvider.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.repository.LocalRepository; -import org.eclipse.aether.repository.LocalRepositoryManager; -import org.eclipse.aether.repository.NoLocalRepositoryManagerException; - -/** - * Retrieves a local repository manager from the installed local repository manager factories. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface LocalRepositoryProvider -{ - - /** - * Creates a new manager for the specified local repository. If the specified local repository has no type, the - * default local repository type of the system will be used. <em>Note:</em> It is expected that this method - * invocation is one of the last steps of setting up a new session, in particular any configuration properties - * should have been set already. - * - * @param session The repository system session from which to configure the manager, must not be {@code null}. - * @param localRepository The local repository to create a manager for, must not be {@code null}. - * @return The local repository manager, never {@code null}. - * @throws NoLocalRepositoryManagerException If the specified repository type is not recognized or no base directory - * is given. - * @see RepositorySystem#newLocalRepositoryManager(RepositorySystemSession, LocalRepository) - */ - LocalRepositoryManager newLocalRepositoryManager( RepositorySystemSession session, LocalRepository localRepository ) - throws NoLocalRepositoryManagerException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGenerator.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGenerator.java b/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGenerator.java deleted file mode 100644 index b4356cc..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGenerator.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import java.util.Collection; - -import org.eclipse.aether.artifact.Artifact; -import org.eclipse.aether.metadata.Metadata; - -/** - * A metadata generator that participates in the installation/deployment of artifacts. - * - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface MetadataGenerator -{ - - /** - * Prepares the generator to transform artifacts. - * - * @param artifacts The artifacts to install/deploy, must not be {@code null}. - * @return The metadata to process (e.g. merge with existing metadata) before artifact transformations, never - * {@code null}. - */ - Collection<? extends Metadata> prepare( Collection<? extends Artifact> artifacts ); - - /** - * Enables the metadata generator to transform the specified artifact. - * - * @param artifact The artifact to transform, must not be {@code null}. - * @return The transformed artifact (or just the input artifact), never {@code null}. - */ - Artifact transformArtifact( Artifact artifact ); - - /** - * Allows for metadata generation based on the transformed artifacts. - * - * @param artifacts The (transformed) artifacts to install/deploy, must not be {@code null}. - * @return The additional metadata to process after artifact transformations, never {@code null}. - */ - Collection<? extends Metadata> finish( Collection<? extends Artifact> artifacts ); - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGeneratorFactory.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGeneratorFactory.java b/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGeneratorFactory.java deleted file mode 100644 index 5f2b740..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataGeneratorFactory.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.deployment.DeployRequest; -import org.eclipse.aether.installation.InstallRequest; - -/** - * A factory to create metadata generators. Metadata generators can contribute additional metadata during the - * installation/deployment of artifacts. - * - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface MetadataGeneratorFactory -{ - - /** - * Creates a new metadata generator for the specified install request. - * - * @param session The repository system session from which to configure the generator, must not be {@code null}. - * @param request The install request the metadata generator is used for, must not be {@code null}. - * @return The metadata generator for the request or {@code null} if none. - */ - MetadataGenerator newInstance( RepositorySystemSession session, InstallRequest request ); - - /** - * Creates a new metadata generator for the specified deploy request. - * - * @param session The repository system session from which to configure the generator, must not be {@code null}. - * @param request The deploy request the metadata generator is used for, must not be {@code null}. - * @return The metadata generator for the request or {@code null} if none. - */ - MetadataGenerator newInstance( RepositorySystemSession session, DeployRequest request ); - - /** - * The priority of this factory. Factories with higher priority are invoked before those with lower priority. - * - * @return The priority of this factory. - */ - float getPriority(); - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataResolver.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataResolver.java b/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataResolver.java deleted file mode 100644 index 886e856..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/MetadataResolver.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import java.util.Collection; -import java.util.List; - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.metadata.Metadata; -import org.eclipse.aether.resolution.MetadataRequest; -import org.eclipse.aether.resolution.MetadataResult; - -/** - * Resolves metadata, that is gets a local filesystem path to their binary contents. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface MetadataResolver -{ - - /** - * Resolves the paths for a collection of metadata. Metadata will be downloaded to the local repository if - * necessary, e.g. because it hasn't been cached yet or the cache is deemed outdated. - * - * @param session The repository session, must not be {@code null}. - * @param requests The resolution requests, must not be {@code null}. - * @return The resolution results (in request order), never {@code null}. - * @see Metadata#getFile() - * @see RepositorySystem#resolveMetadata(RepositorySystemSession, Collection) - */ - List<MetadataResult> resolveMetadata( RepositorySystemSession session, - Collection<? extends MetadataRequest> requests ); - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/OfflineController.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/OfflineController.java b/aether-impl/src/main/java/org/eclipse/aether/impl/OfflineController.java deleted file mode 100644 index 22f5a4b..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/OfflineController.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.repository.RemoteRepository; -import org.eclipse.aether.transfer.RepositoryOfflineException; - -/** - * Determines whether a remote repository is accessible in offline mode. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface OfflineController -{ - - /** - * Determines whether the specified repository is accessible if the system was in offline mode. A simple - * implementation might unconditionally throw {@link RepositoryOfflineException} to block all remote repository - * access when in offline mode. More sophisticated implementations might inspect - * {@link RepositorySystemSession#getConfigProperties() configuration properties} of the session to check for some - * kind of whitelist that allows certain remote repositories even when offline. At any rate, the session's current - * {@link RepositorySystemSession#isOffline() offline state} is irrelevant to the outcome of the check. - * - * @param session The repository session during which the check is made, must not be {@code null}. - * @param repository The remote repository to check for offline access, must not be {@code null}. - * @throws RepositoryOfflineException If the repository is not accessible in offline mode. If the method returns - * normally, the repository is considered accessible even in offline mode. - * @see RepositorySystemSession#isOffline() - */ - void checkOffline( RepositorySystemSession session, RemoteRepository repository ) - throws RepositoryOfflineException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/RemoteRepositoryManager.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/RemoteRepositoryManager.java b/aether-impl/src/main/java/org/eclipse/aether/impl/RemoteRepositoryManager.java deleted file mode 100644 index 23685e7..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/RemoteRepositoryManager.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import java.util.List; - -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.repository.RemoteRepository; -import org.eclipse.aether.repository.RepositoryPolicy; - -/** - * Helps dealing with remote repository definitions. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface RemoteRepositoryManager -{ - - /** - * Aggregates repository definitions by merging duplicate repositories and optionally applies mirror, proxy and - * authentication settings from the supplied session. - * - * @param session The repository session during which the repositories will be accessed, must not be {@code null}. - * @param dominantRepositories The current list of remote repositories to merge the new definitions into, must not - * be {@code null}. - * @param recessiveRepositories The remote repositories to merge into the existing list, must not be {@code null}. - * @param recessiveIsRaw {@code true} if the recessive repository definitions have not yet been subjected to mirror, - * proxy and authentication settings, {@code false} otherwise. - * @return The aggregated list of remote repositories, never {@code null}. - * @see RepositorySystemSession#getMirrorSelector() - * @see RepositorySystemSession#getProxySelector() - * @see RepositorySystemSession#getAuthenticationSelector() - */ - List<RemoteRepository> aggregateRepositories( RepositorySystemSession session, - List<RemoteRepository> dominantRepositories, - List<RemoteRepository> recessiveRepositories, boolean recessiveIsRaw ); - - /** - * Gets the effective repository policy for the specified remote repository by merging the applicable - * snapshot/release policy of the repository with global settings from the supplied session. - * - * @param session The repository session during which the repository will be accessed, must not be {@code null}. - * @param repository The remote repository to determine the effective policy for, must not be {@code null}. - * @param releases {@code true} if the policy for release artifacts needs to be considered, {@code false} if not. - * @param snapshots {@code true} if the policy for snapshot artifacts needs to be considered, {@code false} if not. - * @return The effective repository policy, never {@code null}. - * @see RepositorySystemSession#getChecksumPolicy() - * @see RepositorySystemSession#getUpdatePolicy() - */ - RepositoryPolicy getPolicy( RepositorySystemSession session, RemoteRepository repository, boolean releases, - boolean snapshots ); - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryConnectorProvider.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryConnectorProvider.java b/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryConnectorProvider.java deleted file mode 100644 index 8d665c0..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryConnectorProvider.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.repository.RemoteRepository; -import org.eclipse.aether.spi.connector.RepositoryConnector; -import org.eclipse.aether.transfer.NoRepositoryConnectorException; - -/** - * Retrieves a repository connector from the installed repository connector factories. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface RepositoryConnectorProvider -{ - - /** - * Tries to create a repository connector for the specified remote repository. - * - * @param session The repository system session from which to configure the connector, must not be {@code null}. - * @param repository The remote repository to create a connector for, must not be {@code null}. - * @return The connector for the given repository, never {@code null}. - * @throws NoRepositoryConnectorException If no available factory can create a connector for the specified remote - * repository. - */ - RepositoryConnector newRepositoryConnector( RepositorySystemSession session, RemoteRepository repository ) - throws NoRepositoryConnectorException; - -} http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/3a1b8ae0/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryEventDispatcher.java ---------------------------------------------------------------------- diff --git a/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryEventDispatcher.java b/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryEventDispatcher.java deleted file mode 100644 index 2d29eb7..0000000 --- a/aether-impl/src/main/java/org/eclipse/aether/impl/RepositoryEventDispatcher.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.eclipse.aether.impl; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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. - */ - -import org.eclipse.aether.RepositoryEvent; - -/** - * Dispatches repository events to registered listeners. - * - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - * @provisional This type is provisional and can be changed, moved or removed without prior notice. - */ -public interface RepositoryEventDispatcher -{ - - /** - * Dispatches the specified repository event to all registered listeners. - * - * @param event The event to dispatch, must not be {@code null}. - */ - void dispatch( RepositoryEvent event ); - -}