View Javadoc

1   package org.apache.maven.reporting.exec;
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.ArrayList;
23  import java.util.Collections;
24  import java.util.List;
25  
26  import org.apache.maven.model.Plugin;
27  import org.codehaus.plexus.configuration.PlexusConfiguration;
28  
29  /**
30   * Represents a reporting plugin and its executions. It basically contains similar informations
31   * as a {@link Plugin}, but in order to decouple reporting stuff from core, some values are copied.
32   */
33  public class ReportPlugin
34  {
35      private String groupId = "org.apache.maven.plugins";
36  
37      private String artifactId;
38  
39      private String version;
40  
41      private PlexusConfiguration configuration;
42  
43      private List<ReportSet> reportSets;
44      
45      private List<String> reports;
46  
47      public String getGroupId()
48      {
49          return this.groupId;
50      }
51  
52      public void setGroupId( String groupId )
53      {
54          this.groupId = groupId;
55      }
56  
57      public String getArtifactId()
58      {
59          return this.artifactId;
60      }
61  
62      public void setArtifactId( String artifactId )
63      {
64          this.artifactId = artifactId;
65      }
66  
67      public String getVersion()
68      {
69          return this.version;
70      }
71  
72      public void setVersion( String version )
73      {
74          this.version = version;
75      }
76  
77      public PlexusConfiguration getConfiguration()
78      {
79          return this.configuration;
80      }
81  
82      public void setConfiguration( PlexusConfiguration configuration )
83      {
84          this.configuration = configuration;
85      }
86  
87      public List<ReportSet> getReportSets()
88      {
89          if ( this.reportSets == null )
90          {
91              this.reportSets = new ArrayList<ReportSet>();
92          }
93  
94          return this.reportSets;
95      }
96  
97      public void setReportSets( List<ReportSet> reportSets )
98      {
99          this.reportSets = reportSets;
100     }
101 
102     public List<String> getReports()
103     {
104         return reports == null ? Collections.<String>emptyList() : reports;
105     }
106 
107     public void setReports( List<String> reports )
108     {
109         this.reports = reports;
110     }
111 }