提交 92b5b38f 编写于 作者: K Kohsuke Kawaguchi

follow up changes for splitting off Mailer into a separate plugin

上级 ea39951a
/*
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc.
*
* 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.
*/
package hudson.cli;
import hudson.tasks.Mailer;
import hudson.Extension;
import jenkins.model.Jenkins;
import hudson.model.Item;
import javax.mail.internet.MimeMessage;
import javax.mail.Transport;
/**
* Sends e-mail through Hudson.
*
* <p>
* Various platforms have different commands to do this, so on heterogenous platform, doing this via Hudson is easier.
*
* @author Kohsuke Kawaguchi
*/
@Extension
public class MailCommand extends CLICommand {
public String getShortDescription() {
return Messages.MailCommand_ShortDescription();
}
protected int run() throws Exception {
Jenkins.getInstance().checkPermission(Item.CONFIGURE);
Transport.send(new MimeMessage(Mailer.descriptor().createSession(),stdin));
return 0;
}
}
......@@ -30,8 +30,8 @@ import static hudson.init.InitMilestone.PLUGINS_PREPARED;
import hudson.model.AbstractModelObject;
import jenkins.model.Jenkins;
import hudson.model.RSS;
import hudson.tasks.Mailer;
import hudson.util.CopyOnWriteMap;
import jenkins.model.JenkinsLocationConfiguration;
import org.apache.commons.io.filefilter.WildcardFileFilter;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
......@@ -171,7 +171,7 @@ public class LogRecorderManager extends AbstractModelObject {
}
public String getEntryAuthor(LogRecord entry) {
return Mailer.descriptor().getAdminAddress();
return JenkinsLocationConfiguration.get().getAdminAddress();
}
},req,rsp);
}
......
......@@ -69,7 +69,6 @@ import hudson.tasks.BuildStep;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.BuildTrigger;
import hudson.tasks.BuildWrapperDescriptor;
import hudson.tasks.Mailer;
import hudson.tasks.Publisher;
import hudson.triggers.SCMTrigger;
import hudson.triggers.Trigger;
......@@ -82,12 +81,14 @@ import hudson.util.FormValidation;
import hudson.widgets.BuildHistoryWidget;
import hudson.widgets.HistoryWidget;
import jenkins.model.Jenkins;
import jenkins.model.JenkinsLocationConfiguration;
import jenkins.model.lazy.AbstractLazyLoadRunMap.Direction;
import jenkins.scm.DefaultSCMCheckoutStrategyImpl;
import jenkins.scm.SCMCheckoutStrategy;
import jenkins.scm.SCMCheckoutStrategyDescriptor;
import jenkins.util.TimeDuration;
import net.sf.json.JSONObject;
import org.apache.tools.ant.taskdefs.email.Mailer;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.args4j.Argument;
......@@ -2008,7 +2009,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
}
public String getEntryAuthor(FeedItem entry) {
return Mailer.descriptor().getAdminAddress();
return JenkinsLocationConfiguration.get().getAdminAddress();
}
},
req, rsp );
......
......@@ -809,7 +809,7 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
}
}
private XmlFile getConfigFile() {
protected final XmlFile getConfigFile() {
return new XmlFile(new File(Jenkins.getInstance().getRootDir(),getId()+".xml"));
}
......
......@@ -50,7 +50,6 @@ import hudson.security.AccessControlled;
import hudson.security.Permission;
import hudson.security.PermissionGroup;
import hudson.tasks.LogRotator;
import hudson.tasks.Mailer;
import hudson.tasks.BuildWrapper;
import hudson.tasks.BuildStep;
import hudson.tasks.test.AbstractTestResultAction;
......@@ -96,11 +95,13 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import jenkins.model.Jenkins;
import jenkins.model.JenkinsLocationConfiguration;
import jenkins.util.io.OnMaster;
import net.sf.json.JSONObject;
import org.apache.commons.io.input.NullInputStream;
import org.apache.commons.io.IOUtils;
import org.apache.commons.jelly.XMLOutput;
import org.apache.tools.ant.taskdefs.email.Mailer;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.*;
......@@ -2149,7 +2150,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
}
public String getEntryAuthor(Run entry) {
return Mailer.descriptor().getAdminAddress();
return JenkinsLocationConfiguration.get().getAdminAddress();
}
}
......
......@@ -5,7 +5,6 @@ import hudson.FilePath;
import hudson.cli.CLICommand;
import jenkins.model.Jenkins;
import hudson.remoting.Callable;
import hudson.tasks.MailAddressResolver;
import hudson.util.spring.BeanBuilder;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationException;
......@@ -93,7 +92,7 @@ public abstract class AbstractPasswordBasedSecurityRealm extends SecurityRealm i
* return it as a {@link UserDetails} object. {@link org.acegisecurity.userdetails.User} is a convenient
* implementation to use, but if your backend offers additional data, you may want to use your own subtype
* so that the rest of Hudson can use those additional information (such as e-mail address --- see
* {@link MailAddressResolver}.)
* MailAddressResolver.)
*
* <p>
* Properties like {@link UserDetails#getPassword()} make no sense, so just return an empty value from it.
......
......@@ -36,7 +36,6 @@ import hudson.model.UserProperty;
import hudson.model.UserPropertyDescriptor;
import hudson.security.FederatedLoginService.FederatedIdentity;
import hudson.security.captcha.CaptchaSupport;
import hudson.tasks.Mailer;
import hudson.util.PluginServletFilter;
import hudson.util.Protector;
import hudson.util.Scrambler;
......@@ -52,6 +51,7 @@ import org.acegisecurity.providers.encoding.PasswordEncoder;
import org.acegisecurity.providers.encoding.ShaPasswordEncoder;
import org.acegisecurity.userdetails.UserDetails;
import org.acegisecurity.userdetails.UsernameNotFoundException;
import org.apache.tools.ant.taskdefs.email.Mailer;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.ForwardToView;
import org.kohsuke.stapler.HttpResponse;
......@@ -72,10 +72,14 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* {@link SecurityRealm} that performs authentication by looking up {@link User}.
......@@ -323,8 +327,17 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
// register the user
User user = createAccount(si.username,si.password1);
user.addProperty(new Mailer.UserProperty(si.email));
user.setFullName(si.fullname);
try {
// legacy hack. mail support has moved out to a separate plugin
Class<?> up = Jenkins.getInstance().pluginManager.uberClassLoader.loadClass("hudson.tasks.Mailer.UserProperty");
Constructor<?> c = up.getDeclaredConstructor(String.class);
user.addProperty((UserProperty)c.newInstance(si.email));
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Failed to set the e-mail address",e);
}
user.save();
return user;
}
......@@ -689,4 +702,6 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
public void destroy() {
}
};
private static final Logger LOGGER = Logger.getLogger(HudsonPrivateSecurityRealm.class.getName());
}
......@@ -160,7 +160,6 @@ import hudson.slaves.OfflineCause;
import hudson.slaves.RetentionStrategy;
import hudson.tasks.BuildWrapper;
import hudson.tasks.Builder;
import hudson.tasks.Mailer;
import hudson.tasks.Publisher;
import hudson.triggers.SafeTimerTask;
import hudson.triggers.Trigger;
......@@ -1833,7 +1832,7 @@ public class Jenkins extends AbstractCIBase implements ModifiableTopLevelItemGro
*/
public String getRootUrl() {
// for compatibility. the actual data is stored in Mailer
String url = Mailer.descriptor().getUrl();
String url = JenkinsLocationConfiguration.get().getUrl();
if(url!=null) {
if (!url.endsWith("/")) url += '/';
return url;
......
package jenkins.model;
import hudson.Extension;
import hudson.XmlFile;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Stores the location of Jenkins (e-mail address and the HTTP URL.)
*
* @author Kohsuke Kawaguchi
*/
@Extension
public class JenkinsLocationConfiguration extends GlobalConfiguration {
/**
* @deprecated
*/
private transient String hudsonUrl;
private String adminAddress;
private String jenkinsUrl;
public static JenkinsLocationConfiguration get() {
return GlobalConfiguration.all().get(JenkinsLocationConfiguration.class);
}
@Override
public synchronized void load() {
// for backward compatibility, if we don't have our own data yet, then
// load from Mailer.
XmlFile file = getConfigFile();
if(!file.exists()) {
file = new XmlFile(new File(Jenkins.getInstance().getRootDir(),"hudson.tasks.Mailer.xml"));
if (file.exists()) {
try {
file.unmarshal(this);
if (jenkinsUrl==null)
jenkinsUrl = hudsonUrl;
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Failed to load "+file, e);
}
}
} else {
super.load();
}
}
public String getAdminAddress() {
return adminAddress;
}
public void setAdminAddress(String adminAddress) {
this.adminAddress = adminAddress;
save();
}
public String getUrl() {
return hudsonUrl;
}
public void setUrl(String hudsonUrl) {
this.hudsonUrl = hudsonUrl;
save();
}
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
req.bindJSON(this,json);
return true;
}
private static final Logger LOGGER = Logger.getLogger(JenkinsLocationConfiguration.class.getName());
}
package jenkins.model.JenkinsLocationConfiguration
import hudson.Functions
def f=namespace(lib.FormTagLib)
f.section(title:_("Jenkins Location")) {
f.entry(title:_("Jenkins URL"), field:"url") {
f.textbox(default: Functions.inferHudsonURL(request))
}
f.entry(title:_("System Admin e-mail address"), field:"adminAddress") {
f.textbox()
}
}
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen.
#
# 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.
System\ Admin\ E-mail\ Address=Systemadministratorens E-mail adresse
Jenkins\ URL=Jenkins URL
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Simon Wiest
#
# 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.
System\ Admin\ E-mail\ Address=E-Mail-Adresse des Systemadministrators
Jenkins\ URL=Jenkins URL
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc.
#
# 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.
Jenkins\ URL=Dirección web de Jenkins
Sender\ E-mail\ Address=Dirección de remitente
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant
#
# 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.
System\ Admin\ E-mail\ Address=Adresse email de l''administrateur syst\u00cbme
Jenkins\ URL=URL de Jenkins
# The MIT License
#
# Copyright (c) 2004-2012, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
#
# 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.
E-mail\ Notification=E-mail \u901a\u77e5
SMTP\ server=SMTP\u30b5\u30fc\u30d0\u30fc
Default\ user\ e-mail\ suffix=E-mail\u306e\u30b5\u30d5\u30a3\u30c3\u30af\u30b9
Sender\ E-mail\ Address=\u9001\u4fe1\u5143\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9
Jenkins\ URL=Jenkins URL
Use\ SMTP\ Authentication=SMTP\u8a8d\u8a3c
User\ Name=\u30e6\u30fc\u30b6\u30fc\u540d
Password=\u30d1\u30b9\u30ef\u30fc\u30c9
Use\ SSL=SSL
SMTP\ Port=SMTP\u30dd\u30fc\u30c8
Charset=\u6587\u5b57\u30bb\u30c3\u30c8
Reply-To\ Address=\u8fd4\u4fe1\u5148\u30a2\u30c9\u30ec\u30b9
Test\ configuration\ by\ sending\ test\ e-mail=\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u3066\u8a2d\u5b9a\u3092\u78ba\u8a8d
Test\ e-mail\ recipient=\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\u306e\u5b9b\u5148
Test\ configuration=\u8a2d\u5b9a\u3092\u78ba\u8a8d
\ No newline at end of file
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:sorokh
#
# 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.
System\ Admin\ E-mail\ Address=E-mail systeemadministrator
Jenkins\ URL=Jenkins URL
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Reginaldo L. Russinholi, Cleiber Silva
#
# 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.
System\ Admin\ E-mail\ Address=Endere\u00e7o de E-mail do Administrador do Sistema
Jenkins\ URL=URL do Jenkins
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Mike Salnikov
#
# 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.
System\ Admin\ E-mail\ Address=\u0410\u0434\u0440\u0435\u0441 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430
Jenkins\ URL=Jenkins URL
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Oguz Dag
#
# 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.
System\ Admin\ E-mail\ Address=Sistem\ Admin\ e-posta\ Adresi
Jenkins\ URL=Jenkins\ URL'i
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc.
#
# 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.
System\ Admin\ E-mail\ Address=\u7cfb\u7edf\u7ba1\u7406\u5458\u90ae\u4ef6\u5730\u5740
Jenkins\ URL=Jenkins URL
<div>
Notification e-mails from Jenkins to project owners will be sent
with this address in the from header. This can be just
"foo@acme.org" or it could be something like "Jenkins Daemon &lt;foo@acme.org>"
</div>
<div>
Jenkins schickt E-Mail-Benachrichtigungen an Projekteigner unter dieser Adresse
im "From"-Header.
<p>
Sie können einfach nur "foo@acme.org" angeben, aber auch etwas in
der Richtung wie "Jenkins Daemon &lt;foo@acme.org&gt;"
</div>
<div>
Les emails de notification envoyés par Jenkins aux propriétaires des
projets seront envoyés avec cette adresse dans le champ expéditeur.
Cela peut être simplement "foo@acme.org" ou quelque chose comme
"Jenkins Daemon &lt;foo@acme.org>"
</div>
<div>
Jenkinsからプロジェクト管理者へのE-mail通知は、Fromヘッダにこのアドレスを設定して送信されます。<br>
"foo@acme.org"や、"Jenkins Daemon &lt;foo@acme.org>"のような形式で設定します。
</div>
<div>
Notificatie e-mails van Jenkins zullen met dit "van" adres verstuurd worden.
Dit kan gewoon "foo@acme.org" of zelfs "Jenkins Daemon &lt;foo@acme.org>" zijn.
</div>
<div>
E-mails de notifica&#231;&#227;o do Jenkins para os propriet&#225;rios do projeto ser&#227;o enviados
com este endere&#231;o no remetente. Pode ser apenas
"foo@acme.org" ou poderia ser algo como "Servidor Jenkins &lt;foo@acme.org>"
</div>
<div>
Уведомления от Jenkins адресатам проекта будут отправлены с этим адресом в поле From.
Это может быть просто "user@domain.com" или что-то более осмысленное, например,
"Jenkins Daemon &lt;daemon@myjenkinsserver.domain.org>".
</div>
<div>
Proje sahiplerine, bilgilendirmeler burada yazan mail adresi ile
g&#246;nderilecektir. "foo@acme.org" veya "Jenkins Daemon &lt;foo@acme.org&gt;"
&#351;eklinde adresler yaz&#305;labilir.
</div>
<div>
Jenkins将用这个地址发送通知邮件给项目拥有者.这里可以填写"foo@acme.org"或者像"Jenkins Daemon &lt;foo@acme.org>"形式的内容.
</div>
<div>
Optionally specify the HTTP address of the Jenkins installation, such
as <tt>http://yourhost.yourdomain/jenkins/</tt>. This value is used to
let Jenkins know how to refer to itself, ie. to display images or to
create links in emails.
<p>
This is necessary because Jenkins cannot reliably detect such a URL
from within itself.
</div>
<div>
Optional: Geben Sie hier die HTTP-Adresse der Jenkins-Instanz an, z.B:
<tt>http://yourhost.yourdomain/jenkins/</tt>. Dieser Wert wird verwendet,
um Links in E-Mail-Benachrichtigungen einzufügen.
<p>
Dies ist notwendig, weil Jenkins nicht zuverlässig seine eigene URL
feststellen kann.
</div>
<div>
Spécifie optionnellement l'adresse HTTP de l'installation de Jenkins,
comme <tt>http://yourhost.yourdomain/jenkins/</tt>.
Cette valeur est utilisée pour mettre des liens dans les emails envoyés
par Jenkins.
<p>
Cela est nécessaire parce que Jenkins ne peut pas détecter de façon
fiable sa propre URL.
</div>
<div>
JenkinsのURLアドレスを指定(任意)します(例 <tt>http://yourhost.yourdomain/jenkins/</tt>)。
この値を使用して、Jenkinsが送信するE-mailにリンクを記述します。
<p>
この値は、Jenkins自身ではURLを確実に検出できないため必要です。
</div>
<div>
Optioneel u kunt het HTTP adres van uw Jenkins instantie
(v.b. <tt>http://uwnode.uwdomein/jenkins/</tt>) opgeven. Deze waarde
zal gebruikt worden voor het genereren van webreferenties in de e-mails die
Jenkins uitstuurt.
<p>
Dit is nodig omdat Jenkins niet op een betrouwbare manier z'n eigen URL kan
detecteren.
</div>
<div>
Opcionalmente, especifique o endere&#231;o HTTP da instala&#231;&#227;o do Jenkins, tal
como <tt>http://seuhost.seudominio/jenkins/</tt>. Este valor &#233; usado para
por links nos e-mails gerados pelo Jenkins.
<p>
Isto &#233; necess&#225;rio porque o Jenkins n&#227;o pode resolver tal URL
de dentre dele mesmo.
</div>
<div>
Укажите адрес текущей инсталляции Jenkins в виде <tt>http://yourhost.yourdomain:8080/jenkins/</tt>.
Это значение бодет использоваться для генерации ссылок из сообщений в
Jenkins. (опционально)
<p>
Это требуется потому, что сам Jenkins не может достоверно определить свой URL.
</div>
<div>
Jenkins kurulumunuzun HTTP adresini, <tt>http://yourhost.yourdomain/jenkins/</tt>
&#351;eklinde burada belirtebilirsiniz, b&#246;ylelikle e-posta i&#231;erisinde Jenkins ile ilgili
linkler bu URL yard&#305;m&#305; ile olu&#351;turulacakt&#305;r.
<p>
Jenkins, kendi URL'ini g&#252;venilir bir &#351;ekilde tespit edemeyece&#287;i i&#231;in, bu k&#305;sm&#305; doldurman&#305;z
gereklidir.
</div>
<div>
此项是可选的,指定安装Jenkins的HTTP地址,例如<tt>http://yourhost.yourdomain/jenkins/</tt>.
这个值用来在邮件中生产Jenkins链接.
<p>
此项是有必要的,因为Jenkins无法探测到自己的URL地址.
</div>
......@@ -66,6 +66,11 @@ THE SOFTWARE.
<artifactId>javadoc</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
......
......@@ -61,7 +61,6 @@ import hudson.tasks.BuildWrapper;
import hudson.tasks.BuildWrappers;
import hudson.tasks.Builder;
import hudson.tasks.Fingerprinter;
import hudson.tasks.Mailer;
import hudson.tasks.Maven;
import hudson.tasks.Maven.MavenInstallation;
import hudson.tasks.Publisher;
......@@ -103,6 +102,7 @@ import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.tools.ant.taskdefs.email.Mailer;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.HttpResponses;
import org.kohsuke.stapler.QueryParameter;
......
......@@ -252,11 +252,6 @@ THE SOFTWARE.
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册