View Javadoc

1   /**
2    * The Maven License Verifier Plugin
3    *
4    * Copyright (c) 2009, 2010, 2011 by SoftwareEntwicklung Beratung Schulung (SoEBeS)
5    * Copyright (c) 2009, 2010, 2011 by Karl Heinz Marbaise
6    *
7    * Licensed to the Apache Software Foundation (ASF) under one or more
8    * contributor license agreements.  See the NOTICE file distributed with
9    * this work for additional information regarding copyright ownership.
10   * The ASF licenses this file to You under the Apache License, Version 2.0
11   * (the "License"); you may not use this file except in compliance with
12   * the License.  You may obtain a copy of the License at
13   *
14   *    http://www.apache.org/licenses/LICENSE-2.0
15   *
16   * Unless required by applicable law or agreed to in writing, software
17   * distributed under the License is distributed on an "AS IS" BASIS,
18   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   * See the License for the specific language governing permissions and
20   * limitations under the License.
21   */
22  package com.soebes.maven.plugins.mlv;
23  
24  import java.util.ArrayList;
25  
26  import org.apache.maven.artifact.Artifact;
27  import org.apache.maven.model.License;
28  import org.apache.maven.project.MavenProject;
29  
30  /**
31   * This class will hold together the information about <b>Project</b>,
32   * <b>artifact</b> and the <b>Licenses</b>.
33   *
34   * @author <a href="mailto:kama@soebes.de">Karl Heinz Marbaise</a>
35   *
36   */
37  public class LicenseInformation {
38  
39      private Artifact artifact;
40      private MavenProject project;
41      private ArrayList<License> licenses = new ArrayList<License>();
42  
43      public void setArtifact(Artifact artifact) {
44          this.artifact = artifact;
45      }
46  
47      public Artifact getArtifact() {
48          return artifact;
49      }
50  
51      public void setLicenses(ArrayList<License> licenses) {
52          this.licenses = licenses;
53      }
54  
55      public ArrayList<License> getLicenses() {
56          return licenses;
57      }
58  
59      public void addLicense(License license) {
60          getLicenses().add(license);
61      }
62  
63      public void setProject(MavenProject project) {
64          this.project = project;
65      }
66  
67      public MavenProject getProject() {
68          return project;
69      }
70  }