View Javadoc

1   package org.apache.maven.plugin.dependency.fromConfiguration;
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  /**
23   * @author Olivier Lamy
24   * @since 2.7
25   */
26  public class ProcessArtifactItemsRequest
27  {
28      /**
29       * remove the version from the filename.
30       */
31      private boolean removeVersion;
32  
33      /** 
34       * remove the classifier from the filename.
35       */
36      private boolean removeClassifier;
37      
38      /**
39       * prepend the groupId to the filename.
40       */
41      private boolean prependGroupId;
42  
43      /**
44       * use the baseVersion of the artifact instead of version for the filename.
45       */
46      private boolean useBaseVersion;
47  
48      public ProcessArtifactItemsRequest()
49      {
50          // no op
51      }
52  
53      public ProcessArtifactItemsRequest( boolean removeVersion, boolean prependGroupId, boolean useBaseVersion, boolean removeClassifier )
54      {
55          this.removeVersion = removeVersion;
56          this.prependGroupId = prependGroupId;
57          this.useBaseVersion = useBaseVersion;
58          this.removeClassifier = removeClassifier;
59      }
60  
61      public boolean isRemoveVersion()
62      {
63          return removeVersion;
64      }
65  
66      public void setRemoveVersion( boolean removeVersion )
67      {
68          this.removeVersion = removeVersion;
69      }
70  
71      public boolean isRemoveClassifier()
72      {
73          return removeClassifier;
74      }
75  
76      public void setRemoveClassifier( boolean removeClassifier )
77      {
78          this.removeClassifier = removeClassifier;
79      }
80  
81      
82      public ProcessArtifactItemsRequest removeVersion( boolean removeVersion )
83      {
84          this.removeVersion = removeVersion;
85          return this;
86      }
87  
88      public boolean isPrependGroupId()
89      {
90          return prependGroupId;
91      }
92  
93      public void setPrependGroupId( boolean prependGroupId )
94      {
95          this.prependGroupId = prependGroupId;
96      }
97  
98      public ProcessArtifactItemsRequest prependGroupId( boolean prependGroupId )
99      {
100         this.prependGroupId = prependGroupId;
101         return this;
102     }
103 
104     public boolean isUseBaseVersion()
105     {
106         return useBaseVersion;
107     }
108 
109     public void setUseBaseVersion( boolean useBaseVersion )
110     {
111         this.useBaseVersion = useBaseVersion;
112     }
113 
114     public ProcessArtifactItemsRequest useBaseVersion( boolean useBaseVersion )
115     {
116         this.useBaseVersion = useBaseVersion;
117         return this;
118     }
119 }