2006年8月10日

cobertura 和tomcat如何集成使用

摘要: 注意点 需要Copy cobertura.jar及其LIB到TOMCAT/COMMON/LIB: 只有当TOMCAT关闭的时候,才会写cobertura.ser文件步骤 start up tomcat build war deploy web application web test undeploy shut down coverage report 附build.xml<projectn...阅读全文

posted @ 2006-08-10 11:40 muddle 阅读(718) 评论(2) 编辑

2005年12月7日

CCnet.config 文件说明

  1. Email Publisher
    <email from="buildmaster@mycompany.com" mailhost="smtp.mycompany.com" includeDetails="TRUE">
        
    <users>
            
    <user name="BuildGuru" group="buildmaster" address="buildguru@mycompany.com"/>
            
    <user name="JoeDeveloper" group="developers" address="joedeveloper@thoughtworks.com"/>
        
    </users>
        
    <groups>
            
    <group name="developers" notification="change"/>
            
    <group name="buildmaster" notification="always"/>
        
    </groups>
    </email>

     (未完待续)

posted @ 2005-12-07 00:08 muddle 阅读(268) 评论(0) 编辑

2005年12月3日

CuriseControl's Resource

  1. Main Page
  2. CruiseControl Configuration tool
  3. CuriseControl Client
  4. Best Practices
  5. Run CC as windows service

posted @ 2005-12-03 22:26 muddle 阅读(236) 评论(0) 编辑

2005年12月1日

What is Curise Control?

 CruiseControl is a framework for a continuous build process. It includes, but is not limited to, plugins for email notification, Ant, and various source control tools. A web interface is provided to view the details of the current and previous builds.

posted @ 2005-12-01 23:09 muddle 阅读(111) 评论(0) 编辑

What is Continuous Integration?

Continuous Integration简称CI.

CI是软件开发过程中一个非常重要的步骤。 可以自动Compile,Testing, 每天可以运行好多次。它可以帮助开发人员每日集成,从而更早的发现集成问题。

posted @ 2005-12-01 23:06 muddle 阅读(123) 评论(0) 编辑

2004年8月27日

如何利用JMAILAPI发送EMAIL

这个示例是带验证的发送程序
重要提示:   除了使用JMail, 还要当一个jaf-1_0_2-upd.zip包, 以后下载软件前, 一定要注意阅读文档, 免得浪费时间

Mail.java
/*
 * Created on 2004/08/25
 */

package com.csk.dm;

import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

/**
 * @author 仇驚雷
 */
public class Mail {
 /**
  * smtp username
  */
 public static String userName = null;
 /**
  * smtp password
  */
 public static String password = null;

 /**
  * smtp host
  */
 public static String host = null;

 /**
  * send a mail with specilied parameters
  *
  * @param from
  *            sender
  * @param to
  *            receiver
  * @param host
  *            smtp host
  * @param subject
  *            subject of mail
  * @param body
  *            content of mail
  * @throws SendFailedException
  */
 public void sendMail(String from, String to, String subject, String body)
   throws SendFailedException {
  sendMail(from, from, to, subject, body);
 }

 public void sendMail(String from, String to, String[] cc, String subject,
   String body) throws SendFailedException {
  sendMail(from, from, to, cc, subject, body);
 }

 public void sendMail(String from, String friendName, String to,
   String subject, String body) throws SendFailedException {
  sendMail_internal(from, friendName, to, null, subject, body);
 }

 public void sendMail(String from, String friendName, String to,
   String[] cc, String subject, String body)
   throws SendFailedException {
  sendMail_internal(from, friendName, to, cc, subject, body);
 }

 private void sendMail_internal(String from, String friendName, String to,
   String cc[], String subject, String body)
   throws SendFailedException {
  String[] toArr = new String[1];
  toArr[0] = to;
  sendMail_internal(from, friendName, toArr, cc, subject, body);
 }

 /**
  * send a mail with specilied parameters
  *
  * @param from
  *            sender
  * @param friendName
  *            friend name of sender
  * @param to
  *            receiver
  * @param host
  *            smtp host
  * @param subject
  *            subject of mail
  * @param body
  *            content of mail
  * @throws SendFailedException
  */
 private void sendMail_internal(String from, String friendName, String[] to,
   String cc[], String subject, String body)
   throws SendFailedException {
  Properties props = new Properties();

  Session session = null;
  Message msg = null;

  try {
   SmtpAuth sa = new SmtpAuth();
   props.put("mail.smtp.auth", "true");
   props.put("mail.smtp.host", host);
   props.put("mail.smtp.port", "25");
   sa.setUserinfo(userName, password);
   session = Session.getInstance(props, sa);
   session.setDebug(true);

   msg = new MimeMessage(session);
   msg.setFrom(new InternetAddress(from, friendName));
   InternetAddress[] toAddress = new InternetAddress[to.length];
   for (int i = 0; i < to.length; i++) {
    toAddress[i] = new InternetAddress(to[i]);
    toAddress[i].setAddress(to[i]);
   }
   msg.setRecipients(Message.RecipientType.TO, toAddress);

   if ((cc != null) && (cc.length != 0)) {
    InternetAddress[] ccAddress = new InternetAddress[cc.length];
    for (int i = 0; i < cc.length; i++) {
     ccAddress[i] = new InternetAddress(cc[i]);
     ccAddress[i].setAddress(cc[i]);
    }
    msg.setRecipients(Message.RecipientType.CC, ccAddress);
   }

   msg.setSubject(subject);
   msg.setSentDate(new Date());
   msg.setText(body);
   Transport.send(msg);
  } catch (AddressException e) {
   e.printStackTrace();
  } catch (SendFailedException se) {
   throw se;
  } catch (MessagingException e) {
   e.printStackTrace();
  } catch (UnsupportedEncodingException e) {
   e.printStackTrace();
  }
 }
}

SmtpAuth .java
/*
 * Created on 2004/08/26
 */
package com.csk.dm;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * Email身? Validator
 * @author 仇驚雷
 */
public class SmtpAuth extends Authenticator {
 private String user, password;
 
 /**
  * @param getuser
  * @param getpassword
  */
 public void setUserinfo(String getuser, String getpassword) {
  user = getuser;
  password = getpassword;
 }

 protected PasswordAuthentication getPasswordAuthentication() {
  return new PasswordAuthentication(user, password);
 }
}

posted @ 2004-08-27 11:03 muddle 阅读(965) 评论(1) 编辑

2004年8月25日

在TOMCAT5.0.27 中利用数据链接缓冲池

摘要: 一、把相应的JDBC包放置到TOMCAT安装目录的COMMON/LIB目录中二、TOMCAT的配置文件的内容(以ORACLE, THIN连接为例)<?xml version='1.0' encoding='utf-8'?><Context docBase="E:/Workspace/toshiba" path="/toshiba" reloadable="true" workDi...阅读全文

posted @ 2004-08-25 17:51 muddle 阅读(852) 评论(0) 编辑

2004年7月20日

关于自动化编程的考虑

摘要: 经过较长时间工作的积累,我发现曾写过很多类似的代码。现作一些归类1、 数据库的CRUD,很多资料都提过数据层的设计,关于这个方面也已经有了很多产品。这部分的内容可以在很大的程度上采用自动化代码。(后续)2、 软件结构的设计。一般情况下,每一个用例都是由角色激活的。因而,我们可以把激活这样一个动作抽象出一个对象。通过配置文件来决定某一个角色激活哪一个用例。因而这部分的内容我们也可以采用自动化编程,3...阅读全文

posted @ 2004-07-20 09:49 muddle 阅读(834) 评论(0) 编辑

在JAVA中用ANT的一些用法

摘要: 从CVS, VSS, STARTEAM获得文件的一些例子<?xml version="1.0" ?> <project name="MyProject" default="STGetFile" basedir="e:\anttest"><property name="src" location="${basedir}/src"/><property nam...阅读全文

posted @ 2004-07-20 09:16 muddle 阅读(1253) 评论(0) 编辑

2004年4月20日

Test-Driven Development In .NET 部分译文

摘要: 原文见Test-Driven Development In .NETTestFixture AttributeTestFixture Attribute说明一个类包含了测试方法。当你为工程中的类加上这个属性时,Test Runner将搜索这个类中的测试方法。下列这段代码描述了这个属性的用法(本文中的所有代码都是用C#写成,但NUnit也支持其它的.Net语言,比如VB.Net。请参见NUnit的相...阅读全文

posted @ 2004-04-20 13:39 muddle 阅读(1135) 评论(6) 编辑

导航

<2012年2月>
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

公告

昵称:muddle
园龄:7年10个月
粉丝:1
关注:0

搜索

 
 

常用链接

随笔分类

随笔档案

文章分类

文章档案

.Net Link

最新评论

推荐排行榜