View Javadoc
1   package org.apache.maven.wrapper;
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.net.URI;
23  
24  /**
25   * Wrapper configuration.
26   */
27  public class WrapperConfiguration
28  {
29      public static final String ALWAYS_UNPACK_ENV = "MAVEN_WRAPPER_ALWAYS_UNPACK";
30  
31      public static final String ALWAYS_DOWNLOAD_ENV = "MAVEN_WRAPPER_ALWAYS_DOWNLOAD";
32  
33      private boolean alwaysUnpack = Boolean.parseBoolean( System.getenv( ALWAYS_UNPACK_ENV ) );
34  
35      private boolean alwaysDownload = Boolean.parseBoolean( System.getenv( ALWAYS_DOWNLOAD_ENV ) );
36  
37      private URI distribution;
38  
39      private String distributionBase = PathAssembler.MAVEN_USER_HOME_STRING;
40  
41      private String distributionPath = Installer.DEFAULT_DISTRIBUTION_PATH;
42  
43      private String zipBase = PathAssembler.MAVEN_USER_HOME_STRING;
44  
45      private String zipPath = Installer.DEFAULT_DISTRIBUTION_PATH;
46  
47      public boolean isAlwaysDownload()
48      {
49          return alwaysDownload;
50      }
51  
52      public void setAlwaysDownload( boolean alwaysDownload )
53      {
54          this.alwaysDownload = alwaysDownload;
55      }
56  
57      public boolean isAlwaysUnpack()
58      {
59          return alwaysUnpack;
60      }
61  
62      public void setAlwaysUnpack( boolean alwaysUnpack )
63      {
64          this.alwaysUnpack = alwaysUnpack;
65      }
66  
67      public URI getDistribution()
68      {
69          return distribution;
70      }
71  
72      public void setDistribution( URI distribution )
73      {
74          this.distribution = distribution;
75      }
76  
77      public String getDistributionBase()
78      {
79          return distributionBase;
80      }
81  
82      public void setDistributionBase( String distributionBase )
83      {
84          this.distributionBase = distributionBase;
85      }
86  
87      public String getDistributionPath()
88      {
89          return distributionPath;
90      }
91  
92      public void setDistributionPath( String distributionPath )
93      {
94          this.distributionPath = distributionPath;
95      }
96  
97      public String getZipBase()
98      {
99          return zipBase;
100     }
101 
102     public void setZipBase( String zipBase )
103     {
104         this.zipBase = zipBase;
105     }
106 
107     public String getZipPath()
108     {
109         return zipPath;
110     }
111 
112     public void setZipPath( String zipPath )
113     {
114         this.zipPath = zipPath;
115     }
116 }