Class WagonTransporter
java.lang.Object
org.eclipse.aether.transport.wagon.WagonTransporter
- All Implemented Interfaces:
Closeable,AutoCloseable,Transporter
A transporter using Maven Wagon.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicBooleanprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final Propertiesprivate static final org.slf4j.Loggerprivate final AuthenticationContextprivate final AuthenticationContextprivate final RemoteRepositoryprivate final RepositorySystemSessionprivate final org.apache.maven.wagon.authentication.AuthenticationInfoprivate final WagonConfiguratorprivate final Stringprivate final WagonProviderprivate final org.apache.maven.wagon.proxy.ProxyInfoProviderprivate final org.apache.maven.wagon.repository.Repositoryprivate final Queue<org.apache.maven.wagon.Wagon> Fields inherited from interface org.eclipse.aether.spi.connector.transport.Transporter
ERROR_NOT_FOUND, ERROR_OTHER -
Constructor Summary
ConstructorsConstructorDescriptionWagonTransporter(WagonProvider wagonProvider, WagonConfigurator wagonConfigurator, RemoteRepository repository, RepositorySystemSession session) -
Method Summary
Modifier and TypeMethodDescriptionintClassifies the type of exception that has been thrown from a previous request to the transporter.voidclose()Closes this transporter and frees any network resources associated with it.private voidconnectWagon(org.apache.maven.wagon.Wagon wagon) private voiddisconnectWagon(org.apache.maven.wagon.Wagon wagon) private voidexecute(TransportTask task, WagonTransporter.TaskRunner runner) voidDownloads a resource from the repository.private org.apache.maven.wagon.authentication.AuthenticationInfogetAuthenticationInfo(AuthenticationContext authContext) private static org.apache.maven.wagon.repository.RepositoryPermissionsgetPermissions(String repoId, RepositorySystemSession session) private org.apache.maven.wagon.proxy.ProxyInfoProvidergetProxy(RemoteRepository repository, AuthenticationContext authContext) private org.apache.maven.wagon.WagonvoidChecks the existence of a resource in the repository.private org.apache.maven.wagon.WagonvoidUploads a resource to the repository.private voidreleaseWagon(org.apache.maven.wagon.Wagon wagon)
-
Field Details
-
CONFIG_PROP_CONFIG
- See Also:
-
CONFIG_PROP_FILE_MODE
- See Also:
-
CONFIG_PROP_DIR_MODE
- See Also:
-
CONFIG_PROP_GROUP
- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
repository
-
session
-
repoAuthContext
-
proxyAuthContext
-
wagonProvider
-
wagonConfigurator
-
wagonHint
-
wagonRepo
private final org.apache.maven.wagon.repository.Repository wagonRepo -
wagonAuth
private final org.apache.maven.wagon.authentication.AuthenticationInfo wagonAuth -
wagonProxy
private final org.apache.maven.wagon.proxy.ProxyInfoProvider wagonProxy -
headers
-
wagons
-
closed
-
-
Constructor Details
-
WagonTransporter
WagonTransporter(WagonProvider wagonProvider, WagonConfigurator wagonConfigurator, RemoteRepository repository, RepositorySystemSession session) throws NoTransporterException - Throws:
NoTransporterException
-
-
Method Details
-
getPermissions
private static org.apache.maven.wagon.repository.RepositoryPermissions getPermissions(String repoId, RepositorySystemSession session) -
getAuthenticationInfo
private org.apache.maven.wagon.authentication.AuthenticationInfo getAuthenticationInfo(AuthenticationContext authContext) -
getProxy
private org.apache.maven.wagon.proxy.ProxyInfoProvider getProxy(RemoteRepository repository, AuthenticationContext authContext) -
lookupWagon
- Throws:
Exception
-
releaseWagon
private void releaseWagon(org.apache.maven.wagon.Wagon wagon) -
connectWagon
private void connectWagon(org.apache.maven.wagon.Wagon wagon) throws org.apache.maven.wagon.WagonException - Throws:
org.apache.maven.wagon.WagonException
-
disconnectWagon
private void disconnectWagon(org.apache.maven.wagon.Wagon wagon) -
pollWagon
- Throws:
Exception
-
classify
Description copied from interface:TransporterClassifies 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.- Specified by:
classifyin interfaceTransporter- Parameters:
error- The exception to classify, must not benull.- Returns:
- The classification of the error, either
Transporter.ERROR_NOT_FOUNDorTransporter.ERROR_OTHER.
-
peek
Description copied from interface:TransporterChecks 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 invokingTransporter.classify(Throwable)with that exception yieldsTransporter.ERROR_NOT_FOUND.- Specified by:
peekin interfaceTransporter- Parameters:
task- The existence check to perform, must not benull.- Throws:
Exception- If the existence of the specified resource could not be confirmed.
-
get
Description copied from interface:TransporterDownloads a resource from the repository. If the resource is downloaded to a file as given byGetTask.getDataFile()and the operation fails midway, the transporter should not delete the partial file but leave its management to the caller.- Specified by:
getin interfaceTransporter- Parameters:
task- The download to perform, must not benull.- Throws:
Exception- If the transfer failed.
-
put
Description copied from interface:TransporterUploads a resource to the repository.- Specified by:
putin interfaceTransporter- Parameters:
task- The upload to perform, must not benull.- Throws:
Exception- If the transfer failed.
-
execute
- Throws:
Exception
-
close
public void close()Description copied from interface:TransporterCloses 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 aIllegalStateExceptionor similar. Closing an already closed transporter is harmless and has no effect.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceTransporter
-