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.List;
28
29
30
31
32 public class RepoInfoWrapper
33 implements RepositoryInfo
34 {
35
36 private final Repository repo;
37
38 private List<GroupVersionAlignmentWrapper> convertedAlignments;
39
40
41
42
43 public RepoInfoWrapper( final Repository repo )
44 {
45 this.repo = repo;
46 }
47
48
49
50
51 public List<String> getExcludes()
52 {
53 return repo.getExcludes();
54 }
55
56
57
58
59 public List<GroupVersionAlignmentWrapper> getGroupVersionAlignments()
60 {
61 final List<GroupVersionAlignment> alignments = repo.getGroupVersionAlignments();
62
63 if ( convertedAlignments == null || alignments.size() != convertedAlignments.size() )
64 {
65 final List<GroupVersionAlignmentWrapper> l =
66 new ArrayList<GroupVersionAlignmentWrapper>( alignments.size() );
67
68 for ( final GroupVersionAlignment alignment : alignments )
69 {
70 l.add( new GroupVersionAlignmentWrapper( alignment ) );
71 }
72
73 convertedAlignments = l;
74 }
75
76 return convertedAlignments;
77 }
78
79
80
81
82 public List<String> getIncludes()
83 {
84 return repo.getIncludes();
85 }
86
87
88
89
90 public String getScope()
91 {
92 return repo.getScope();
93 }
94
95
96
97
98 public boolean isIncludeMetadata()
99 {
100 return repo.isIncludeMetadata();
101 }
102
103 }