View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.plugin.prefix.internal;
20  
21  import org.apache.maven.model.Plugin;
22  import org.apache.maven.plugin.prefix.PluginPrefixResult;
23  import org.eclipse.aether.repository.ArtifactRepository;
24  
25  /**
26   * Describes the result of a plugin prefix resolution request.
27   *
28   * @since 3.0
29   * @author Benjamin Bentmann
30   */
31  class DefaultPluginPrefixResult implements PluginPrefixResult {
32  
33      private String groupId;
34  
35      private String artifactId;
36  
37      private ArtifactRepository repository;
38  
39      DefaultPluginPrefixResult() {
40          // does nothing
41      }
42  
43      DefaultPluginPrefixResult(Plugin plugin) {
44          groupId = plugin.getGroupId();
45          artifactId = plugin.getArtifactId();
46      }
47  
48      DefaultPluginPrefixResult(String groupId, String artifactId, ArtifactRepository repository) {
49          this.groupId = groupId;
50          this.artifactId = artifactId;
51          this.repository = repository;
52      }
53  
54      public String getGroupId() {
55          return groupId;
56      }
57  
58      public void setGroupId(String groupId) {
59          this.groupId = groupId;
60      }
61  
62      public String getArtifactId() {
63          return artifactId;
64      }
65  
66      public void setArtifactId(String artifactId) {
67          this.artifactId = artifactId;
68      }
69  
70      public ArtifactRepository getRepository() {
71          return repository;
72      }
73  
74      public void setRepository(ArtifactRepository repository) {
75          this.repository = repository;
76      }
77  }