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