View Javadoc

1   /**
2    * Copyright 1&1 Internet AG, https://github.com/1and1/
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package net.oneandone.maven.plugins.attachqars;
17  
18  /**
19   * Enum of files to attach.
20   * @author Mirko Friedenhagen
21   */
22  public enum FileToClassifiers {
23      /** Checkstyle. */
24      Checkstyle("checkstyle-result.xml", "checkstyle-report"), 
25      /** PMD. */
26      Pmd("pmd.xml", "pmd-report"),
27      /** CPD. */
28      Cpd("cpd.xml", "cpd-report"),
29      /** Findbugs. */
30      Findbugs("findbugsXml.xml", "findbugs-report"),
31      /** Jacoco. */
32      Jacoco("site/jacoco/jacoco.xml", "jacoco-report"),
33      /** Jacoco integration test results. */
34      JacocoIt("site/jacoco-it/jacoco.xml", "jacoco-it-report");
35  
36      /**
37       * Filename relative to target.
38       */
39      private final String fileName;
40  
41      /**
42       * Classifier for attachment.
43       */
44      private final String classifier;
45  
46      /**
47       * @param fileName to attach.
48       * @param classifier of attachment.
49       */
50      private FileToClassifiers(String fileName, String classifier) {
51          this.fileName = fileName;
52          this.classifier = classifier;
53      }
54  
55      /**
56       * @return the fileName
57       */
58      String getFileName() {
59          return fileName;
60      }
61  
62      /**
63       * @return the classifier
64       */
65      String getClassifier() {
66          return classifier;
67      }
68  
69  }