提交 c206626f 编写于 作者: I imod

cleanup

上级 2a35bf4d
......@@ -28,7 +28,7 @@ public class DefaultGlobalSettingsProvider extends GlobalSettingsProvider {
@Override
public String getDisplayName() {
return "Use default maven global settings";
return Messages.DefaultGlobalSettingsProvider_DisplayName();
}
}
}
......@@ -9,6 +9,7 @@ import org.kohsuke.stapler.DataBoundConstructor;
/**
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
* @author Dominik Bartholdi (imod)
* @since 1.490
*/
public class DefaultSettingsProvider extends SettingsProvider {
......@@ -27,7 +28,7 @@ public class DefaultSettingsProvider extends SettingsProvider {
@Override
public String getDisplayName() {
return "Use default maven settings";
return Messages.DefaultSettingsProvider_DisplayName();
}
}
}
......@@ -57,7 +57,7 @@ public abstract class GlobalSettingsProvider extends AbstractDescribableImpl<Glo
listener.getLogger().print("failed to get the path to the alternate global settings.xml");
}
}
return settingsPath == null ? null : settingsPath;
return settingsPath;
}
/**
......
......@@ -52,7 +52,7 @@ public abstract class SettingsProvider extends AbstractDescribableImpl<SettingsP
if (settings != null) {
settingsPath = settings.supplySettings(build, listener);
}
return settingsPath == null ? null : settingsPath;
return settingsPath;
}
/**
......
<div>
Path to settings.xml file, relative to project workspace.
Path to settings.xml file, relative to project workspace or absolute (variables are supported).
</div>
\ No newline at end of file
<div>
Use a custom <tt>setting.xml</tt> file from job workspace. Such a file is checked out from SCM as part of the job
Use a custom global <tt>setting.xml</tt> file from job workspace. Such a file is checked out from SCM as part of the job or a well known location.
</div>
\ No newline at end of file
<div>
Path to settings.xml file, relative to project workspace.
Path to settings.xml file, relative to project workspace or absolute (variables are supported).
</div>
\ No newline at end of file
<div>
Use a custom <tt>setting.xml</tt> file from job workspace. Such a file is checked out from SCM as part of the job
Use a custom <tt>setting.xml</tt> file. Such a file is checked out from SCM as part of the job or a well known location.
</div>
\ No newline at end of file
# The MIT License
#
# Copyright 2012 Dominik Bartholdi
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
DefaultSettingsProvider.DisplayName=Use default maven settings
DefaultGlobalSettingsProvider.DisplayName=Use default maven global settings
FilePathGlobalSettingsProvider.DisplayName=Global settings file on filesystem
FilePathSettingsProvider.DisplayName=Settings file in filesystem
......@@ -561,7 +561,6 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
Result r = null;
PrintStream logger = listener.getLogger();
FilePath remoteSettings = null, remoteGlobalSettings = null;
try {
......@@ -582,9 +581,6 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
LOGGER.fine(getFullDisplayName()+" is building with mavenVersion " + mavenVersion + " from file " + mavenInformation.getVersionResourcePath());
remoteSettings = SettingsProvider.getSettingsFilePath(project.getSettings(), MavenModuleSetBuild.this, listener);
remoteGlobalSettings = GlobalSettingsProvider.getSettingsFilePath(project.getGlobalSettings(), MavenModuleSetBuild.this, listener);
if(!project.isAggregatorStyleBuild()) {
parsePoms(listener, logger, envVars, mvn, mavenVersion);
// start module builds
......@@ -689,9 +685,11 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
if(localRepo!=null)
margs.add("-Dmaven.repo.local="+localRepo.getRemote());
FilePath remoteSettings = SettingsProvider.getSettingsFilePath(project.getSettings(), MavenModuleSetBuild.this, listener);
if (remoteSettings != null)
margs.add("-s" , remoteSettings.getRemote());
FilePath remoteGlobalSettings = GlobalSettingsProvider.getSettingsFilePath(project.getGlobalSettings(), MavenModuleSetBuild.this, listener);
if (remoteGlobalSettings != null)
margs.add("-gs" , remoteGlobalSettings.getRemote());
......@@ -804,14 +802,6 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
logger.println("project.getRootModule()="+project.getRootModule());
throw e;
} finally {
// delete tmp files used for MavenSettingsProvider
// TODO implement a hook to let SettingsProvider have the decision whether a settings.xml must be deleted
// if (remoteSettings != null) {
// remoteSettings.delete();
// }
// if (remoteGlobalSettings != null ) {
// remoteGlobalSettings.delete();
// }
}
}
......
......@@ -51,7 +51,7 @@ public class PluginImpl extends Plugin {
@Initializer(after=InitMilestone.PLUGINS_STARTED)
public static void init(){
// inform the admin if there is a version of the config file provider installed which is not compatible
PluginUpdateMonitor.getInstance().ifPluginOlderThenReport("config-file-provider", "2.2.2", Messages.PluginImpl_updateConfiProvider());
PluginUpdateMonitor.getInstance().ifPluginOlderThenReport("config-file-provider", "2.3", Messages.PluginImpl_updateConfiProvider());
}
}
......@@ -56,7 +56,6 @@ import jenkins.mvn.GlobalSettingsProvider;
import jenkins.mvn.SettingsProvider;
import net.sf.json.JSONObject;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
......@@ -281,7 +280,6 @@ public class RedeployPublisher extends Recorder {
if (tmpSettings != null) {
tmpSettings.delete();
}
// TODO implement hook to delete files after build
}
}
......
......@@ -35,7 +35,7 @@ MavenModuleSet.AlternateSettingsRelativePath=Alternate settings file must be a r
MavenModuleSet.readResolve_missingConfigProvider=ERROR: 'config-file-provider' is not installed or disabled, therefore the config can't be fully loaded!!
MavenModuleSet.readResolve_updateConfigProvider=ERROR: Please update the 'config-file-provider' plugin, the current version is not supported anymore! (id={0})
PluginImpl.updateConfiProvider=The current installed version of 'config-file-provider' is not compatible with this core anymore (requires > 2.2.1)
PluginImpl.updateConfiProvider=The current installed version of 'config-file-provider' is not compatible with this core anymore (requires >= 2.3)
MavenModuleSetBuild.DiscoveredModule=Discovered a new module {0} {1}
MavenModuleSetBuild.DownloadedArtifact=Downloaded artifact {0}/{1}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册