1 | |
package org.apache.maven.artifact.manager; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
import org.apache.maven.artifact.Artifact; |
23 | |
import org.apache.maven.artifact.metadata.ArtifactMetadata; |
24 | |
import org.apache.maven.artifact.repository.ArtifactRepository; |
25 | |
import org.apache.maven.wagon.ResourceDoesNotExistException; |
26 | |
import org.apache.maven.wagon.TransferFailedException; |
27 | |
import org.apache.maven.wagon.UnsupportedProtocolException; |
28 | |
import org.apache.maven.wagon.Wagon; |
29 | |
import org.apache.maven.wagon.authentication.AuthenticationInfo; |
30 | |
import org.apache.maven.wagon.events.TransferListener; |
31 | |
import org.apache.maven.wagon.proxy.ProxyInfo; |
32 | |
import org.apache.maven.wagon.repository.Repository; |
33 | |
import org.apache.maven.wagon.repository.RepositoryPermissions; |
34 | |
import org.codehaus.plexus.PlexusContainer; |
35 | |
import org.codehaus.plexus.util.xml.Xpp3Dom; |
36 | |
|
37 | |
import java.io.File; |
38 | |
import java.util.Collection; |
39 | |
import java.util.List; |
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
public interface WagonManager |
48 | |
{ |
49 | |
String ROLE = WagonManager.class.getName(); |
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
Wagon getWagon( String protocol ) |
61 | |
throws UnsupportedProtocolException; |
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
Wagon getWagon( Repository repository ) |
73 | |
throws UnsupportedProtocolException, WagonConfigurationException; |
74 | |
|
75 | |
void getArtifact( Artifact artifact, List remoteRepositories ) |
76 | |
throws TransferFailedException, ResourceDoesNotExistException; |
77 | |
|
78 | |
void getArtifact( Artifact artifact, ArtifactRepository repository ) |
79 | |
throws TransferFailedException, ResourceDoesNotExistException; |
80 | |
|
81 | |
void putArtifact( File source, Artifact artifact, ArtifactRepository deploymentRepository ) |
82 | |
throws TransferFailedException; |
83 | |
|
84 | |
void putArtifactMetadata( File source, ArtifactMetadata artifactMetadata, ArtifactRepository repository ) |
85 | |
throws TransferFailedException; |
86 | |
|
87 | |
void getArtifactMetadata( ArtifactMetadata metadata, ArtifactRepository remoteRepository, File destination, |
88 | |
String checksumPolicy ) |
89 | |
throws TransferFailedException, ResourceDoesNotExistException; |
90 | |
|
91 | |
void getArtifactMetadataFromDeploymentRepository( ArtifactMetadata metadata, ArtifactRepository remoteRepository, |
92 | |
File file, String checksumPolicyWarn ) |
93 | |
throws TransferFailedException, ResourceDoesNotExistException; |
94 | |
|
95 | |
void setOnline( boolean online ); |
96 | |
|
97 | |
boolean isOnline(); |
98 | |
|
99 | |
void addProxy( String protocol, String host, int port, String username, String password, String nonProxyHosts ); |
100 | |
|
101 | |
void addAuthenticationInfo( String repositoryId, String username, String password, String privateKey, |
102 | |
String passphrase ); |
103 | |
|
104 | |
void addMirror( String id, String mirrorOf, String url ); |
105 | |
|
106 | |
void setDownloadMonitor( TransferListener downloadMonitor ); |
107 | |
|
108 | |
void addPermissionInfo( String repositoryId, String filePermissions, String directoryPermissions ); |
109 | |
|
110 | |
ProxyInfo getProxy( String protocol ); |
111 | |
|
112 | |
AuthenticationInfo getAuthenticationInfo( String id ); |
113 | |
|
114 | |
|
115 | |
|
116 | |
|
117 | |
|
118 | |
|
119 | |
|
120 | |
void addConfiguration( String repositoryId, Xpp3Dom configuration ); |
121 | |
|
122 | |
void setInteractive( boolean interactive ); |
123 | |
|
124 | |
void registerWagons( Collection wagons, PlexusContainer extensionContainer ); |
125 | |
|
126 | |
void setDefaultRepositoryPermissions( RepositoryPermissions permissions ); |
127 | |
|
128 | |
ArtifactRepository getMirrorRepository( ArtifactRepository repository ); |
129 | |
} |