View Javadoc

1   package org.apache.maven.plugin.prefix.internal;
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 org.apache.maven.model.Plugin;
23  import org.apache.maven.plugin.prefix.PluginPrefixResult;
24  import org.eclipse.aether.repository.ArtifactRepository;
25  
26  /**
27   * Describes the result of a plugin prefix resolution request.
28   * 
29   * @since 3.0
30   * @author Benjamin Bentmann
31   */
32  class DefaultPluginPrefixResult
33      implements PluginPrefixResult
34  {
35  
36      private String groupId;
37  
38      private String artifactId;
39  
40      private ArtifactRepository repository;
41  
42      public DefaultPluginPrefixResult()
43      {
44          // does nothing
45      }
46  
47      public DefaultPluginPrefixResult( Plugin plugin )
48      {
49          groupId = plugin.getGroupId();
50          artifactId = plugin.getArtifactId();
51      }
52  
53      public DefaultPluginPrefixResult( String groupId, String artifactId, ArtifactRepository repository )
54      {
55          this.groupId = groupId;
56          this.artifactId = artifactId;
57          this.repository = repository;
58      }
59  
60      public String getGroupId()
61      {
62          return groupId;
63      }
64  
65      public void setGroupId( String groupId )
66      {
67          this.groupId = groupId;
68      }
69  
70      public String getArtifactId()
71      {
72          return artifactId;
73      }
74  
75      public void setArtifactId( String artifactId )
76      {
77          this.artifactId = artifactId;
78      }
79  
80      public ArtifactRepository getRepository()
81      {
82          return repository;
83      }
84  
85      public void setRepository( ArtifactRepository repository )
86      {
87          this.repository = repository;
88      }
89  
90  }