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.settings;
20
21 import java.io.File;
22 import java.io.IOException;
23
24 import org.apache.maven.execution.MavenExecutionRequest;
25 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
26
27 /**
28 */
29 @Deprecated
30 public interface MavenSettingsBuilder {
31
32 String ROLE = MavenSettingsBuilder.class.getName();
33
34 String ALT_USER_SETTINGS_XML_LOCATION = "org.apache.maven.user-settings";
35 String ALT_GLOBAL_SETTINGS_XML_LOCATION = "org.apache.maven.global-settings";
36 String ALT_LOCAL_REPOSITORY_LOCATION = "maven.repo.local";
37
38 Settings buildSettings(MavenExecutionRequest request) throws IOException, XmlPullParserException;
39
40 /**
41 * @return a <code>Settings</code> object from the user settings file.
42 * @throws IOException if any
43 * @throws XmlPullParserException if any
44 */
45 Settings buildSettings() throws IOException, XmlPullParserException;
46
47 /**
48 * @param useCachedSettings if true, doesn't reload the user settings
49 * @return a <code>Settings</code> object from the user settings file.
50 * @throws IOException if any
51 * @throws XmlPullParserException if any
52 */
53 Settings buildSettings(boolean useCachedSettings) throws IOException, XmlPullParserException;
54
55 /**
56 * @param userSettingsFile a given user settings file
57 * @return a <code>Settings</code> object from the user settings file.
58 * @throws IOException if any
59 * @throws XmlPullParserException if any
60 */
61 Settings buildSettings(File userSettingsFile) throws IOException, XmlPullParserException;
62
63 /**
64 * @param userSettingsFile a given user settings file
65 * @param useCachedSettings if true, doesn't reload the user settings
66 * @return a <code>Settings</code> object from the user settings file.
67 * @throws IOException if any
68 * @throws XmlPullParserException if any
69 */
70 Settings buildSettings(File userSettingsFile, boolean useCachedSettings) throws IOException, XmlPullParserException;
71 }