1 | |
package org.apache.maven.plugin.assembly.archive.phase.wrappers; |
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.plugin.assembly.model.GroupVersionAlignment; |
23 | |
import org.apache.maven.plugin.assembly.model.Repository; |
24 | |
import org.apache.maven.shared.repository.model.RepositoryInfo; |
25 | |
|
26 | |
import java.util.ArrayList; |
27 | |
import java.util.Iterator; |
28 | |
import java.util.List; |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public class RepoInfoWrapper |
34 | |
implements RepositoryInfo |
35 | |
{ |
36 | |
|
37 | |
private final Repository repo; |
38 | |
|
39 | |
private List<GroupVersionAlignmentWrapper> convertedAlignments; |
40 | |
|
41 | |
public RepoInfoWrapper( final Repository repo ) |
42 | 6 | { |
43 | 6 | this.repo = repo; |
44 | 6 | } |
45 | |
|
46 | |
public List<String> getExcludes() |
47 | |
{ |
48 | 0 | return repo.getExcludes(); |
49 | |
} |
50 | |
|
51 | |
public List<GroupVersionAlignmentWrapper> getGroupVersionAlignments() |
52 | |
{ |
53 | 0 | final List<GroupVersionAlignment> alignments = repo.getGroupVersionAlignments(); |
54 | |
|
55 | 0 | if ( convertedAlignments == null || alignments.size() != convertedAlignments.size() ) |
56 | |
{ |
57 | 0 | final List<GroupVersionAlignmentWrapper> l = |
58 | |
new ArrayList<GroupVersionAlignmentWrapper>( alignments.size() ); |
59 | |
|
60 | 0 | for ( final Iterator<GroupVersionAlignment> it = alignments.iterator(); it.hasNext(); ) |
61 | |
{ |
62 | 0 | final GroupVersionAlignment alignment = it.next(); |
63 | |
|
64 | 0 | l.add( new GroupVersionAlignmentWrapper( alignment ) ); |
65 | 0 | } |
66 | |
|
67 | 0 | convertedAlignments = l; |
68 | |
} |
69 | |
|
70 | 0 | return convertedAlignments; |
71 | |
} |
72 | |
|
73 | |
public List<String> getIncludes() |
74 | |
{ |
75 | 0 | return repo.getIncludes(); |
76 | |
} |
77 | |
|
78 | |
public String getScope() |
79 | |
{ |
80 | 0 | return repo.getScope(); |
81 | |
} |
82 | |
|
83 | |
public boolean isIncludeMetadata() |
84 | |
{ |
85 | 0 | return repo.isIncludeMetadata(); |
86 | |
} |
87 | |
|
88 | |
} |