View Javadoc

1   package org.apache.maven.repository.legacy.metadata;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.List;
23  import java.util.Map;
24  import java.util.Set;
25  
26  import org.apache.maven.artifact.Artifact;
27  import org.apache.maven.artifact.repository.ArtifactRepository;
28  
29  public class ResolutionGroup
30  {
31  
32      private final Set<Artifact> artifacts;
33  
34      private final List<ArtifactRepository> resolutionRepositories;
35  
36      private final Artifact pomArtifact;
37  
38      private final Artifact relocatedArtifact;
39  
40      private final Map<String, Artifact> managedVersions;
41  
42      public ResolutionGroup( Artifact pomArtifact, Set<Artifact> artifacts,
43                              List<ArtifactRepository> resolutionRepositories )
44      {
45          this( pomArtifact, null, artifacts, null, resolutionRepositories );
46      }
47  
48      public ResolutionGroup( Artifact pomArtifact, Artifact relocatedArtifact, Set<Artifact> artifacts,
49                              Map<String, Artifact> managedVersions, List<ArtifactRepository> resolutionRepositories )
50      {
51          this.pomArtifact = pomArtifact;
52          this.relocatedArtifact = relocatedArtifact;
53          this.artifacts = artifacts;
54          this.managedVersions = managedVersions;
55          this.resolutionRepositories = resolutionRepositories;
56      }
57  
58      public Artifact getPomArtifact()
59      {
60          return pomArtifact;
61      }
62  
63      public Artifact getRelocatedArtifact()
64      {
65          return relocatedArtifact;
66      }
67  
68      public Set<Artifact> getArtifacts()
69      {
70          return artifacts;
71      }
72  
73      public List<ArtifactRepository> getResolutionRepositories()
74      {
75          return resolutionRepositories;
76      }
77  
78      public Map<String, Artifact> getManagedVersions()
79      {
80          return managedVersions;
81      }
82  
83  }