View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.project;
20  
21  import java.util.Date;
22  import java.util.Properties;
23  
24  import org.apache.maven.artifact.repository.ArtifactRepository;
25  import org.apache.maven.profiles.ProfileManager;
26  
27  /**
28   * DefaultProjectBuilderConfiguration
29   */
30  @Deprecated
31  public class DefaultProjectBuilderConfiguration implements ProjectBuilderConfiguration {
32  
33      private ProfileManager globalProfileManager;
34  
35      private ArtifactRepository localRepository;
36  
37      private Properties userProperties;
38  
39      private Properties executionProperties = System.getProperties();
40  
41      private Date buildStartTime;
42  
43      public DefaultProjectBuilderConfiguration() {}
44  
45      @Override
46      public ProjectBuilderConfiguration setGlobalProfileManager(ProfileManager globalProfileManager) {
47          this.globalProfileManager = globalProfileManager;
48          return this;
49      }
50  
51      @Override
52      public ProfileManager getGlobalProfileManager() {
53          return globalProfileManager;
54      }
55  
56      @Override
57      public ProjectBuilderConfiguration setLocalRepository(ArtifactRepository localRepository) {
58          this.localRepository = localRepository;
59          return this;
60      }
61  
62      @Override
63      public ArtifactRepository getLocalRepository() {
64          return localRepository;
65      }
66  
67      @Override
68      public ProjectBuilderConfiguration setUserProperties(Properties userProperties) {
69          this.userProperties = userProperties;
70          return this;
71      }
72  
73      @Override
74      public Properties getUserProperties() {
75          if (userProperties == null) {
76              userProperties = new Properties();
77          }
78  
79          return userProperties;
80      }
81  
82      @Override
83      public Properties getExecutionProperties() {
84          return executionProperties;
85      }
86  
87      @Override
88      public ProjectBuilderConfiguration setExecutionProperties(Properties executionProperties) {
89          this.executionProperties = executionProperties;
90          return this;
91      }
92  
93      @Override
94      public Date getBuildStartTime() {
95          return buildStartTime;
96      }
97  
98      @Override
99      public ProjectBuilderConfiguration setBuildStartTime(Date buildStartTime) {
100         this.buildStartTime = buildStartTime;
101         return this;
102     }
103 }