1 | |
package org.apache.maven.archetype.common; |
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.archetype.exception.UnknownArchetype; |
23 | |
import org.apache.maven.archetype.metadata.ArchetypeDescriptor; |
24 | |
import org.apache.maven.artifact.repository.ArtifactRepository; |
25 | |
import org.apache.maven.model.Model; |
26 | |
|
27 | |
import org.codehaus.plexus.util.xml.pull.XmlPullParserException; |
28 | |
|
29 | |
import java.io.File; |
30 | |
import java.io.IOException; |
31 | |
|
32 | |
import java.util.List; |
33 | |
import java.util.zip.ZipFile; |
34 | |
|
35 | |
public interface ArchetypeArtifactManager |
36 | |
{ |
37 | |
String ROLE = ArchetypeArtifactManager.class.getName (); |
38 | |
|
39 | |
Model getArchetypePom ( File jar ) |
40 | |
throws XmlPullParserException, UnknownArchetype, IOException; |
41 | |
|
42 | |
|
43 | |
|
44 | |
File getArchetypeFile( String groupId, String artifactId, String version, |
45 | |
ArtifactRepository archetypeRepository, ArtifactRepository localRepository, |
46 | |
List<ArtifactRepository> repositories ) |
47 | |
throws UnknownArchetype; |
48 | |
|
49 | |
|
50 | |
|
51 | |
ClassLoader getArchetypeJarLoader( File archetypeFile ) |
52 | |
throws UnknownArchetype; |
53 | |
|
54 | |
|
55 | |
|
56 | |
ZipFile getArchetypeZipFile( File archetypeFile ) |
57 | |
throws UnknownArchetype; |
58 | |
|
59 | |
|
60 | |
|
61 | |
boolean isFileSetArchetype( File archetypeFile ); |
62 | |
|
63 | |
|
64 | |
|
65 | |
boolean isFileSetArchetype( String groupId, String artifactId, String version, |
66 | |
ArtifactRepository archetypeRepository, ArtifactRepository localRepository, |
67 | |
List<ArtifactRepository> repositories ); |
68 | |
|
69 | |
|
70 | |
|
71 | |
boolean isOldArchetype( File archetypeFile ); |
72 | |
|
73 | |
|
74 | |
|
75 | |
boolean isOldArchetype( String groupId, String artifactId, String version, ArtifactRepository archetypeRepository, |
76 | |
ArtifactRepository localRepository, List<ArtifactRepository> repositories ); |
77 | |
|
78 | |
|
79 | |
|
80 | |
boolean exists( String archetypeGroupId, String archetypeArtifactId, String archetypeVersion, |
81 | |
ArtifactRepository archetypeRepository, ArtifactRepository localRepository, |
82 | |
List<ArtifactRepository> repos ); |
83 | |
|
84 | |
|
85 | |
|
86 | |
ArchetypeDescriptor getFileSetArchetypeDescriptor( File archetypeFile ) |
87 | |
throws UnknownArchetype; |
88 | |
|
89 | |
|
90 | |
|
91 | |
ArchetypeDescriptor getFileSetArchetypeDescriptor( String groupId, String artifactId, String version, |
92 | |
ArtifactRepository archetypeRepository, |
93 | |
ArtifactRepository localRepository, |
94 | |
List<ArtifactRepository> repositories ) |
95 | |
throws UnknownArchetype; |
96 | |
|
97 | |
|
98 | |
|
99 | |
List<String> getFilesetArchetypeResources( File archetypeFile ) |
100 | |
throws UnknownArchetype; |
101 | |
|
102 | |
|
103 | |
|
104 | |
org.apache.maven.archetype.old.descriptor.ArchetypeDescriptor getOldArchetypeDescriptor( File archetypeFile ) |
105 | |
throws UnknownArchetype; |
106 | |
|
107 | |
|
108 | |
|
109 | |
org.apache.maven.archetype.old.descriptor.ArchetypeDescriptor getOldArchetypeDescriptor( |
110 | |
String groupId, String artifactId, String version, ArtifactRepository archetypeRepository, |
111 | |
ArtifactRepository localRepository, List<ArtifactRepository> repositories ) |
112 | |
throws UnknownArchetype; |
113 | |
} |