提交 7708e9d7 编写于 作者: K Kohsuke Kawaguchi

i18n

上级 d28a589e
......@@ -204,9 +204,7 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
// or if Maven calls itself e.g. maven-release-plugin
MavenInstallation mvn = project.getParent().getMaven();
if (mvn == null)
throw new AbortException(
"A Maven installation needs to be available for this project to be built.\n"
+ "Either your server has no Maven installations defined, or the requested Maven version does not exist.");
throw new hudson.AbortException(Messages.MavenModuleSetBuild_NoMavenConfigured());
mvn = mvn.forEnvironment(envs).forNode(Computer.currentComputer().getNode(), log);
envs.put("M2_HOME", mvn.getHome());
envs.put("PATH+MAVEN", mvn.getHome() + "/bin");
......
......@@ -165,9 +165,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
// or if Maven calls itself e.g. maven-release-plugin
MavenInstallation mvn = project.getMaven();
if (mvn == null)
throw new AbortException(
"A Maven installation needs to be available for this project to be built.\n"
+ "Either your server has no Maven installations defined, or the requested Maven version does not exist.");
throw new AbortException(Messages.MavenModuleSetBuild_NoMavenConfigured());
mvn = mvn.forEnvironment(envs).forNode(
Computer.currentComputer().getNode(), log);
......@@ -573,8 +571,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
EnvVars envVars = getEnvironment(listener);
MavenInstallation mvn = project.getMaven();
if(mvn==null)
throw new AbortException("A Maven installation needs to be available for this project to be built.\n"+
"Either your server has no Maven installations defined, or the requested Maven version does not exist.");
throw new AbortException(Messages.MavenModuleSetBuild_NoMavenConfigured());
mvn = mvn.forEnvironment(envVars).forNode(Computer.currentComputer().getNode(), listener);
......@@ -664,7 +661,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
if ( maven3orLater )
{
LOGGER.info( "using maven 3 " + mavenVersion );
LOGGER.fine( "using maven 3 " + mavenVersion );
process =
MavenBuild.mavenProcessCache.get( launcher.getChannel(), slistener,
new Maven3ProcessFactory( project, launcher, envVars, getMavenOpts(listener),
......@@ -672,7 +669,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
}
else
{
LOGGER.info( "using maven 2 " + mavenVersion );
LOGGER.fine( "using maven 2 " + mavenVersion );
process =
MavenBuild.mavenProcessCache.get( launcher.getChannel(), slistener,
new MavenProcessFactory( project, launcher, envVars,getMavenOpts(listener),
......@@ -1252,7 +1249,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
}
if (debug)
{
logger.println("use settingsLoc " + settingsLoc + " , privateRepository " + privateRepository);
logger.println(Messages.MavenModuleSetBuild_SettinsgXmlAndPrivateRepository(settingsLoc,privateRepository));
}
if ((settingsLoc != null) && (!settingsLoc.exists())) {
throw new AbortException(Messages.MavenModuleSetBuild_NoSuchAlternateSettings(settingsLoc.getAbsolutePath()));
......@@ -1374,7 +1371,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
path = new File(mp.getBasedir(), modulePath+"/pom.xml");
MavenProject child = abslPath.get( path.getCanonicalPath());
if (child == null) {
listener.getLogger().printf("Found a module with path " + modulePath + " but no associated project");
listener.getLogger().printf(Messages.MavenModuleSetBuild_FoundModuleWithoutProject(modulePath));
continue;
}
toPomInfo(child,pi,abslPath,infos);
......@@ -1452,7 +1449,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
public void transferFailed( TransferEvent transferEvent )
{
taskListener.getLogger().println("failed to transfer " + transferEvent.getException().getMessage());
taskListener.getLogger().println(Messages.MavenModuleSetBuild_FailedToTransfer(transferEvent.getException().getMessage()));
}
public void transferInitiated( TransferEvent arg0 )
......@@ -1475,8 +1472,9 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
public void transferSucceeded( TransferEvent transferEvent )
{
taskListener.getLogger().println( "downloaded artifact " + transferEvent.getResource().getRepositoryUrl()
+ "/" + transferEvent.getResource().getResourceName() );
taskListener.getLogger().println( Messages.MavenModuleSetBuild_DownloadedArtifact(
transferEvent.getResource().getRepositoryUrl(),
transferEvent.getResource().getResourceName()) );
}
}
......
......@@ -58,9 +58,9 @@ public class MavenVersionCallable
if(!home.isDirectory())
{
if (home.exists())
throw new AbortException("Maven Home "+home+" is not a directory");
throw new AbortException(Messages.MavenVersionCallable_MavenHomeIsNotDirectory(home));
else
throw new AbortException("Maven Home "+home+" doesn't exist");
throw new AbortException(Messages.MavenVersionCallable_MavenHomeDoesntExist(home));
}
return MavenEmbedderUtils.getMavenVersion(home);
}
......
......@@ -34,16 +34,24 @@ MavenModuleSet.DiplayName=Build a maven2/3 project
MavenModuleSet.AlternateSettingsRelativePath=Alternate settings file must be a relative path.
MavenModuleSetBuild.DiscoveredModule=Discovered a new module {0} {1}
MavenModuleSetBuild.DownloadedArtifact=Downloaded artifact {0}/{1}
MavenModuleSetBuild.FailedToParsePom=Failed to parse POMs
MavenModuleSetBuild.FailedToTransfer=Failed to transfer {0}
MavenModuleSetBuild.FoundModuleWithoutProject=Found a module with path {0} but no associated project
MavenModuleSetBuild.NoMavenConfigured=A Maven installation needs to be available for this project to be built.\
Either your server has no Maven installations defined, or the requested Maven version does not exist.
MavenModuleSetBuild.NoSuchPOMFile=No such file {0}\nPerhaps you need to specify the correct POM file path in the project configuration?
MavenModuleSetBuild.NoSuchAlternateSettings=No such settings file {0} exists\nPlease verify that your alternate settings file is specified properly and exists in the workspace.
MavenModuleSetBuild.NoMavenInstall=A Maven installation needs to be available for this project to be built.\nEither your server has no Maven installations defined, or the requested Maven version does not exist.
MavenModuleSetBuild.SettinsgXmlAndPrivateRepository=Using settings.xml at {0} and private repository at {1}
MavenProbeAction.DisplayName=Monitor Maven Process
MavenProcessFactory.ClassWorldsNotFound=No classworlds*.jar found in {0} -- Is this a valid maven2/3 directory?
MavenRedeployer.DisplayName=Deploy to Maven repository
MavenVersionCallable.MavenHomeDoesntExist=Maven Home {0} doesn''t exist
MavenVersionCallable.MavenHomeIsNotDirectory=Maven Home {0} is not a directory
ProcessCache.Reusing=Reusing existing maven process
RedeployPublisher.getDisplayName=Deploy artifacts to Maven repository
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册