You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2016/09/03 20:23:46 UTC
[23/51] [partial] maven-aether git commit: [MNG-6007] rename Aether
to Maven Artifact Resolver
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/GetTask.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/GetTask.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/GetTask.java
deleted file mode 100644
index e77de77..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/GetTask.java
+++ /dev/null
@@ -1,266 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A task to download a resource from the remote repository.
- *
- * @see Transporter#get(GetTask)
- */
-public final class GetTask
- extends TransportTask
-{
-
- private File dataFile;
-
- private boolean resume;
-
- private ByteArrayOutputStream dataBytes;
-
- private Map<String, String> checksums;
-
- /**
- * Creates a new task for the specified remote resource.
- *
- * @param location The relative location of the resource in the remote repository, must not be {@code null}.
- */
- public GetTask( URI location )
- {
- checksums = Collections.emptyMap();
- setLocation( location );
- }
-
- /**
- * Opens an output stream to store the downloaded data. Depending on {@link #getDataFile()}, this stream writes
- * either to a file on disk or a growable buffer in memory. It's the responsibility of the caller to close the
- * provided stream.
- *
- * @return The output stream for the data, never {@code null}. The stream is unbuffered.
- * @throws IOException If the stream could not be opened.
- */
- public OutputStream newOutputStream()
- throws IOException
- {
- return newOutputStream( false );
- }
-
- /**
- * Opens an output stream to store the downloaded data. Depending on {@link #getDataFile()}, this stream writes
- * either to a file on disk or a growable buffer in memory. It's the responsibility of the caller to close the
- * provided stream.
- *
- * @param resume {@code true} if the download resumes from the byte offset given by {@link #getResumeOffset()},
- * {@code false} if the download starts at the first byte of the resource.
- * @return The output stream for the data, never {@code null}. The stream is unbuffered.
- * @throws IOException If the stream could not be opened.
- */
- public OutputStream newOutputStream( boolean resume )
- throws IOException
- {
- if ( dataFile != null )
- {
- return new FileOutputStream( dataFile, this.resume && resume );
- }
- if ( dataBytes == null )
- {
- dataBytes = new ByteArrayOutputStream( 1024 );
- }
- else if ( !resume )
- {
- dataBytes.reset();
- }
- return dataBytes;
- }
-
- /**
- * Gets the file (if any) where the downloaded data should be stored. If the specified file already exists, it will
- * be overwritten.
- *
- * @return The data file or {@code null} if the data will be buffered in memory.
- */
- public File getDataFile()
- {
- return dataFile;
- }
-
- /**
- * Sets the file where the downloaded data should be stored. If the specified file already exists, it will be
- * overwritten. Unless the caller can reasonably expect the resource to be small, use of a data file is strongly
- * recommended to avoid exhausting heap memory during the download.
- *
- * @param dataFile The file to store the downloaded data, may be {@code null} to store the data in memory.
- * @return This task for chaining, never {@code null}.
- */
- public GetTask setDataFile( File dataFile )
- {
- return setDataFile( dataFile, false );
- }
-
- /**
- * Sets the file where the downloaded data should be stored. If the specified file already exists, it will be
- * overwritten or appended to, depending on the {@code resume} argument and the capabilities of the transporter.
- * Unless the caller can reasonably expect the resource to be small, use of a data file is strongly recommended to
- * avoid exhausting heap memory during the download.
- *
- * @param dataFile The file to store the downloaded data, may be {@code null} to store the data in memory.
- * @param resume {@code true} to request resuming a previous download attempt, starting from the current length of
- * the data file, {@code false} to download the resource from its beginning.
- * @return This task for chaining, never {@code null}.
- */
- public GetTask setDataFile( File dataFile, boolean resume )
- {
- this.dataFile = dataFile;
- this.resume = resume;
- return this;
- }
-
- /**
- * Gets the byte offset within the resource from which the download should resume if supported.
- *
- * @return The zero-based index of the first byte to download or {@code 0} for a full download from the start of the
- * resource, never negative.
- */
- public long getResumeOffset()
- {
- if ( resume )
- {
- if ( dataFile != null )
- {
- return dataFile.length();
- }
- if ( dataBytes != null )
- {
- return dataBytes.size();
- }
- }
- return 0;
- }
-
- /**
- * Gets the data that was downloaded into memory. <strong>Note:</strong> This method may only be called if
- * {@link #getDataFile()} is {@code null} as otherwise the downloaded data has been written directly to disk.
- *
- * @return The possibly empty data bytes, never {@code null}.
- */
- public byte[] getDataBytes()
- {
- if ( dataFile != null || dataBytes == null )
- {
- return EMPTY;
- }
- return dataBytes.toByteArray();
- }
-
- /**
- * Gets the data that was downloaded into memory as a string. The downloaded data is assumed to be encoded using
- * UTF-8. <strong>Note:</strong> This method may only be called if {@link #getDataFile()} is {@code null} as
- * otherwise the downloaded data has been written directly to disk.
- *
- * @return The possibly empty data string, never {@code null}.
- */
- public String getDataString()
- {
- if ( dataFile != null || dataBytes == null )
- {
- return "";
- }
- try
- {
- return dataBytes.toString( "UTF-8" );
- }
- catch ( UnsupportedEncodingException e )
- {
- throw new IllegalStateException( e );
- }
- }
-
- /**
- * Sets the listener that is to be notified during the transfer.
- *
- * @param listener The listener to notify of progress, may be {@code null}.
- * @return This task for chaining, never {@code null}.
- */
- public GetTask setListener( TransportListener listener )
- {
- super.setListener( listener );
- return this;
- }
-
- /**
- * Gets the checksums which the remote repository advertises for the resource. The map is keyed by algorithm name
- * (cf. {@link java.security.MessageDigest#getInstance(String)}) and the values are hexadecimal representations of
- * the corresponding value. <em>Note:</em> This is optional data that a transporter may return if the underlying
- * transport protocol provides metadata (e.g. HTTP headers) along with the actual resource data.
- *
- * @return The (read-only) checksums advertised for the downloaded resource, possibly empty but never {@code null}.
- */
- public Map<String, String> getChecksums()
- {
- return checksums;
- }
-
- /**
- * Sets a checksum which the remote repository advertises for the resource. <em>Note:</em> Transporters should only
- * use this method to record checksum information which is readily available while performing the actual download,
- * they should not perform additional transfers to gather this data.
- *
- * @param algorithm The name of the checksum algorithm (e.g. {@code "SHA-1"}, cf.
- * {@link java.security.MessageDigest#getInstance(String)} ), may be {@code null}.
- * @param value The hexadecimal representation of the checksum, may be {@code null}.
- * @return This task for chaining, never {@code null}.
- */
- public GetTask setChecksum( String algorithm, String value )
- {
- if ( algorithm != null )
- {
- if ( checksums.isEmpty() )
- {
- checksums = new HashMap<String, String>();
- }
- if ( value != null && value.length() > 0 )
- {
- checksums.put( algorithm, value );
- }
- else
- {
- checksums.remove( algorithm );
- }
- }
- return this;
- }
-
- @Override
- public String toString()
- {
- return "<< " + getLocation();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PeekTask.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PeekTask.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PeekTask.java
deleted file mode 100644
index d1fb905..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PeekTask.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.net.URI;
-
-/**
- * A task to check the existence of a resource in the remote repository. <em>Note:</em> The listener returned from
- * {@link #getListener()} is always a noop given that none of its event methods are relevant in context of this task.
- *
- * @see Transporter#peek(PeekTask)
- */
-public final class PeekTask
- extends TransportTask
-{
-
- /**
- * Creates a new task for the specified remote resource.
- *
- * @param location The relative location of the resource in the remote repository, must not be {@code null}.
- */
- public PeekTask( URI location )
- {
- setLocation( location );
- }
-
- @Override
- public String toString()
- {
- return "?? " + getLocation();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PutTask.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PutTask.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PutTask.java
deleted file mode 100644
index 1208a64..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/PutTask.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-
-/**
- * A task to upload a resource to the remote repository.
- *
- * @see Transporter#put(PutTask)
- */
-public final class PutTask
- extends TransportTask
-{
-
- private File dataFile;
-
- private byte[] dataBytes = EMPTY;
-
- /**
- * Creates a new task for the specified remote resource.
- *
- * @param location The relative location of the resource in the remote repository, must not be {@code null}.
- */
- public PutTask( URI location )
- {
- setLocation( location );
- }
-
- /**
- * Opens an input stream for the data to be uploaded. The length of the stream can be queried via
- * {@link #getDataLength()}. It's the responsibility of the caller to close the provided stream.
- *
- * @return The input stream for the data, never {@code null}. The stream is unbuffered.
- * @throws IOException If the stream could not be opened.
- */
- public InputStream newInputStream()
- throws IOException
- {
- if ( dataFile != null )
- {
- return new FileInputStream( dataFile );
- }
- return new ByteArrayInputStream( dataBytes );
- }
-
- /**
- * Gets the total number of bytes to be uploaded.
- *
- * @return The total number of bytes to be uploaded.
- */
- public long getDataLength()
- {
- if ( dataFile != null )
- {
- return dataFile.length();
- }
- return dataBytes.length;
- }
-
- /**
- * Gets the file (if any) with the data to be uploaded.
- *
- * @return The data file or {@code null} if the data resides in memory.
- */
- public File getDataFile()
- {
- return dataFile;
- }
-
- /**
- * Sets the file with the data to be uploaded. To upload some data residing already in memory, use
- * {@link #setDataString(String)} or {@link #setDataBytes(byte[])}.
- *
- * @param dataFile The data file, may be {@code null} if the resource data is provided directly from memory.
- * @return This task for chaining, never {@code null}.
- */
- public PutTask setDataFile( File dataFile )
- {
- this.dataFile = dataFile;
- dataBytes = EMPTY;
- return this;
- }
-
- /**
- * Sets the binary data to be uploaded.
- *
- * @param bytes The binary data, may be {@code null}.
- * @return This task for chaining, never {@code null}.
- */
- public PutTask setDataBytes( byte[] bytes )
- {
- this.dataBytes = ( bytes != null ) ? bytes : EMPTY;
- dataFile = null;
- return this;
- }
-
- /**
- * Sets the textual data to be uploaded. The text is encoded using UTF-8 before transmission.
- *
- * @param str The textual data, may be {@code null}.
- * @return This task for chaining, never {@code null}.
- */
- public PutTask setDataString( String str )
- {
- try
- {
- return setDataBytes( ( str != null ) ? str.getBytes( "UTF-8" ) : null );
- }
- catch ( UnsupportedEncodingException e )
- {
- throw new IllegalStateException( e );
- }
- }
-
- /**
- * Sets the listener that is to be notified during the transfer.
- *
- * @param listener The listener to notify of progress, may be {@code null}.
- * @return This task for chaining, never {@code null}.
- */
- public PutTask setListener( TransportListener listener )
- {
- super.setListener( listener );
- return this;
- }
-
- @Override
- public String toString()
- {
- return ">> " + getLocation();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportListener.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportListener.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportListener.java
deleted file mode 100644
index 473036b..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.nio.ByteBuffer;
-
-import org.eclipse.aether.transfer.TransferCancelledException;
-
-/**
- * A skeleton class for listeners used to monitor transport operations. Reusing common regular expression syntax, the
- * sequence of events is generally as follows:
- *
- * <pre>
- * ( STARTED PROGRESSED* )*
- * </pre>
- *
- * The methods in this class do nothing.
- */
-public abstract class TransportListener
-{
-
- /**
- * Enables subclassing.
- */
- protected TransportListener()
- {
- }
-
- /**
- * Notifies the listener about the start of the data transfer. This event may arise more than once if the transfer
- * needs to be restarted (e.g. after an authentication failure).
- *
- * @param dataOffset The byte offset in the resource at which the transfer starts, must not be negative.
- * @param dataLength The total number of bytes in the resource or {@code -1} if the length is unknown.
- * @throws TransferCancelledException If the transfer should be aborted.
- */
- public void transportStarted( long dataOffset, long dataLength )
- throws TransferCancelledException
- {
- }
-
- /**
- * Notifies the listener about some progress in the data transfer. This event may even be fired if actually zero
- * bytes have been transferred since the last event, for instance to enable cancellation.
- *
- * @param data The (read-only) buffer holding the bytes that have just been tranferred, must not be {@code null}.
- * @throws TransferCancelledException If the transfer should be aborted.
- */
- public void transportProgressed( ByteBuffer data )
- throws TransferCancelledException
- {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportTask.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportTask.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportTask.java
deleted file mode 100644
index f74b301..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransportTask.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.net.URI;
-
-/**
- * A transport task.
- *
- * @noextend This class is not intended to be extended by clients.
- */
-public abstract class TransportTask
-{
-
- static final TransportListener NOOP = new TransportListener()
- {
- };
-
- static final byte[] EMPTY = {};
-
- private URI location;
-
- private TransportListener listener = NOOP;
-
- TransportTask()
- {
- // hide
- }
-
- /**
- * Gets the relative location of the affected resource in the remote repository.
- *
- * @return The relative location of the resource, never {@code null}.
- */
- public URI getLocation()
- {
- return location;
- }
-
- TransportTask setLocation( URI location )
- {
- if ( location == null )
- {
- throw new IllegalArgumentException( "resource location has not been specified" );
- }
- this.location = location;
- return this;
- }
-
- /**
- * Gets the listener that is to be notified during the transfer.
- *
- * @return The listener to notify of progress, never {@code null}.
- */
- public TransportListener getListener()
- {
- return listener;
- }
-
- /**
- * Sets the listener that is to be notified during the transfer.
- *
- * @param listener The listener to notify of progress, may be {@code null}.
- * @return This task for chaining, never {@code null}.
- */
- TransportTask setListener( TransportListener listener )
- {
- this.listener = ( listener != null ) ? listener : NOOP;
- return this;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/Transporter.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/Transporter.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/Transporter.java
deleted file mode 100644
index b8d221c..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/Transporter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.io.Closeable;
-
-/**
- * A transporter for a remote repository. A transporter is responsible for transferring resources between the remote
- * repository and the local system. During its operation, the transporter must provide progress feedback via the
- * {@link TransportListener} configured on the underlying task.
- * <p>
- * If applicable, a transporter should obey connect/request timeouts and other relevant settings from the
- * {@link org.eclipse.aether.RepositorySystemSession#getConfigProperties() configuration properties} of the repository
- * system session.
- * <p>
- * <strong>Note:</strong> Implementations must be thread-safe such that a given transporter instance can safely be used
- * for concurrent requests.
- */
-public interface Transporter
- extends Closeable
-{
-
- /**
- * Classification for exceptions that denote connectivity or authentication issues and any other kind of error that
- * is not mapped to another classification code.
- *
- * @see #classify(Throwable)
- */
- int ERROR_OTHER = 0;
-
- /**
- * Classification for exceptions that denote a requested resource does not exist in the remote repository. Note that
- * cases where a remote repository is completely inaccessible should be classified as {@link #ERROR_OTHER}.
- *
- * @see #classify(Throwable)
- */
- int ERROR_NOT_FOUND = 1;
-
- /**
- * Classifies the type of exception that has been thrown from a previous request to the transporter. The exception
- * types employed by a transporter are generally unknown to its caller. Where a caller needs to distinguish between
- * certain error cases, it employs this method to detect which error case corresponds to the exception.
- *
- * @param error The exception to classify, must not be {@code null}.
- * @return The classification of the error, either {@link #ERROR_NOT_FOUND} or {@link #ERROR_OTHER}.
- */
- int classify( Throwable error );
-
- /**
- * Checks the existence of a resource in the repository. If the remote repository can be contacted successfully but
- * indicates the resource specified in the request does not exist, an exception is thrown such that invoking
- * {@link #classify(Throwable)} with that exception yields {@link #ERROR_NOT_FOUND}.
- *
- * @param task The existence check to perform, must not be {@code null}.
- * @throws Exception If the existence of the specified resource could not be confirmed.
- */
- void peek( PeekTask task )
- throws Exception;
-
- /**
- * Downloads a resource from the repository. If the resource is downloaded to a file as given by
- * {@link GetTask#getDataFile()} and the operation fails midway, the transporter should not delete the partial file
- * but leave its management to the caller.
- *
- * @param task The download to perform, must not be {@code null}.
- * @throws Exception If the transfer failed.
- */
- void get( GetTask task )
- throws Exception;
-
- /**
- * Uploads a resource to the repository.
- *
- * @param task The upload to perform, must not be {@code null}.
- * @throws Exception If the transfer failed.
- */
- void put( PutTask task )
- throws Exception;
-
- /**
- * Closes this transporter and frees any network resources associated with it. Once closed, a transporter must not
- * be used for further transfers, any attempt to do so would yield a {@link IllegalStateException} or similar.
- * Closing an already closed transporter is harmless and has no effect.
- */
- void close();
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterFactory.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterFactory.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterFactory.java
deleted file mode 100644
index 999908a..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.NoTransporterException;
-
-/**
- * A factory to create transporters. A transporter is responsible for uploads/downloads to/from a remote repository
- * using a particular transport protocol. When the repository system needs a transporter for a given remote repository,
- * it iterates the registered factories in descending order of their priority and calls
- * {@link #newInstance(RepositorySystemSession, RemoteRepository)} on them. The first transporter returned by a factory
- * will then be used for the transfer.
- */
-public interface TransporterFactory
-{
-
- /**
- * Tries to create a transporter for the specified remote repository. Typically, a factory will inspect
- * {@link RemoteRepository#getProtocol()} to determine whether it can handle a repository.
- *
- * @param session The repository system session from which to configure the transporter, must not be {@code null}.
- * In particular, a transporter should obey the timeouts configured for the session.
- * @param repository The remote repository to create a transporter for, must not be {@code null}.
- * @return The transporter for the given repository, never {@code null}.
- * @throws NoTransporterException If the factory cannot create a transporter for the specified remote repository.
- */
- Transporter newInstance( RepositorySystemSession session, RemoteRepository repository )
- throws NoTransporterException;
-
- /**
- * The priority of this factory. When multiple factories can handle a given repository, factories with higher
- * priority are preferred over those with lower priority.
- *
- * @return The priority of this factory.
- */
- float getPriority();
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterProvider.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterProvider.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterProvider.java
deleted file mode 100644
index b855042..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/TransporterProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.aether.spi.connector.transport;
-
-/*
- * 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.NoTransporterException;
-
-/**
- * Retrieves a transporter from the installed transporter factories.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface TransporterProvider
-{
-
- /**
- * Tries to create a transporter for the specified remote repository.
- *
- * @param session The repository system session from which to configure the transporter, must not be {@code null}.
- * @param repository The remote repository to create a transporter for, must not be {@code null}.
- * @return The transporter for the given repository, never {@code null}.
- * @throws NoTransporterException If none of the installed transporter factories can provide a transporter for the
- * specified remote repository.
- */
- Transporter newTransporter( RepositorySystemSession session, RemoteRepository repository )
- throws NoTransporterException;
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/package-info.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/package-info.java b/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/package-info.java
deleted file mode 100644
index 26796ba..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/connector/transport/package-info.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// CHECKSTYLE_OFF: RegexpHeader
-/*
- * 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.
- */
-/**
- * The contract to download/upload URI-based resources using custom transport protocols. By implementing a
- * {@link org.eclipse.aether.spi.connector.transport.TransporterFactory} and registering it with the repository system,
- * an application enables access to remote repositories that use new URI schemes.
- */
-package org.eclipse.aether.spi.connector.transport;
-
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/io/FileProcessor.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/io/FileProcessor.java b/aether-spi/src/main/java/org/eclipse/aether/spi/io/FileProcessor.java
deleted file mode 100644
index 1de21a0..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/io/FileProcessor.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package org.eclipse.aether.spi.io;
-
-/*
- * 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.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-
-/**
- * A utility component to perform file-based operations.
- */
-public interface FileProcessor
-{
-
- /**
- * Creates the directory named by the given abstract pathname, including any necessary but nonexistent parent
- * directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent
- * directories.
- *
- * @param directory The directory to create, may be {@code null}.
- * @return {@code true} if and only if the directory was created, along with all necessary parent directories;
- * {@code false} otherwise
- */
- boolean mkdirs( File directory );
-
- /**
- * Writes the given data to a file. UTF-8 is assumed as encoding for the data. Creates the necessary directories for
- * the target file. In case of an error, the created directories will be left on the file system.
- *
- * @param target The file to write to, must not be {@code null}. This file will be overwritten.
- * @param data The data to write, may be {@code null}.
- * @throws IOException If an I/O error occurs.
- */
- void write( File target, String data )
- throws IOException;
-
- /**
- * Writes the given stream to a file. Creates the necessary directories for the target file. In case of an error,
- * the created directories will be left on the file system.
- *
- * @param target The file to write to, must not be {@code null}. This file will be overwritten.
- * @param source The stream to write to the file, must not be {@code null}.
- * @throws IOException If an I/O error occurs.
- */
- void write( File target, InputStream source )
- throws IOException;
-
- /**
- * Moves the specified source file to the given target file. If the target file already exists, it is overwritten.
- * Creates the necessary directories for the target file. In case of an error, the created directories will be left
- * on the file system.
- *
- * @param source The file to move from, must not be {@code null}.
- * @param target The file to move to, must not be {@code null}.
- * @throws IOException If an I/O error occurs.
- */
- void move( File source, File target )
- throws IOException;
-
- /**
- * Copies the specified source file to the given target file. Creates the necessary directories for the target file.
- * In case of an error, the created directories will be left on the file system.
- *
- * @param source The file to copy from, must not be {@code null}.
- * @param target The file to copy to, must not be {@code null}.
- * @throws IOException If an I/O error occurs.
- */
- void copy( File source, File target )
- throws IOException;
-
- /**
- * Copies the specified source file to the given target file. Creates the necessary directories for the target file.
- * In case of an error, the created directories will be left on the file system.
- *
- * @param source The file to copy from, must not be {@code null}.
- * @param target The file to copy to, must not be {@code null}.
- * @param listener The listener to notify about the copy progress, may be {@code null}.
- * @return The number of copied bytes.
- * @throws IOException If an I/O error occurs.
- */
- long copy( File source, File target, ProgressListener listener )
- throws IOException;
-
- /**
- * A listener object that is notified for every progress made while copying files.
- *
- * @see FileProcessor#copy(File, File, ProgressListener)
- */
- public interface ProgressListener
- {
-
- void progressed( ByteBuffer buffer )
- throws IOException;
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/io/package-info.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/io/package-info.java b/aether-spi/src/main/java/org/eclipse/aether/spi/io/package-info.java
deleted file mode 100644
index ec5c122..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/io/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// CHECKSTYLE_OFF: RegexpHeader
-/*
- * 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.
- */
-/**
- * I/O related support infrastructure for components.
- */
-package org.eclipse.aether.spi.io;
-
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/LocalRepositoryManagerFactory.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/LocalRepositoryManagerFactory.java b/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/LocalRepositoryManagerFactory.java
deleted file mode 100644
index 518f90e..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/LocalRepositoryManagerFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.aether.spi.localrepo;
-
-/*
- * 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.LocalRepository;
-import org.eclipse.aether.repository.LocalRepositoryManager;
-import org.eclipse.aether.repository.NoLocalRepositoryManagerException;
-
-/**
- * A factory to create managers for the local repository. A local repository manager needs to keep track of artifacts
- * and metadata and manage access. When the repository system needs a repository manager for a given local repository,
- * it iterates the registered factories in descending order of their priority and calls
- * {@link #newInstance(RepositorySystemSession, LocalRepository)} on them. The first manager returned by a factory will
- * then be used for the local repository.
- */
-public interface LocalRepositoryManagerFactory
-{
-
- /**
- * Tries to create a repository manager for the specified local repository. The distinguishing property of a local
- * repository is its {@link LocalRepository#getContentType() type}, which may for example denote the used directory
- * structure.
- *
- * @param session The repository system session from which to configure the manager, must not be {@code null}.
- * @param repository The local repository to create a manager for, must not be {@code null}.
- * @return The manager for the given repository, never {@code null}.
- * @throws NoLocalRepositoryManagerException If the factory cannot create a manager for the specified local
- * repository.
- */
- LocalRepositoryManager newInstance( RepositorySystemSession session, LocalRepository repository )
- throws NoLocalRepositoryManagerException;
-
- /**
- * The priority of this factory. Factories with higher priority are preferred over those with lower priority.
- *
- * @return The priority of this factory.
- */
- float getPriority();
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/package-info.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/package-info.java b/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/package-info.java
deleted file mode 100644
index afd64cf..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/localrepo/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// CHECKSTYLE_OFF: RegexpHeader
-/*
- * 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.
- */
-/**
- * The contract for custom local repository implementations.
- */
-package org.eclipse.aether.spi.localrepo;
-
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/locator/Service.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/locator/Service.java b/aether-spi/src/main/java/org/eclipse/aether/spi/locator/Service.java
deleted file mode 100644
index ffe36b0..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/locator/Service.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.aether.spi.locator;
-
-/*
- * 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 stateless component of the repository system. The primary purpose of this interface is to provide a convenient
- * means to programmatically wire the several components of the repository system together when it is used outside of an
- * IoC container.
- */
-public interface Service
-{
-
- /**
- * Provides the opportunity to initialize this service and to acquire other services for its operation from the
- * locator. A service must not save the reference to the provided service locator.
- *
- * @param locator The service locator, must not be {@code null}.
- */
- void initService( ServiceLocator locator );
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/locator/ServiceLocator.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/locator/ServiceLocator.java b/aether-spi/src/main/java/org/eclipse/aether/spi/locator/ServiceLocator.java
deleted file mode 100644
index 0160ac9..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/locator/ServiceLocator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.aether.spi.locator;
-
-/*
- * 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;
-
-/**
- * A simple infrastructure to programmatically wire the various components of the repository system together when it is
- * used outside of an IoC container. Once a concrete implementation of a service locator has been setup, clients could
- * use
- *
- * <pre>
- * RepositorySystem repoSystem = serviceLocator.getService( RepositorySystem.class );
- * </pre>
- *
- * to acquire the repository system. Components that implement {@link Service} will be given an opportunity to acquire
- * further components from the locator, thereby allowing to create the complete object graph of the repository system.
- */
-public interface ServiceLocator
-{
-
- /**
- * Gets an instance of the specified service.
- *
- * @param <T> The service type.
- * @param type The interface describing the service, must not be {@code null}.
- * @return The service instance or {@code null} if the service could not be located/initialized.
- */
- <T> T getService( Class<T> type );
-
- /**
- * Gets all available instances of the specified service.
- *
- * @param <T> The service type.
- * @param type The interface describing the service, must not be {@code null}.
- * @return The (read-only) list of available service instances, never {@code null}.
- */
- <T> List<T> getServices( Class<T> type );
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/locator/package-info.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/locator/package-info.java b/aether-spi/src/main/java/org/eclipse/aether/spi/locator/package-info.java
deleted file mode 100644
index 2d47ceb..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/locator/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// CHECKSTYLE_OFF: RegexpHeader
-/*
- * 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 lightweight service locator infrastructure to help components acquire dependent components. The implementation of
- * the repository system is decomposed into many sub components that interact with each other via interfaces, allowing
- * an application to customize the system by swapping in different implementation classes for these interfaces. The
- * service locator defined by this package is one means for components to get hold of the proper implementation for its
- * dependencies. While not the most popular approach to component wiring, this service locator enables applications
- * that do not wish to pull in more sophisticated solutions like dependency injection containers to have a small
- * footprint. Therefore, all components should implement {@link org.eclipse.aether.spi.locator.Service} to support this
- * goal.
- */
-package org.eclipse.aether.spi.locator;
-
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/log/Logger.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/log/Logger.java b/aether-spi/src/main/java/org/eclipse/aether/spi/log/Logger.java
deleted file mode 100644
index 8b4bfb3..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/log/Logger.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.aether.spi.log;
-
-/*
- * 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 simple logger to facilitate emission of diagnostic messages. In general, unrecoverable errors should be reported
- * via exceptions and informational notifications should be reported via events, hence this logger interface focuses on
- * support for tracing.
- */
-public interface Logger
-{
-
- /**
- * Indicates whether debug logging is enabled.
- *
- * @return {@code true} if debug logging is enabled, {@code false} otherwise.
- */
- boolean isDebugEnabled();
-
- /**
- * Emits the specified message.
- *
- * @param msg The message to log, must not be {@code null}.
- */
- void debug( String msg );
-
- /**
- * Emits the specified message along with a stack trace of the given exception.
- *
- * @param msg The message to log, must not be {@code null}.
- * @param error The exception to log, may be {@code null}.
- */
- void debug( String msg, Throwable error );
-
- /**
- * Indicates whether warn logging is enabled.
- *
- * @return {@code true} if warn logging is enabled, {@code false} otherwise.
- */
- boolean isWarnEnabled();
-
- /**
- * Emits the specified message.
- *
- * @param msg The message to log, must not be {@code null}.
- */
- void warn( String msg );
-
- /**
- * Emits the specified message along with a stack trace of the given exception.
- *
- * @param msg The message to log, must not be {@code null}.
- * @param error The exception to log, may be {@code null}.
- */
- void warn( String msg, Throwable error );
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/log/LoggerFactory.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/log/LoggerFactory.java b/aether-spi/src/main/java/org/eclipse/aether/spi/log/LoggerFactory.java
deleted file mode 100644
index 9f66eb1..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/log/LoggerFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.aether.spi.log;
-
-/*
- * 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 factory to create loggers.
- */
-public interface LoggerFactory
-{
-
- /**
- * Gets a logger for a class with the specified name.
- *
- * @param name The name of the class requesting a logger, must not be {@code null}.
- * @return The requested logger, never {@code null}.
- */
- Logger getLogger( String name );
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLogger.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLogger.java b/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLogger.java
deleted file mode 100644
index 8fb7745..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLogger.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.aether.spi.log;
-
-/*
- * 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 logger that disables any logging.
- */
-final class NullLogger
- implements Logger
-{
-
- public boolean isDebugEnabled()
- {
- return false;
- }
-
- public void debug( String msg )
- {
- }
-
- public void debug( String msg, Throwable error )
- {
- }
-
- public boolean isWarnEnabled()
- {
- return false;
- }
-
- public void warn( String msg )
- {
- }
-
- public void warn( String msg, Throwable error )
- {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLoggerFactory.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLoggerFactory.java b/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLoggerFactory.java
deleted file mode 100644
index bea659f..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/log/NullLoggerFactory.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.aether.spi.log;
-
-/*
- * 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 logger factory that disables any logging.
- */
-public final class NullLoggerFactory
- implements LoggerFactory
-{
-
- /**
- * The singleton instance of this factory.
- */
- public static final LoggerFactory INSTANCE = new NullLoggerFactory();
-
- /**
- * The singleton logger used by this factory.
- */
- public static final Logger LOGGER = new NullLogger();
-
- public Logger getLogger( String name )
- {
- return LOGGER;
- }
-
- private NullLoggerFactory()
- {
- // hide constructor
- }
-
- /**
- * Gets a logger from the specified factory for the given class, falling back to a logger from this factory if the
- * specified factory is {@code null} or fails to provide a logger.
- *
- * @param loggerFactory The logger factory from which to get the logger, may be {@code null}.
- * @param type The class for which to get the logger, must not be {@code null}.
- * @return The requested logger, never {@code null}.
- */
- public static Logger getSafeLogger( LoggerFactory loggerFactory, Class<?> type )
- {
- if ( loggerFactory == null )
- {
- return LOGGER;
- }
- Logger logger = loggerFactory.getLogger( type.getName() );
- if ( logger == null )
- {
- return LOGGER;
- }
- return logger;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/main/java/org/eclipse/aether/spi/log/package-info.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/main/java/org/eclipse/aether/spi/log/package-info.java b/aether-spi/src/main/java/org/eclipse/aether/spi/log/package-info.java
deleted file mode 100644
index 9584292..0000000
--- a/aether-spi/src/main/java/org/eclipse/aether/spi/log/package-info.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// CHECKSTYLE_OFF: RegexpHeader
-/*
- * 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 simple logging infrastructure for diagnostic messages. The primary purpose of the
- * {@link org.eclipse.aether.spi.log.LoggerFactory} defined here is to avoid a mandatory dependency on a 3rd party
- * logging system/facade. Some applications might find the events fired by the repository system sufficient and prefer
- * a small footprint. Components that do not share this concern are free to ignore this package and directly employ
- * whatever logging system they desire.
- */
-package org.eclipse.aether.spi.log;
-
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/site/site.xml
----------------------------------------------------------------------
diff --git a/aether-spi/src/site/site.xml b/aether-spi/src/site/site.xml
deleted file mode 100644
index 3a16bf9..0000000
--- a/aether-spi/src/site/site.xml
+++ /dev/null
@@ -1,36 +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/DECORATION/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
- <body>
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <item name="JavaDocs" href="apidocs/index.html"/>
- <item name="Source Xref" href="xref/index.html"/>
- <!--item name="FAQ" href="faq.html"/-->
- </menu>
-
- <menu ref="parent"/>
- <menu ref="reports"/>
- </body>
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-spi/src/test/java/org/eclipse/aether/spi/connector/layout/ChecksumTest.java
----------------------------------------------------------------------
diff --git a/aether-spi/src/test/java/org/eclipse/aether/spi/connector/layout/ChecksumTest.java b/aether-spi/src/test/java/org/eclipse/aether/spi/connector/layout/ChecksumTest.java
deleted file mode 100644
index bcd49b4..0000000
--- a/aether-spi/src/test/java/org/eclipse/aether/spi/connector/layout/ChecksumTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.aether.spi.connector.layout;
-
-/*
- * 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.net.URI;
-
-import org.junit.Test;
-
-import org.eclipse.aether.spi.connector.layout.RepositoryLayout.Checksum;
-
-public class ChecksumTest
-{
-
- @Test
- public void testForLocation()
- {
- Checksum cs = Checksum.forLocation( URI.create( "dir/sub%20dir/file.txt" ), "SHA-1" );
- assertEquals( "SHA-1", cs.getAlgorithm() );
- assertEquals( "dir/sub%20dir/file.txt.sha1", cs.getLocation().toString() );
-
- cs = Checksum.forLocation( URI.create( "dir/sub%20dir/file.txt" ), "MD5" );
- assertEquals( "MD5", cs.getAlgorithm() );
- assertEquals( "dir/sub%20dir/file.txt.md5", cs.getLocation().toString() );
- }
-
- @Test( expected = IllegalArgumentException.class )
- public void testForLocation_WithQueryParams()
- {
- Checksum.forLocation( URI.create( "file.php?param=1" ), "SHA-1" );
- }
-
- @Test( expected = IllegalArgumentException.class )
- public void testForLocation_WithFragment()
- {
- Checksum.forLocation( URI.create( "file.html#fragment" ), "SHA-1" );
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-test-util/pom.xml
----------------------------------------------------------------------
diff --git a/aether-test-util/pom.xml b/aether-test-util/pom.xml
deleted file mode 100644
index a76176d..0000000
--- a/aether-test-util/pom.xml
+++ /dev/null
@@ -1,59 +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.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>aether-test-util</artifactId>
-
- <name>Aether Test Utilities</name>
- <description>
- A collection of utility classes to ease testing 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>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDefinition.java
----------------------------------------------------------------------
diff --git a/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDefinition.java b/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDefinition.java
deleted file mode 100644
index 0a760cc..0000000
--- a/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDefinition.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package org.eclipse.aether.internal.test.util;
-
-/*
- * 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.
- */
-
-class ArtifactDefinition
-{
- private String groupId;
-
- private String artifactId;
-
- private String extension;
-
- private String version;
-
- private String scope = "";
-
- private String definition;
-
- private String id;
-
- private String reference;
-
- private Boolean optional;
-
- public ArtifactDefinition( String def )
- {
- this.definition = def.trim();
-
- if ( definition.startsWith( "(" ) )
- {
- int idx = definition.indexOf( ')' );
- this.id = definition.substring( 1, idx );
- this.definition = definition.substring( idx + 1 );
- }
- else if ( definition.startsWith( "^" ) )
- {
- this.reference = definition.substring( 1 );
- return;
- }
-
- String[] split = definition.split( ":" );
- if ( split.length < 4 )
- {
- throw new IllegalArgumentException( "Need definition like 'gid:aid:ext:ver[:scope]', but was: "
- + definition );
- }
- groupId = split[0];
- artifactId = split[1];
- extension = split[2];
- version = split[3];
- if ( split.length > 4 )
- {
- scope = split[4];
- }
- if ( split.length > 5 )
- {
- if ( "optional".equalsIgnoreCase( split[5] ) )
- {
- optional = true;
- }
- else if ( "!optional".equalsIgnoreCase( split[5] ) )
- {
- optional = false;
- }
- }
- }
-
- public String getGroupId()
- {
- return groupId;
- }
-
- public String getArtifactId()
- {
- return artifactId;
- }
-
- public String getExtension()
- {
- return extension;
- }
-
- public String getVersion()
- {
- return version;
- }
-
- public String getScope()
- {
- return scope;
- }
-
- @Override
- public String toString()
- {
- return definition;
- }
-
- public String getId()
- {
- return id;
- }
-
- public String getReference()
- {
- return reference;
- }
-
- public boolean isReference()
- {
- return reference != null;
- }
-
- public boolean hasId()
- {
- return id != null;
- }
-
- public Boolean getOptional()
- {
- return optional;
- }
-}
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDescription.java
----------------------------------------------------------------------
diff --git a/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDescription.java b/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDescription.java
deleted file mode 100644
index bdb5c7f..0000000
--- a/aether-test-util/src/main/java/org/eclipse/aether/internal/test/util/ArtifactDescription.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.eclipse.aether.internal.test.util;
-
-/*
- * 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.artifact.Artifact;
-import org.eclipse.aether.graph.Dependency;
-import org.eclipse.aether.repository.RemoteRepository;
-
-/**
- */
-class ArtifactDescription
-{
-
- private List<RemoteRepository> repositories;
-
- private List<Dependency> managedDependencies;
-
- private List<Dependency> dependencies;
-
- private Artifact relocation;
-
- ArtifactDescription( Artifact relocation, List<Dependency> dependencies, List<Dependency> managedDependencies,
- List<RemoteRepository> repositories )
- {
- this.relocation = relocation;
- this.dependencies = dependencies;
- this.managedDependencies = managedDependencies;
- this.repositories = repositories;
- }
-
- public Artifact getRelocation()
- {
- return relocation;
- }
-
- public List<RemoteRepository> getRepositories()
- {
- return repositories;
- }
-
- public List<Dependency> getManagedDependencies()
- {
- return managedDependencies;
- }
-
- public List<Dependency> getDependencies()
- {
- return dependencies;
- }
-
-}