<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
	xmlns="http://purl.org/rss/1.0/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:admin="http://webns.net/mvcb/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
	xml:lang="ja">
	<channel rdf:about="http://www.in-vitro.jp/blog/index.cgi/index.rss">
		<title>試験管のなかのコード</title>
		<link>http://www.in-vitro.jp/blog/index.cgi</link>
		<description>ある開発者の私的実験室</description>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<admin:generatorAgent rdf:resource="http://www.blosxom.com/?v=2.0"/>
		<admin:errorReportsTo rdf:resource="mailto:"/>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20071226_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071226_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071205_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071205_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071204_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071128_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071124_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071121_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071121_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20071120_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071120_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071114_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071114_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071113_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071112_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20071112_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071109_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071108_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071107_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071107_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071106_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071106_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071105_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071105_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071104_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071102_99.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071101_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071030_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Merlin/20071026_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071025_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/WebService/20071024_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20071023_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071022_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071016_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071014_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071013_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.txt.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071009_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070927_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070926_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070918_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070910_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070903_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070902_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070829_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070824_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070820_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070730_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070726_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070724_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070720_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070719_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/WebService/20070718_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/WebService/20070717_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/AS/20070716_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070714_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070710_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/AS/20070705_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070530_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Subversion/20070526_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Subversion/20070525_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070524_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070523_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070522_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070521_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070520_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070518_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070517_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070516_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070514_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070513_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070512_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070509_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070508_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20070501_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20070427_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070426_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20070419_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070329_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070225_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070223_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070222_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070221_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070218_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070216_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070212_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070211_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070209_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070208_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070206_01.htm"/>
				<rdf:li rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070201_01.htm"/>
			</rdf:Seq>
		</items>
	</channel>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Library/20071226_01.htm">
		<title><![CDATA[Commons Logging 1.1.1 で Log4j の trace レベルを有効にする。]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Library/20071226_01.htm</link>
		<description><![CDATA[  (2008/01/25) 致命的な間違いのため訂正    桜が咲く頃にふと想ふ さんの 「Commons Loggin + Log4jでTRACEレベルのログを出力CommentsAdd Star」 で、本エントリが根本的に間違っていることを指摘いただいた。ありがとうございます。    Commons Logging 1.1.1 + Log4j 1.2.12 で一切カスタマイズ無しで普通に Trace ログを出力できた。  ソースコード でも確認済み。  ・・・カスタマイズしたときに見たソースコードは一体何だったのだろう??    お詫びして訂正致します。取消線が入っている情報は間違っています。信じないで下さい。  Commons Logging 1.1.1 から Log4j を使用する場合、デフォルトでは Commons Logging の trace ログレベルは Log4j の debug ログレベルに対応付けられる。  Log4j では永らく trace ログレベルがサポートされていなかったので当然こういう実装になるだろう。    Log4j 1.2.12 で trace ログレベルがサポートされたのだけれど、残念ながら Commons Logging では未対応の様だ。  というわけで、自力で Commons Logging の trace ログレベルを Log4j の trace ログレベルに対応付けてみた。      Apache Logging Services    http://logging.apache.org/    ASF Bugzilla Bug 35711 Add TRACE level to 1.2 api    http://issues.apache.org/bugzilla/show_bug.cgi?id=35711    Apache Commons - Commons Logging    http://commons.apache.org/logging/  Commons Logging の設定  Commons Logging と Log4j の橋渡しは Log4JLogger というクラスが行っているので、Log4JLogger を拡張して差し替える。Log4JLogger の拡張クラス  package jp.in_vitro.codelet.logging;import org.apache.commons.logging.impl.Log4JLogger;import org.apache.log4j.Logger;public class TracableLogger extends Log4JLogger {    public TracableLogger() {        super();    }    public TracableLogger(final Logger logger) {        super(logger);    }    public TracableLogger(final String name) {        super(name);    }    @Override    public boolean isTraceEnabled() {        Logger logger = getLogger();        return logger.isTraceEnabled();    }    @Override    public void trace(final Object message, final Throwable t) {        Logger logger = getLogger();        logger.trace(message, t);    }    @Override    public void trace(final Object message) {        Logger logger = getLogger();        logger.trace(message);    }}  Commons Logging の設定ファイル  クラスパスのルートに "commons-logging.properties" を作成する。  org.apache.commons.logging.Log=jp.in_vitro.codelet.logging.TracableLogger  ]]></description>
		<dc:subject>Library</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-12-26T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p style="border: 3px solid red; font-weight: bold; padding: 1em;">
  <span style="color: red">(2008/01/25) 致命的な間違いのため訂正</span><br />
  <br />
  <a href="http://d.hatena.ne.jp/bobbyjam99/">桜が咲く頃にふと想ふ</a> さんの 「<a href="http://d.hatena.ne.jp/bobbyjam99/20080116/1200473466">Commons Loggin + Log4jでTRACEレベルのログを出力CommentsAdd Star</a>」 で、本エントリが根本的に間違っていることを指摘いただいた。ありがとうございます。<br />
  <br />
  Commons Logging 1.1.1 + Log4j 1.2.12 で一切カスタマイズ無しで普通に Trace ログを出力できた。
  <a href="http://svn.apache.org/repos/asf/commons/proper/logging/tags/commons-logging-1.1.1/src/java/org/apache/commons/logging/impl/Log4JLogger.java">ソースコード</a> でも確認済み。
  ・・・カスタマイズしたときに見たソースコードは一体何だったのだろう??<br />
  <br />
  お詫びして訂正致します。取消線が入っている情報は間違っています。信じないで下さい。
</p>
<p>
  <del>Commons Logging 1.1.1 から Log4j を使用する場合、デフォルトでは Commons Logging の trace ログレベルは Log4j の debug ログレベルに対応付けられる。</del>
  <del>Log4j では永らく trace ログレベルがサポートされていなかったので当然こういう実装になるだろう。</del><br />
  <br />
  <del>Log4j 1.2.12 で trace ログレベルがサポートされたのだけれど、残念ながら Commons Logging では未対応の様だ。</del>
  <del>というわけで、自力で Commons Logging の trace ログレベルを Log4j の trace ログレベルに対応付けてみた。</del>
  <dl>
    <dt>Apache Logging Services</dt>
    <dd><a href="http://logging.apache.org/">http://logging.apache.org/</a></dd>
    <dt>ASF Bugzilla Bug 35711 Add TRACE level to 1.2 api</dt>
    <dd><a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=35711">http://issues.apache.org/bugzilla/show_bug.cgi?id=35711</a></dd>
    <dt>Apache Commons - Commons Logging</dt>
    <dd><a href="http://commons.apache.org/logging/">http://commons.apache.org/logging/</a></dd>
  </dl>
</p>
<h4><del>Commons Logging の設定</del></h4>
<p>
  <del>Commons Logging と Log4j の橋渡しは Log4JLogger というクラスが行っているので、Log4JLogger を拡張して差し替える。</del>
</p>
<h5><del>Log4JLogger の拡張クラス</del></h5>
<p>
  <blockquote>
<pre>
<del>
package jp.in_vitro.codelet.logging;

import org.apache.commons.logging.impl.Log4JLogger;
import org.apache.log4j.Logger;

public class TracableLogger extends Log4JLogger {

    public TracableLogger() {
        super();
    }

    public TracableLogger(final Logger logger) {
        super(logger);
    }

    public TracableLogger(final String name) {
        super(name);
    }

    @Override
    public boolean isTraceEnabled() {
        Logger logger = getLogger();
        return logger.isTraceEnabled();
    }

    @Override
    public void trace(final Object message, final Throwable t) {
        Logger logger = getLogger();
        logger.trace(message, t);
    }

    @Override
    public void trace(final Object message) {
        Logger logger = getLogger();
        logger.trace(message);
    }
}
</del>
</pre>
  </blockquote>
</p>
<h4><del>Commons Logging の設定ファイル</del></h4>
<p>
  <del>クラスパスのルートに "commons-logging.properties" を作成する。</del>
  <blockquote>
<pre>
<del>
org.apache.commons.logging.Log=jp.in_vitro.codelet.logging.TracableLogger
</del>
</pre>
  </blockquote>
</p>
]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20071226_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071226_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071226_99.htm</link>
		<description><![CDATA[[Apple] Mac OS X 10.5: Developer preview of Java SE 6 for Leopard available from the Apple Developer Connection... そろそろ Leopard に入れ替えないとな。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-12-26T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Apple">[Apple]</a> <a href="http://docs.info.apple.com/article.html?artnum=307208">Mac OS X 10.5: Developer preview of Java SE 6 for Leopard available from the Apple Developer Connection</a>... そろそろ Leopard に入れ替えないとな。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071226_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071205_01.htm">
		<title><![CDATA[IE6 と IE７ の同居にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071205_01.htm</link>
		<description><![CDATA[  チャレンジも何も。  やり方を丁寧に説明してくれているサイトがあったのでその通りやってみただけ。  Altstack さん、TredoSoft さん、Microsoft さん(?) に感謝。      IE6とIE7の同居と、Windowsでwebkit（Safari）の表示確認    http://www.altstack.com/weblog/archives/2007/03/28/index.php    Windows XP SP2 向け Windows Internet Explorer 7    http://www.microsoft.com/downloads/details.aspx?FamilyId=9AE91EBE-3385-447C-8A30-081805B2F90B&displaylang=ja    Internet Explorer 7 running side by side with IE6. (standalone)    http://tredosoft.com/IE7_standalone     ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-12-05T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  チャレンジも何も。
  やり方を丁寧に説明してくれているサイトがあったのでその通りやってみただけ。
  Altstack さん、TredoSoft さん、Microsoft さん(?) に感謝。
  <dl>
    <dt>IE6とIE7の同居と、Windowsでwebkit（Safari）の表示確認</dt>
    <dd><a href="http://www.altstack.com/weblog/archives/2007/03/28/index.php">http://www.altstack.com/weblog/archives/2007/03/28/index.php</a></dd>
    <dt>Windows XP SP2 向け Windows Internet Explorer 7</dt>
    <dd><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9AE91EBE-3385-447C-8A30-081805B2F90B&displaylang=ja">http://www.microsoft.com/downloads/details.aspx?FamilyId=9AE91EBE-3385-447C-8A30-081805B2F90B&displaylang=ja</a></dd>
    <dt>Internet Explorer 7 running side by side with IE6. (standalone)</dt>
    <dd><a href="http://tredosoft.com/IE7_standalone">http://tredosoft.com/IE7_standalone</a></dd>
  </dl>
   <a href="/blog/entries/Misc/20071205_01/ie6_and_ie7.png" title="IE6 and IE7" rel="imagebox"><img src="/blog/entries/Misc/20071205_01/ie6_and_ie7.png" alt="[IE6 and IE7]" width="250"/></a>
</p>

]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071205_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071205_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071205_99.htm</link>
		<description><![CDATA[[Misc] A Preview of HTML 5... header, nav, article に footer かー。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-12-05T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Misc">[Misc]</a> <a href="http://www.alistapart.com/articles/previewofhtml5">A Preview of HTML 5</a>... header, nav, article に footer かー。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071205_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071204_01.htm">
		<title><![CDATA[/private/etc/hosts の変更内容がすぐに反映されない]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071204_01.htm</link>
		<description><![CDATA[  Mac OS X で /private/etc/hosts を変更しても、変更内容がすぐに反映されないことがある。  調べてみたら      osxでetchostsをすぐに反映させる方法    http://ido.nu/kuma/2007/03/23/osxでetchostsをすぐに反映させる方法/    に情報があった。  $ sudo lookupd -flushcache    でキャッシュをクリアすれば良いらしい。実際に試してみたところ上手く行った。感謝。]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-12-04T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Mac OS X で /private/etc/hosts を変更しても、変更内容がすぐに反映されないことがある。
  調べてみたら
  <dl>
    <dt>osxでetchostsをすぐに反映させる方法</dt>
    <dd><a href="http://ido.nu/kuma/2007/03/23/osxでetchostsをすぐに反映させる方法/">http://ido.nu/kuma/2007/03/23/osxでetchostsをすぐに反映させる方法/</a></dd>
  </dl>
  に情報があった。
  <blockquote>
<pre>
$ sudo lookupd -flushcache
</pre>
  </blockquote>
  でキャッシュをクリアすれば良いらしい。実際に試してみたところ上手く行った。感謝。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071204_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071128_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071128_99.htm</link>
		<description><![CDATA[[Maven] Release Notes - Maven 2.0.8... Maven 2.0.8 がリリースされた！！]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-28T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Maven">[Maven]</a> <a href="http://maven.apache.org/release-notes.html">Release Notes - Maven 2.0.8</a>... Maven 2.0.8 がリリースされた！！<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071128_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071124_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071124_99.htm</link>
		<description><![CDATA[[Maven] Release Notes - Continuum - Version 1.1... Continuum 1.1 Final がリリースされた。アップデートしないと。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-24T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Maven">[Maven]</a> <a href="http://maven.apache.org/continuum/documentation/1_1/installation/release-notes.html">Release Notes - Continuum - Version 1.1</a>... Continuum 1.1 Final がリリースされた。アップデートしないと。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071124_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071121_01.htm">
		<title><![CDATA[Eclipse 3.3.1.1 の "Ctrl contrib"]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071121_01.htm</link>
		<description><![CDATA[  Eclipse 3.3 -&gt; 3.3.1.1 にアップグレードしたら左下に "Ctrl contrib" という不思議なコンポーネントが現れた。  押しても無反応。引いても(?)無反応。  調べてみたら Eclipse SDK Examples というものだった。  Examples を表示しておく必要もないのでとりあえず消しておいた。     "Ctrl contrib" の消し方      "Help" -&gt; "Software Updates" -&gt; "Manage Configuration" を実行。    "Eclipse SDK Examples" を選択。    "Disable" のリンクをクリック。       ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-21T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Eclipse 3.3 -&gt; 3.3.1.1 にアップグレードしたら左下に "Ctrl contrib" という不思議なコンポーネントが現れた。
  押しても無反応。引いても(?)無反応。
  調べてみたら Eclipse SDK Examples というものだった。
  Examples を表示しておく必要もないのでとりあえず消しておいた。<br>
  <br>
   <a href="/blog/entries/Misc/20071121_01/Eclipse_CtrlContrib_01.png" title="Ctrl Contrib" rel="imagebox"><img src="/blog/entries/Misc/20071121_01/Eclipse_CtrlContrib_01.png" alt="[Ctrl Contrib]" width="150"/></a><br>
</p>
<h4>"Ctrl contrib" の消し方</h4>
<p>
  <ol>
    <li>"Help" -&gt; "Software Updates" -&gt; "Manage Configuration" を実行。</li>
    <li>"Eclipse SDK Examples" を選択。</li>
    <li>"Disable" のリンクをクリック。</li>
  </ol>
  <br>
   <a href="/blog/entries/Misc/20071121_01/Eclipse_CtrlContrib_02.png" title="Ctrl Contrib" rel="imagebox"><img src="/blog/entries/Misc/20071121_01/Eclipse_CtrlContrib_02.png" alt="[Ctrl Contrib]" width="250"/></a><br>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071121_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071121_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071121_99.htm</link>
		<description><![CDATA[[Mustang] Open Source Java 6 on Leopard... 悔しいが Leopard 環境がない・・・。[Maven] Buildr：RubyがJavaより速く構築するとき... シンプルな Java のビルドツールを目指した Buildr。今度試してみよう。[Maven] buildr... Ruby が要るのか・・・。うーん。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-21T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Mustang">[Mustang]</a> <a href="http://landonf.bikemonkey.org/code/macosx/MacOS_Java_16_Developer_Preview_1.20071120.html">Open Source Java 6 on Leopard</a>... 悔しいが Leopard 環境がない・・・。<br>
<a href="http://www.in-vitro.jp/blog/index.cgi/Maven">[Maven]</a> <a href="http://www.infoq.com/jp/news/2007/09/fast-ruby-builds-with-buildr">Buildr：RubyがJavaより速く構築するとき</a>... シンプルな Java のビルドツールを目指した Buildr。今度試してみよう。<br>
<a href="http://www.in-vitro.jp/blog/index.cgi/Maven">[Maven]</a> <a href="http://buildr.rubyforge.org/">buildr</a>... Ruby が要るのか・・・。うーん。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071121_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Linux/20071120_01.htm">
		<title><![CDATA["yum remove openssl" の恐怖]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Linux/20071120_01.htm</link>
		<description><![CDATA[  会社の先輩が苦悶しているので何事かと思ったら。  "yum remove openssl" を実行したら 200 以上のパッケージと "yum 自身" が削除されたらしい。  確かに openssl は他パッケージからの依存がかなり多くてもおかしくはない。  とは言え、yum 自身までもが消えるとは。恐るべし。    ちなみに、"ls" まで使えなくなったらしいので shell にもダメージがある模様。  注意されたい。    ・・・apt は大丈夫なのだろうか?? 怖くて試す気にはなれないが。再現実験をしてみた(w          2008/01/25 追記  apt で試したという強者が(w。    ☆★☆- ログ倉庫・・・っぽいもの、若しくは鯖メモ -☆★☆ さんの 「 便利さの裏側に潜む狂気」というエントリ。    厳しい警告が出る様だが、強行してしまうと yum 同様取り返しのつかないことになるそうだ。]]></description>
		<dc:subject>Linux</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-20T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  会社の先輩が苦悶しているので何事かと思ったら。
  "yum remove openssl" を実行したら 200 以上のパッケージと "yum 自身" が削除されたらしい。
  確かに openssl は他パッケージからの依存がかなり多くてもおかしくはない。
  とは言え、yum 自身までもが消えるとは。恐るべし。<br>
  <br>
  ちなみに、"ls" まで使えなくなったらしいので shell にもダメージがある模様。
  注意されたい。<br>
  <br>
  ・・・apt は大丈夫なのだろうか?? 怖くて試す気にはなれないが。
</p>
<h4>再現実験をしてみた(w</h4>
<p>
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
         CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" 
         WIDTH="690" 
         HEIGHT="460">
  <PARAM NAME=movie VALUE="/blog/entries/Linux/20071120_01/yum_remove_openssl.swf">
  <PARAM NAME=bgcolor VALUE=#FFFFFF>
  <PARAM NAME=LOOP VALUE=false>
  <PARAM NAME=quality VALUE=high>
  <EMBED SRC="/blog/entries/Linux/20071120_01/yum_remove_openssl.swf" 
         WIDTH="690" 
         HEIGHT="460" 
         bgcolor="#FFFFFF" 
         LOOP="false" 
         QUALITY="high" 
         PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" 
         TYPE="application/x-shockwave-flash"></EMBED>
</OBJECT>
</p>
<h4>2008/01/25 追記</h4>
<p>
  apt で試したという強者が(w。<br />
  <br />
  <a href="http://www.aquablue.ne.jp/yama/diary/">☆★☆- ログ倉庫・・・っぽいもの、若しくは鯖メモ -☆★☆</a> さんの 「<a href="http://www.aquablue.ne.jp/yama/diary/wd200801.html#2008/01/01(Tue)"> 便利さの裏側に潜む狂気</a>」というエントリ。<br />
  <br />
  厳しい警告が出る様だが、強行してしまうと yum 同様取り返しのつかないことになるそうだ。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20071120_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071120_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071120_99.htm</link>
		<description><![CDATA[Eclipse Project Release Notes (Release 3.3.1.1)... Eclipse 3.3.1.1 がリリース (via Java News)]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-20T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.eclipse.org/eclipse/development/readme_eclipse_3.3.1.1.html">Eclipse Project Release Notes (Release 3.3.1.1)</a>... Eclipse 3.3.1.1 がリリース (via Java News)<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071120_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071114_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071114_99.htm</link>
		<description><![CDATA[[Misc] NetCommons におけるクロスサイトスクリプティングの脆弱性... NetCommons は前に試したのでメモ。XSS って本当に厄介だな。[Library] WebTest vs. Selenium: 本物のテストとシミュレートされたブラウザテスト... WebTest 試してみないとな・・・。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-14T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Misc">[Misc]</a> <a href="http://jvn.jp/jp/JVN%2379295963/index.html">NetCommons におけるクロスサイトスクリプティングの脆弱性</a>... NetCommons は前に試したのでメモ。XSS って本当に厄介だな。<br>
<a href="http://www.in-vitro.jp/blog/index.cgi/Library">[Library]</a> <a href="http://www.infoq.com/jp/news/2007/11/canoo-webtest-selenium-testing">WebTest vs. Selenium: 本物のテストとシミュレートされたブラウザテスト</a>... WebTest 試してみないとな・・・。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071114_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071114_01.htm">
		<title><![CDATA[Mac OS X(Tiger) で Apache を停止する方法]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071114_01.htm</link>
		<description><![CDATA[  Mac OS X (Tiger) で Apache HTTP Server が起動していることを知った。  で、Apache HTTP Server の停止方法をメモ。Apache HTTP Server の停止方法  システム環境設定 -&gt; 共有 -&gt; パーソナル Web 共有で停止できる。システム環境設定で試しに「apache」を検索してみたらシステムが教えてくれた。素晴らしい。      ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-14T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Mac OS X (Tiger) で Apache HTTP Server が起動していることを知った。
  で、Apache HTTP Server の停止方法をメモ。
</p>
<h4>Apache HTTP Server の停止方法</h4>
<p>
  システム環境設定 -&gt; 共有 -&gt; パーソナル Web 共有で停止できる。システム環境設定で試しに「apache」を検索してみたらシステムが教えてくれた。素晴らしい。<br>
   <a href="/blog/entries/Apple/20071114_01/apache_on_macosx_01.png" title="Apache on Mac OS X" rel="imagebox"><img src="/blog/entries/Apple/20071114_01/apache_on_macosx_01.png" alt="[Apache on Mac OS X]" width="200"/></a>
   <a href="/blog/entries/Apple/20071114_01/apache_on_macosx_02.png" title="Apache on Mac OS X" rel="imagebox"><img src="/blog/entries/Apple/20071114_01/apache_on_macosx_02.png" alt="[Apache on Mac OS X]" width="200"/></a>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071114_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071113_01.htm">
		<title><![CDATA[Android SDK にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071113_01.htm</link>
		<description><![CDATA[  Android SDK が公開されたので、少し遊んでみた。  とりあえず SDK を入れて、Eclipse でプロジェクトの作成→パッケージ作成→エミュレータ上で動作確認。  特に困ることもなく簡単に遊ぶことができた。      Android - An Open Handset Alliance Project    http://code.google.com/android/index.html    Download the Android SDK    http://code.google.com/android/download.html    Android Developers Blog    http://android-developers.blogspot.com/  Android SDK のインストール  ここからアーカイブをダウンロードして解凍するだけ。android_sdk_darwin_m3-rc20a.zip を使用した。Android Eclipse plugin のインストール  Eclipse の Software Update 機能で簡単にインストールできる。  アップデートサイトは https://dl-ssl.google.com/android/eclipse/ 。              Android Eclipse plugin の設定  Android Eclipse plugin を使用するには Android SDK のパスを設定する必要がある。  Window -&gt; Preferences -&gt; Android を表示し、Android SDK のパスを指定する。   Android Project を作成する  Project の作成画面を開くと、Android Project が作成できるようになっている。  Android Project を作成し、適当にソースコードをいじって、実行。  実行すると Android emulator が起動して作成したコードが動作する。               ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-13T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Android SDK が公開されたので、少し遊んでみた。
  とりあえず SDK を入れて、Eclipse でプロジェクトの作成→パッケージ作成→エミュレータ上で動作確認。
  特に困ることもなく簡単に遊ぶことができた。
  <dl>
    <dt>Android - An Open Handset Alliance Project</dt>
    <dd><a href="http://code.google.com/android/index.html">http://code.google.com/android/index.html</a></dd>
    <dt>Download the Android SDK</dt>
    <dd><a href="http://code.google.com/android/download.html">http://code.google.com/android/download.html</a></dd>
    <dt>Android Developers Blog</dt>
    <dd><a href="http://android-developers.blogspot.com/">http://android-developers.blogspot.com/</a></dd>
  </dl>
</p>
<h4>Android SDK のインストール</h4>
<p>
  <a href="http://code.google.com/android/download.html">ここ</a>からアーカイブをダウンロードして解凍するだけ。android_sdk_darwin_m3-rc20a.zip を使用した。
</p>
<h4>Android Eclipse plugin のインストール</h4>
<p>
  Eclipse の Software Update 機能で簡単にインストールできる。
  アップデートサイトは https://dl-ssl.google.com/android/eclipse/ 。
  <br>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_install_01.png" title="Installing Android Eclipse plugin" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_install_01.png" alt="[Installing Android Eclipse plugin]" width="150"/></a>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_install_02.png" title="Installing Android Eclipse plugin" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_install_02.png" alt="[Installing Android Eclipse plugin]" width="150"/></a>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_install_03.png" title="Installing Android Eclipse plugin" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_install_03.png" alt="[Installing Android Eclipse plugin]" width="150"/></a>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_install_04.png" title="Installing Android Eclipse plugin" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_install_04.png" alt="[Installing Android Eclipse plugin]" width="150"/></a>
</p>
<h4>Android Eclipse plugin の設定</h4>
<p>
  Android Eclipse plugin を使用するには Android SDK のパスを設定する必要がある。
  Window -&gt; Preferences -&gt; Android を表示し、Android SDK のパスを指定する。<br>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_settings.png" title="Setting Android Eclipse plugin" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_settings.png" alt="[Setting Android Eclipse plugin]" width="150"/></a>
</p>
<h4>Android Project を作成する</h4>
<p>
  Project の作成画面を開くと、Android Project が作成できるようになっている。
  Android Project を作成し、適当にソースコードをいじって、実行。
  実行すると Android emulator が起動して作成したコードが動作する。<br>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_project_01.png" title="Android Project" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_project_01.png" alt="[Android Project]" width="150"/></a>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_project_02.png" title="Android Project" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_project_02.png" alt="[Android Project]" width="150"/></a>
   <a href="/blog/entries/Misc/20071113_01/eclipse_android_project_03.png" title="Android Project" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/eclipse_android_project_03.png" alt="[Android Project]" width="150"/></a><br>
   <a href="/blog/entries/Misc/20071113_01/android_emulator_01.png" title="Android emulator" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/android_emulator_01.png" alt="[Android emulator]" width="150"/></a>
   <a href="/blog/entries/Misc/20071113_01/android_emulator_02.png" title="Android emulator" rel="imagebox"><img src="/blog/entries/Misc/20071113_01/android_emulator_02.png" alt="[Android emulator]" width="150"/></a>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071113_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071112_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071112_99.htm</link>
		<description><![CDATA[[Misc] Google デベロッパー ホーム... おぉ！日本にも開発者用コミュニティが。 ]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-12T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Misc">[Misc]</a> <a href="http://www.google.co.jp/developer/prg/">Google デベロッパー ホーム</a>... おぉ！日本にも開発者用コミュニティが。 <br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071112_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Trac/20071112_01.htm">
		<title><![CDATA[Trac で画像のプレビューが表示されない]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Trac/20071112_01.htm</link>
		<description><![CDATA[  「Trac で画像のプレビューが表示されないのだけれど・・・」という相談を受けた。  で、調べた結果をメモ。症状の内容  Trac Wiki の添付アップロード画面(ex. http://example.com/trac/attachment/wiki/WikiStart?action=new)  や添付ファイル表示画面(ex. http://example.com/trac/attachment/wiki/WikiStart/photo.jpg)  で、以下のエラーメッセージが表示され画像のプレビューが表示されない。      HTML preview not available, since the file size exceeds 262144 bytes.     You may download the file instead.  回避方法  trac.ini の mimeviewer セクションに max_preview_size という設定項目があるので、それを変更。  デフォルトでは 262144 になっているので、適当な値 (1Mbyte の場合は 1048576) にするだけ。  [mimeviewer]enscript_modes = text/x-dylan:dylan:4enscript_path = enscriptmax_preview_size = 262144mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb  補足  trac.ini の max_preview_size を変更する前にアップロードしてプレビューが表示されていない画像は、  max_preview_size を変更してもプレビューは表示されない模様。詳しく調べていないので断定はできないけれど。  その場合は再度添付作業をやり直す必要がある。]]></description>
		<dc:subject>Trac</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-12T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  「Trac で画像のプレビューが表示されないのだけれど・・・」という相談を受けた。
  で、調べた結果をメモ。
</p>
<h4>症状の内容</h4>
<p>
  Trac Wiki の添付アップロード画面(ex. http://example.com/trac/attachment/wiki/WikiStart?action=new)
  や添付ファイル表示画面(ex. http://example.com/trac/attachment/wiki/WikiStart/photo.jpg)
  で、以下のエラーメッセージが表示され画像のプレビューが表示されない。
  <blockquote>
    HTML preview not available, since the file size exceeds 262144 bytes. 
    You may download the file instead.
  </blockquote>
</p>
<h4>回避方法</h4>
<p>
  trac.ini の mimeviewer セクションに max_preview_size という設定項目があるので、それを変更。
  デフォルトでは 262144 になっているので、適当な値 (1Mbyte の場合は 1048576) にするだけ。
  <blockquote>
<pre>
[mimeviewer]
enscript_modes = text/x-dylan:dylan:4
enscript_path = enscript
max_preview_size = 262144
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
</pre>
  </blockquote>
</p>
<h4>補足</h4>
<p>
  trac.ini の max_preview_size を変更する前にアップロードしてプレビューが表示されていない画像は、
  max_preview_size を変更してもプレビューは表示されない模様。詳しく調べていないので断定はできないけれど。
  その場合は再度添付作業をやり直す必要がある。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20071112_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071109_01.htm">
		<title><![CDATA[quickSub にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071109_01.htm</link>
		<description><![CDATA[quickSub とは  百聞不如一見。 →         というもの。  便利かどうか分からないけれど、まぁ、動きがあって面白いということでここにも適用してみた。      quickSub    http://www.methodize.org/quicksub/  quickSub の使い方  とても簡単。ドキュメントに書いてある通りなので、  取り立てて書くこともないのだけれど、一応。  &lt;html&gt;&lt;head&gt;  &lt;link rel="stylesheet" href="/blog/quicksub.css" type="text/css" /&gt;  &lt;script type="text/javascript" src="/blog/quicksub.js"&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;  &lt;a href="$url/index.rss"      onmouseout="return timeqs();"      onmouseover="return quicksub(this, 'http://www.in-vitro.jp/blog/index.cgi/index.rss');"&gt;    &lt;img src="/blog/rss.png" alt="RSS" style="border:none;"/&gt;  &lt;/a&gt;  &lt;div id="quickSub"        style="position:absolute; visibility:hidden; z-index:1000;"        onMouseOut="return timeqs();"        onMouseMove="return delayqs();"&gt;  &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;    こんな感じ。]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-09T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>quickSub とは</h4>
<p>
  百聞不如一見。 → 
  <a href="$url/index.rss" onmouseout="return timeqs();" onmouseover="return quicksub(this, '$url/index.rss');"><img src="/blog/rss.png" alt="RSS" style="border:none;"/></a>
  <br>
  <br>
  というもの。
  便利かどうか分からないけれど、まぁ、動きがあって面白いということでここにも適用してみた。
  <dl>
    <dt>quickSub</dt>
    <dd><a href="http://www.methodize.org/quicksub/">http://www.methodize.org/quicksub/</a></dd>
  </dl>
</p>
<h4>quickSub の使い方</h4>
<p>
  とても簡単。<a href="http://www.methodize.org/quicksub/">ドキュメント</a>に書いてある通りなので、
  取り立てて書くこともないのだけれど、一応。
  <blockquote>
<pre>
&lt;html&gt;
&lt;head&gt;
  &lt;link rel="stylesheet" href="/blog/quicksub.css" type="text/css" /&gt;
  &lt;script type="text/javascript" src="/blog/quicksub.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;a href="$url/index.rss" 
     onmouseout="return timeqs();" 
     onmouseover="return quicksub(this, 'http://www.in-vitro.jp/blog/index.cgi/index.rss');"&gt;
    &lt;img src="/blog/rss.png" alt="RSS" style="border:none;"/&gt;
  &lt;/a&gt;
  &lt;div id="quickSub" 
       style="position:absolute; visibility:hidden; z-index:1000;" 
       onMouseOut="return timeqs();" 
       onMouseMove="return delayqs();"&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
  </blockquote>
  こんな感じ。
</p>


]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071109_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071108_01.htm">
		<title><![CDATA[Interface elements for jQuery にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071108_01.htm</link>
		<description><![CDATA[Interface elements for jQuery とは  jQuery は      jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML     documents, handle events, perform animations, and add Ajax interactions to your web     pages. jQuery is designed to change the way that you write JavaScript.    というもの。で、Interface elements for jQuery は      Interface is a collection of rich interface components     which utilizes the lightweight JavaScript library jQuery.     というもの。    今回は Interface elements for jQuery の中の ImageBox をここに適用してみた。  ImageBox というのはこういうもの(画像をクリック) →        Interface elements for jQuery    http://interface.eyecon.ro/    jQuery    http://jquery.com/  ImageBox の使い方  とても簡単。jquery.js, interface.js をダウンロードしてきて、後は HTML を少しいじるだけ。  &lt;a&gt; タグの title 属性が ImageBox の左下に表示される画像のタイトルとして使用される。  rel 属性は画像のグルーピングに使用される。例えば、rel="imagebox-travel" を指定した画像を   3 枚用意すると、タイトルの下に「Showing image 3 from 1」 と表示される。  またグルーピングを使用するとスライドショーも可能となる(様だ)。  &lt;html&gt;&lt;head&gt;  &lt;script type="text/javascript" src="/blog/jquery.js"&gt;&lt;/script&gt;  &lt;script type="text/javascript" src="/blog/interface.js"&gt;&lt;/script&gt;  &lt;link rel="stylesheet" href="/blog/interface.css" type="text/css" /&gt;&lt;/head&gt;&lt;body&gt;  &lt;a href="/images/sample.png" title="Sample Image" rel="imagebox"&gt;    &lt;img src="/images/sample-thumbnail.png" alt="Sample Image"/&gt;  &lt;/a&gt;  &lt;script type="text/javascript"&gt;&lt;!--$(document).ready(  function() {    $.ImageBox.init(      { loaderSRC: '/blog/loading.gif',        closeHTML: '&lt;img src="/blog/close.jpg" /&gt;' }    );  });//--&gt;  &lt;/script&gt;&lt;/body&gt;&lt;/html&gt;    HTML はこんな↑感じ。interface.css はこんな↓感じ。  #ImageBoxOverlay {  background-color: #000000;}#ImageBoxCaption {  background-color: #FFFFFF;}#ImageBoxContainer {  width: 250px;  height: 250px;  background-color: #FFFFFF;}#ImageBoxCaptionText {  font-weight: bold;  padding-bottom: 5px;}#ImageBoxCaptionImages {  margin: 0;}  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-08T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Interface elements for jQuery とは</h4>
<p>
  jQuery は
  <blockquote>
    jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML 
    documents, handle events, perform animations, and add Ajax interactions to your web 
    pages. jQuery is designed to change the way that you write JavaScript.
  </blockquote>
  というもの。で、Interface elements for jQuery は
  <blockquote>
    Interface is a collection of rich interface components 
    which utilizes the lightweight JavaScript library jQuery. 
  </blockquote>
  というもの。<br>
  <br>
  今回は Interface elements for jQuery の中の ImageBox をここに適用してみた。<br>
  ImageBox というのはこういうもの(画像をクリック) →  <a href="/blog/entries/Misc/20071108_01/logo.gif" title="in-vitro.jp's logo" rel="imagebox"><img src="/blog/entries/Misc/20071108_01/logo.gif" alt="[in-vitro.jp's logo]" width="100"/></a>
  <dl>
    <dt>Interface elements for jQuery</dt>
    <dd><a href="http://interface.eyecon.ro/">http://interface.eyecon.ro/</a></dd>
    <dt>jQuery</dt>
    <dd><a href="http://jquery.com/">http://jquery.com/</a></dd>
  </dl>
</p>
<h4>ImageBox の使い方</h4>
<p>
  とても簡単。jquery.js, interface.js をダウンロードしてきて、後は HTML を少しいじるだけ。
  &lt;a&gt; タグの title 属性が ImageBox の左下に表示される画像のタイトルとして使用される。
  rel 属性は画像のグルーピングに使用される。例えば、rel="imagebox-travel" を指定した画像を 
  3 枚用意すると、タイトルの下に「Showing image 3 from 1」 と表示される。
  またグルーピングを使用するとスライドショーも可能となる(様だ)。
  <blockquote>
<pre>
&lt;html&gt;
&lt;head&gt;
  &lt;script type="text/javascript" src="/blog/jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/blog/interface.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="/blog/interface.css" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;a href="/images/sample.png" title="Sample Image" rel="imagebox"&gt;
    &lt;img src="/images/sample-thumbnail.png" alt="Sample Image"/&gt;
  &lt;/a&gt;
  &lt;script type="text/javascript"&gt;
&lt;!--
$(document).ready(
  function() {
    $.ImageBox.init(
      { loaderSRC: '/blog/loading.gif',
        closeHTML: '&lt;img src="/blog/close.jpg" /&gt;' }
    );
  }
);
//--&gt;
  &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
  </blockquote>
  HTML はこんな↑感じ。interface.css はこんな↓感じ。
  <blockquote>
<pre>
#ImageBoxOverlay {
  background-color: #000000;
}
#ImageBoxCaption {
  background-color: #FFFFFF;
}
#ImageBoxContainer {
  width: 250px;
  height: 250px;
  background-color: #FFFFFF;
}
#ImageBoxCaptionText {
  font-weight: bold;
  padding-bottom: 5px;
}
#ImageBoxCaptionImages {
  margin: 0;
}
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071108_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071107_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071107_99.htm</link>
		<description><![CDATA[[Apple] Macユーザーを狙うウイルスの亜種が続出... アンチウィルスソフト入れよっと。遅いか・・・。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-07T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Apple">[Apple]</a> <a href="http://www.nikkeibp.co.jp/news/it07q4/550971/">Macユーザーを狙うウイルスの亜種が続出</a>... アンチウィルスソフト入れよっと。遅いか・・・。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071107_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071107_01.htm">
		<title><![CDATA[ClamXav メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071107_01.htm</link>
		<description><![CDATA[  ClamXav は Mac OS X で動作するフリーのアンチウィルスソフト。  2007/11/07 時点で Leopard で動作するバイナリは公開されていない模様。      ClamXav is a free virus checker for Mac OS X. It uses the tried,     tested and very popular ClamAV open source antivirus engine as a back end.        ClamXav    http://www.clamxav.com/  ClamXav のインストール  ClamXav は ClamAV というアンチウィルスソフトをベースにしているので、ClamAV を同時にインストールする。  現在の ClamXav のインストーラは ClamAV もしてくれる様だが、何故か手元の環境ではうまく動かなかった。  権限関連の問題だと思うが、原因を調べるのが面倒だったので ClamAV は MacPorts を使ってインストールした。      というわけで、ClamXav のインストール手順は      MacPorts で ClamAV をインストール    ClamXav をインストール    ClamXav を設定    という感じ。ClamAV のインストール  $ sudo port -d syncPassword:DEBUG: Synchronizing ports tree(s)Synchronizing from rsync://rsync.macports.org/release/ports/  :sent 107556 bytes  received 2316556 bytes  68284.85 bytes/sectotal size is 15752431  speedup is 6.50$ sudo port -d selfupdateDEBUG: Rebuilding the MacPorts base system if needed.DEBUG: Synchronizing ports tree(s)  :The MacPorts installation is not outdated and so was not updatedDEBUG: Setting ownership to rootselfupdate done!$ sudo port install clamav--->  Fetching gmp--->  Attempting to fetch gmp-4.2.1.tar.bz2 from http://ftp.gnu.org/gnu/gmp  :--->  Installing clamav 0.91.2_0You need to add a new clamav user and clamav group to your system if you want to use clamav in superuser mode.--->  Activating clamav 0.91.2_0--->  Cleaning clamav$     インストールが完了したら、ClamXav から呼び出せるように権限を変更しておく。  $ sudo touch /opt/local/share/clamav/freshclam.log$ sudo chmod 664 /opt/local/share/clamav/freshclam.log$ sudo chown -R clamav:clamav /opt/local/share/clamav/$ sudo chmod u+s /opt/local/bin/freshclam   ClamXav のインストール  ClamXav の公式サイトから dmg をダウンロードする。dmg をマウント後、以下の通りファイルを移動する。  ここでは ClamXav_1.0.8_Tiger_e912.dmg を使用した。      ClamXav.app → /Applications    ScanWithClamXav.plugin → /Library/Contextual Menu Items  ClamXav の設定  ClamXav の設定は素晴らしい解説を発見したので参考にさせていただいた。  .Mac Tips さんに多謝!!      ClamAV と ClamXav: 第一回 ClamXav の環境設定    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060429010224/index.html    ClamAV と ClamXav: 第二回 ClamAV による定期スキャンと更新    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060502200534/index.html    ClamAV と ClamXav: 第三回 ウィルス定義ファイルの自動更新    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060508141731/index.html    ClamAV と ClamXav: 第四回 ClamXav 1.0.3 の新設定    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060512153400/index.html    ClamAV と ClamXav: 第五回 ClamAV のパーミッションを補強する    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060517015523/index.html    ClamAV と ClamXav: 第六回 他の対策ソフトの共同作業    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20061123181450/index.html    ClamAV と ClamXav: 第七回 ClamAV 0.90 の設定ファイルの変更点まとめ    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20070214182533/index.html    ClamAV と ClamXav: 第八回 clamav-update プロジェクト    http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20070729134015/index.html  ClamXav の実行     ClamXav を起動して、定義ファイルの更新をした。           とりあえず小さいディレクトリを検索してみた。]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-07T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  ClamXav は Mac OS X で動作するフリーのアンチウィルスソフト。
  2007/11/07 時点で Leopard で動作するバイナリは公開されていない模様。
  <blockquote>
    ClamXav is a free virus checker for Mac OS X. It uses the tried, 
    tested and very popular ClamAV open source antivirus engine as a back end.
  </blockquote>

  <dl>
    <dt>ClamXav</dt>
    <dd><a href="http://www.clamxav.com/">http://www.clamxav.com/</a></dd>
  </dl>
</p>
<h4>ClamXav のインストール</h4>
<p>
  ClamXav は ClamAV というアンチウィルスソフトをベースにしているので、ClamAV を同時にインストールする。
  現在の ClamXav のインストーラは ClamAV もしてくれる様だが、何故か手元の環境ではうまく動かなかった。
  権限関連の問題だと思うが、原因を調べるのが面倒だったので ClamAV は MacPorts を使ってインストールした。
  <br>
  <br>
  というわけで、ClamXav のインストール手順は
  <ol>
    <li>MacPorts で ClamAV をインストール</li>
    <li>ClamXav をインストール</li>
    <li>ClamXav を設定</li>
  </ol>
  という感じ。
</p>
<h5>ClamAV のインストール</h5>
<p>
  <blockquote>
<pre>
$ sudo port -d sync
Password:
DEBUG: Synchronizing ports tree(s)
Synchronizing from rsync://rsync.macports.org/release/ports/
  :
sent 107556 bytes  received 2316556 bytes  68284.85 bytes/sec
total size is 15752431  speedup is 6.50
$ sudo port -d selfupdate
DEBUG: Rebuilding the MacPorts base system if needed.
DEBUG: Synchronizing ports tree(s)
  :
The MacPorts installation is not outdated and so was not updated
DEBUG: Setting ownership to root
selfupdate done!
$ sudo port install clamav
--->  Fetching gmp
--->  Attempting to fetch gmp-4.2.1.tar.bz2 from http://ftp.gnu.org/gnu/gmp
  :
--->  Installing clamav 0.91.2_0

You need to add a new clamav user and clamav group to your system if you want to use clamav in superuser mode.

--->  Activating clamav 0.91.2_0
--->  Cleaning clamav
$ 
</pre>
  </blockquote>
  インストールが完了したら、ClamXav から呼び出せるように権限を変更しておく。
  <blockquote>
<pre>
$ sudo touch /opt/local/share/clamav/freshclam.log
$ sudo chmod 664 /opt/local/share/clamav/freshclam.log
$ sudo chown -R clamav:clamav /opt/local/share/clamav/
$ sudo chmod u+s /opt/local/bin/freshclam 
</pre>
  </blockquote>
</p>
<h5>ClamXav のインストール</h5>
<p>
  ClamXav の公式サイトから dmg をダウンロードする。dmg をマウント後、以下の通りファイルを移動する。
  ここでは ClamXav_1.0.8_Tiger_e912.dmg を使用した。
  <ul>
    <li>ClamXav.app → /Applications</li>
    <li>ScanWithClamXav.plugin → /Library/Contextual Menu Items</li>
  </ul>
</p>
<h5>ClamXav の設定</h5>
<p>
  ClamXav の設定は素晴らしい解説を発見したので参考にさせていただいた。
  <a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/">.Mac Tips</a> さんに多謝!!
  <dl>
    <dt>ClamAV と ClamXav: 第一回 ClamXav の環境設定</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060429010224/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060429010224/index.html</a></dd>
    <dt>ClamAV と ClamXav: 第二回 ClamAV による定期スキャンと更新</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060502200534/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060502200534/index.html</a></dd>
    <dt>ClamAV と ClamXav: 第三回 ウィルス定義ファイルの自動更新</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060508141731/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060508141731/index.html</a></dd>
    <dt>ClamAV と ClamXav: 第四回 ClamXav 1.0.3 の新設定</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060512153400/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060512153400/index.html</a></dd>
    <dt>ClamAV と ClamXav: 第五回 ClamAV のパーミッションを補強する</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060517015523/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20060517015523/index.html</a></dd>
    <dt>ClamAV と ClamXav: 第六回 他の対策ソフトの共同作業</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20061123181450/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20061123181450/index.html</a></dd>
    <dt>ClamAV と ClamXav: 第七回 ClamAV 0.90 の設定ファイルの変更点まとめ</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20070214182533/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20070214182533/index.html</a></dd>
    <dt>ClamAV と ClamXav: 第八回 clamav-update プロジェクト</dt>
    <dd><a href="http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20070729134015/index.html">http://homepage.mac.com/yuji_okamura/iblog/DotMac/Tips/C1181169702/E20070729134015/index.html</a></dd>
  </dl>
</p>
<h4>ClamXav の実行</h4>
<p>
   <a href="/blog/entries/Apple/20071107_01/clamxav01.png" title="ClamXav" rel="imagebox"><img src="/blog/entries/Apple/20071107_01/clamxav01.png" alt="[ClamXav]" width="250"/></a><br>
  ClamXav を起動して、定義ファイルの更新をした。
  <br>
  <br>
   <a href="/blog/entries/Apple/20071107_01/clamxav02.png" title="ClamXav" rel="imagebox"><img src="/blog/entries/Apple/20071107_01/clamxav02.png" alt="[ClamXav]" width="250"/></a><br>
  <br>
  とりあえず小さいディレクトリを検索してみた。
</p>
]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071107_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071106_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071106_99.htm</link>
		<description><![CDATA[[Apple] FreeBSD's 1.6 JDK on Mac OS X... Apple が早く JavaSE 6.0 を出してくれないかな・・・。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-06T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Apple">[Apple]</a> <a href="http://landonf.bikemonkey.org/code/macosx/FreeBSD_Java_16.20071105.html">FreeBSD's 1.6 JDK on Mac OS X</a>... Apple が早く JavaSE 6.0 を出してくれないかな・・・。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071106_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071106_01.htm">
		<title><![CDATA[Prism メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071106_01.htm</link>
		<description><![CDATA[         Prism は Web アプリケーションの実行に特化した Thin Client。  シンプルな Web ブラウザといったところか。  とりあえず頻繁に利用する Gmail を Prism から利用するようにしてみた。  アイコンは Google Notifier のものを流用させていただいた。      Prism is a simple XULRunner based browser that hosts web applications without the normal web browser user interface.        mozilla wiki - Prism    http://wiki.mozilla.org/Prism    mozilla wiki - Prism Installs    http://wiki.mozilla.org/Prism#Installs  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-06T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
   <a href="/blog/entries/Apple/20071106_01/prism.png" title="prism" rel="imagebox"><img src="/blog/entries/Apple/20071106_01/prism.png" alt="[prism]" width="250"/></a>  <a href="/blog/entries/Apple/20071106_01/prism-gmail.png" title="prism gmail" rel="imagebox"><img src="/blog/entries/Apple/20071106_01/prism-gmail.png" alt="[prism gmail]" width="150"/></a><br>
  <br>
  Prism は Web アプリケーションの実行に特化した Thin Client。
  シンプルな Web ブラウザといったところか。
  とりあえず頻繁に利用する Gmail を Prism から利用するようにしてみた。
  アイコンは Google Notifier のものを流用させていただいた。
  <blockquote>
    Prism is a simple XULRunner based browser that hosts web applications without the normal web browser user interface.
  </blockquote>
  <dl>
    <dt>mozilla wiki - Prism</dt>
    <dd><a href="http://wiki.mozilla.org/Prism">http://wiki.mozilla.org/Prism</a></dd>
    <dt>mozilla wiki - Prism Installs</dt>
    <dd><a href="http://wiki.mozilla.org/Prism#Installs">http://wiki.mozilla.org/Prism#Installs</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071106_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071105_01.htm">
		<title><![CDATA[Transmission メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071105_01.htm</link>
		<description><![CDATA[         Transmission は Mac OS X にも対応した BitTorrent クライアント。      Transmission is a fast, easy, and free multi-platform BitTorrent client     with a focus on being lightweight yet feature-filled.        Transmission    http://transmission.m0k.org/  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-05T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
   <a href="/blog/entries/Apple/20071105_01/transmission.png" title="transmission" rel="imagebox"><img src="/blog/entries/Apple/20071105_01/transmission.png" alt="[transmission]" width="250"/></a><br>
  <br>
  <br>
  Transmission は Mac OS X にも対応した BitTorrent クライアント。
  <blockquote>
    Transmission is a fast, easy, and free multi-platform BitTorrent client 
    with a focus on being lightweight yet feature-filled.
  </blockquote>
  <dl>
    <dt>Transmission</dt>
    <dd><a href="http://transmission.m0k.org/">http://transmission.m0k.org/</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071105_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071105_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071105_99.htm</link>
		<description><![CDATA[[Misc] SEO 診断ツール Dipper β... 手軽で面白い。[Misc] gOS... Parallels 上にはインストールできなかった。無念。[Misc] RSS のセキュリティ... いつもコメントや Trackback を RSS で配信するのは危険だと思うのだが。]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-05T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Misc">[Misc]</a> <a href="http://dipper.septeni.co.jp/">SEO 診断ツール Dipper β</a>... 手軽で面白い。<br>
<a href="http://www.in-vitro.jp/blog/index.cgi/Misc">[Misc]</a> <a href="http://www.thinkgos.com/">gOS</a>... Parallels 上にはインストールできなかった。無念。<br>
<a href="http://www.in-vitro.jp/blog/index.cgi/Misc">[Misc]</a> <a href="http://gihyo.jp/dev/serial/01/web20sec/0010">RSS のセキュリティ</a>... いつもコメントや Trackback を RSS で配信するのは危険だと思うのだが。<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071105_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071104_01.htm">
		<title><![CDATA[Wapiti にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071104_01.htm</link>
		<description><![CDATA[Wapiti とは  Wapiti は Web アプリケーションの脆弱性チェックを行うスキャナ。      Wapiti can detect the following vulnerabilities :              File Handling Errors (Local and remote include/require, fopen, readfile...)      Database Injection (PHP/JSP/ASP SQL Injections and XPath Injections)      XSS (Cross Site Scripting) Injection      LDAP Injection      Command Execution detection (eval(), system(), passtru()...)      CRLF Injection (HTTP Response Splitting, session fixation...)        この類のソフトウェアは有償のものが多いのだけれど、Wapiti は珍しくオープンソースでフリー。  というわけで、インストールして実際に自作のサンプルアプリをチェックしてみた。      Wapiti - Web application vulnerability scanner / security auditor    http://wapiti.sourceforge.net/  Wapiti のインストール  Wapiti は Python で実装されているので、python の実行環境があればすぐに使用できる。  ここでは Mac OS X (Tiger) に MacPorts を使用して Python とその他必要となるライブラリをインストールした。  $ sudo port install python25Password:--->  Fetching python25--->  Attempting to fetch Python-2.5.1.tar.bz2 from http://www.python.org//ftp/python/2.5.1/--->  Verifying checksum(s) for python25--->  Extracting python25--->  Applying patches to python25--->  Configuring python25--->  Building python25 with target all--->  Staging python25 into destroot--->  Installing python25 2.5.1_2+darwin_8--->  Activating python25 2.5.1_2+darwin_8--->  Cleaning python25$ /opt/local/bin/python2.5 -VPython 2.5.1$ sudo port install py25-hashlib--->  Fetching py25-hashlib--->  Verifying checksum(s) for py25-hashlib--->  Extracting py25-hashlib--->  Configuring py25-hashlib--->  Building py25-hashlib with target build--->  Staging py25-hashlib into destroot--->  Installing py25-hashlib 2.5.1_0--->  Activating py25-hashlib 2.5.1_0--->  Cleaning py25-hashlib$ sudo port install py25-socket-ssl--->  Fetching py25-socket-ssl--->  Verifying checksum(s) for py25-socket-ssl--->  Extracting py25-socket-ssl--->  Configuring py25-socket-ssl--->  Building py25-socket-ssl with target build--->  Staging py25-socket-ssl into destroot--->  Installing py25-socket-ssl 2.5.1_0--->  Activating py25-socket-ssl 2.5.1_0--->  Cleaning py25-socket-ssl$  Wapiti によるサンプルアプリケーションのスキャンサンプルアプリケーションのセッション取得  スキャンを行う前に、まずはサンプルアプリケーションにログインする。  Wapiti にログイン用の URL, アカウント情報を指定してサンプルアプリケーションにログインさせ、セッション維持用の Cookie をファイルに保存しておく。  $ /opt/local/bin/python2.5 getcookie.py cookies.txt http://127.0.0.1:8080/sample/loginlswww will be far less effective without tidyplease install libtidy ( http://tidy.sourceforge.net/ ),ctypes ( http://starship.python.net/crew/theller/ctypes/ )and uTidylib ( http://utidylib.berlios.de/ )Please enter values for the folling form :url = http://127.0.0.1:8080/sample/loginloginname (on) : scottloginpassword (on) : tiger0 : &lt;Cookie JSESSIONID=6E4E47C3C907D6EF9C0771920220AC135 for 127.0.0.1/sample&gt;$  サンプルアプリケーションのスキャン  XSS を仕込んだサンプルアプリケーションをでっち上げてスキャンしてみた。  要は GET で取得した値をそのままレスポンスの HTML に埋め込んだだけ。  $ /opt/local/bin/python2.5 wapiti.py http://127.0.0.1:8080/sample/ -c cookies.txt -x http://127.0.0.1:8080/sample/logoutlswww will be far less effective without tidyplease install libtidy ( http://tidy.sourceforge.net/ ),ctypes ( http://starship.python.net/crew/theller/ctypes/ )and uTidylib ( http://utidylib.berlios.de/ )Wapiti-1.1.6 (wapiti.sourceforge.net)........................................................Attacking urls (GET)...-----------------------XSS (danger_value) in http://127.0.0.1:8080/sample/index        Evil url: http://127.0.0.1:8080/sample/index?danger_value=&lt;script&gt;var+wapiti_687474703a2f2f3132372e302e302e313a383038302f4242617369632f636f6d6d756e6974792f4242534c697374_735f305f305f305f305f736f72745470=new+Boolean();&lt;/script&gt;  :    Wapiti は XSS をきちんと検出してくれた。  Wapiti でオールグリーンだからといって安心は出来ないけれど、最小限のセキュリティチェックを自動化できるメリットは大きそう。ちなみに・・・  必要なライブラリがインストールされていないと Wapiti のスクリプトを実行したときに下記の様なエラーが出る。      ImportError: No module named cookielib        ImportError: No module named _md5        AttributeError: 'module' object has no attribute 'HTTPSHandler'  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-04T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Wapiti とは</h4>
<p>
  Wapiti は Web アプリケーションの脆弱性チェックを行うスキャナ。
  <blockquote>
    Wapiti can detect the following vulnerabilities :<br>
    <br>
    <ul>
      <li>File Handling Errors (Local and remote include/require, fopen, readfile...)</li>
      <li>Database Injection (PHP/JSP/ASP SQL Injections and XPath Injections)</li>
      <li>XSS (Cross Site Scripting) Injection</li>
      <li>LDAP Injection</li>
      <li>Command Execution detection (eval(), system(), passtru()...)</li>
      <li>CRLF Injection (HTTP Response Splitting, session fixation...)</li>
    </dl>
  </blockquote>
  この類のソフトウェアは有償のものが多いのだけれど、Wapiti は珍しくオープンソースでフリー。
  というわけで、インストールして実際に自作のサンプルアプリをチェックしてみた。
  <dl>
    <dt>Wapiti - Web application vulnerability scanner / security auditor</dt>
    <dd><a href="http://wapiti.sourceforge.net/">http://wapiti.sourceforge.net/</a></dd>
  </dl>
</p>
<h4>Wapiti のインストール</h4>
<p>
  Wapiti は Python で実装されているので、python の実行環境があればすぐに使用できる。
  ここでは Mac OS X (Tiger) に MacPorts を使用して Python とその他必要となるライブラリをインストールした。
  <blockquote>
<pre>
$ sudo port install python25
Password:
--->  Fetching python25
--->  Attempting to fetch Python-2.5.1.tar.bz2 from http://www.python.org//ftp/python/2.5.1/
--->  Verifying checksum(s) for python25
--->  Extracting python25
--->  Applying patches to python25
--->  Configuring python25
--->  Building python25 with target all
--->  Staging python25 into destroot
--->  Installing python25 2.5.1_2+darwin_8
--->  Activating python25 2.5.1_2+darwin_8
--->  Cleaning python25
$ /opt/local/bin/python2.5 -V
Python 2.5.1
$ sudo port install py25-hashlib
--->  Fetching py25-hashlib
--->  Verifying checksum(s) for py25-hashlib
--->  Extracting py25-hashlib
--->  Configuring py25-hashlib
--->  Building py25-hashlib with target build
--->  Staging py25-hashlib into destroot
--->  Installing py25-hashlib 2.5.1_0
--->  Activating py25-hashlib 2.5.1_0
--->  Cleaning py25-hashlib
$ sudo port install py25-socket-ssl
--->  Fetching py25-socket-ssl
--->  Verifying checksum(s) for py25-socket-ssl
--->  Extracting py25-socket-ssl
--->  Configuring py25-socket-ssl
--->  Building py25-socket-ssl with target build
--->  Staging py25-socket-ssl into destroot
--->  Installing py25-socket-ssl 2.5.1_0
--->  Activating py25-socket-ssl 2.5.1_0
--->  Cleaning py25-socket-ssl
$
</pre>
  </blockquote>
</p>
<h4>Wapiti によるサンプルアプリケーションのスキャン</h4>
<h5>サンプルアプリケーションのセッション取得</h5>
<p>
  スキャンを行う前に、まずはサンプルアプリケーションにログインする。
  Wapiti にログイン用の URL, アカウント情報を指定してサンプルアプリケーションにログインさせ、セッション維持用の Cookie をファイルに保存しておく。
  <blockquote>
<pre>
$ /opt/local/bin/python2.5 getcookie.py cookies.txt http://127.0.0.1:8080/sample/login
lswww will be far less effective without tidy
please install libtidy ( http://tidy.sourceforge.net/ ),
ctypes ( http://starship.python.net/crew/theller/ctypes/ )
and uTidylib ( http://utidylib.berlios.de/ )
Please enter values for the folling form :
url = http://127.0.0.1:8080/sample/login
loginname (on) : scott
loginpassword (on) : tiger
0 : &lt;Cookie JSESSIONID=6E4E47C3C907D6EF9C0771920220AC135 for 127.0.0.1/sample&gt;
$
</pre>
  </blockquote>
</p>
<h5>サンプルアプリケーションのスキャン</h5>
<p>
  XSS を仕込んだサンプルアプリケーションをでっち上げてスキャンしてみた。
  要は GET で取得した値をそのままレスポンスの HTML に埋め込んだだけ。
  <blockquote>
<pre>
$ /opt/local/bin/python2.5 wapiti.py http://127.0.0.1:8080/sample/ -c cookies.txt -x 
http://127.0.0.1:8080/sample/logout
lswww will be far less effective without tidy
please install libtidy ( http://tidy.sourceforge.net/ ),
ctypes ( http://starship.python.net/crew/theller/ctypes/ )
and uTidylib ( http://utidylib.berlios.de/ )
Wapiti-1.1.6 (wapiti.sourceforge.net)
........................................................
Attacking urls (GET)...
-----------------------
XSS (danger_value) in http://127.0.0.1:8080/sample/index
        Evil url: http://127.0.0.1:8080/sample/index?danger_value=&lt;script&gt;var
+wapiti_687474703a2f2f3132372e302e302e313a383038302f4242617369632f636f6d6d756e69747
92f4242534c697374_735f305f305f305f305f736f72745470=new+Boolean();&lt;/script&gt;
  :
</pre>
  </blockquote>
  Wapiti は XSS をきちんと検出してくれた。
  Wapiti でオールグリーンだからといって安心は出来ないけれど、最小限のセキュリティチェックを自動化できるメリットは大きそう。
</p>
<h4>ちなみに・・・</h4>
<p>
  必要なライブラリがインストールされていないと Wapiti のスクリプトを実行したときに下記の様なエラーが出る。
  <blockquote>
    ImportError: No module named cookielib
  </blockquote>
  <blockquote>
    ImportError: No module named _md5
  </blockquote>
  <blockquote>
    AttributeError: 'module' object has no attribute 'HTTPSHandler'
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071104_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071102_99.htm">
		<title><![CDATA[Today's bookmark]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071102_99.htm</link>
		<description><![CDATA[[Apple] Apple Updates MacBooks to Santa Rosa, GMA X3100; 2.6GHz MacBook Pro... 「そろそろ」と噂されていたノートのモデルチェンジはこれのこと??[Misc] 大規模日本語 n-gram データの公開... Google の N-gram データ!!! 欲しい!!!]]></description>
		<dc:subject>Bookmark</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-02T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<a href="http://www.in-vitro.jp/blog/index.cgi/Apple">[Apple]</a> <a href="http://www.macrumors.com/2007/11/01/apple-updates-macbooks-to-santa-rosa-gma-x3100/">Apple Updates MacBooks to Santa Rosa, GMA X3100; 2.6GHz MacBook Pro</a>... 「そろそろ」と噂されていたノートのモデルチェンジはこれのこと??<br>
<a href="http://www.in-vitro.jp/blog/index.cgi/Misc">[Misc]</a> <a href="http://googlejapan.blogspot.com/2007/11/n-gram.html">大規模日本語 n-gram データの公開</a>... Google の N-gram データ!!! 欲しい!!!<br>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Bookmark/20071102_99.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071101_01.htm">
		<title><![CDATA[OpenPNE にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071101_01.htm</link>
		<description><![CDATA[OpenPNE とは  OpenPNE はオープンソースの SNS エンジン。  面白そうなのでインストールして動かしてみた。      OpenPNE    http://openpne.jp/  OpenPNE のインストール  OpenPNE を Debian Etch 環境にインストールしてみた。  PHP, MySQL のバージョンは以下の通り。  # php --versionPHP 5.2.0-8+etch7 (cli) (built: Jul  2 2007 21:46:15) Copyright (c) 1997-2006 The PHP GroupZend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies# mysql --versionmysql  Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2  OpenPNE のダウンロードと解凍、設置  OpenPNE をダウンロードして適当な場所に設置する。  OPENPNE_HOME/public_html だけ Apache HTTP Server が直接アクセスする必要があるため /var/www に設置する。  それ以外のファイルは /opt に設置した。  # wget http://internap.dl.sourceforge.net/sourceforge/openpne/OpenPNE-2.10.0.tar.gz--19:57:52--  http://internap.dl.sourceforge.net/sourceforge/openpne/OpenPNE-2.10.0.tar.gz           => `OpenPNE-2.10.0.tar.gz'  :19:58:20 (187.97 KB/s) - `OpenPNE-2.10.0.tar.gz' saved [5194807/5194807]# tar zxvf ./OpenPNE-2.10.0.tar.gz OpenPNE-2.10.0/OpenPNE-2.10.0/bin/OpenPNE-2.10.0/bin/tool_send_dairy_news.cron  :OpenPNE-2.10.0/webapp/templates/mail/m_pc_friend_intro.tplOpenPNE-2.10.0/webapp/templates/debug.tplOpenPNE-2.10.0/webapp/templates/error.tpl# mv ./OpenPNE-2.10.0 /opt/# ln -s /opt/OpenPNE-2.10.0 /opt/OpenPNE# mv /opt/OpenPNE/public_html /var/www/openpne# chown www-data:www-data -R /var/www/openpne/  OpenPNE の設定  OpenPNE の設定を行う。  設定が必要なのは      /var/www/openpne/config.inc.php    /opt/OpenPNE/config/php    の 2 つのファイル。  環境に合わせて適当に編集を行う。  # cp /var/www/openpne/config.inc.php /var/www/openpne/config.inc.php.original# vi /var/www/openpne/config.inc.php# diff /var/www/openpne/config.inc.php.original /var/www/openpne/config.inc.php7c7&lt; define('OPENPNE_DIR', realpath('../'));---&gt; define('OPENPNE_DIR', realpath('/opt/OpenPNE'));# chown www-data:www-data -R /opt/OpenPNE/var/# cp /opt/OpenPNE/config.php.sample /opt/OpenPNE/config.php# vi /opt/OpenPNE/config.php# diff /opt/OpenPNE/config.php.sample /opt/OpenPNE/config.php7c7&lt; define('OPENPNE_URL', 'http://sns.example.com/');---&gt; define('OPENPNE_URL', 'http://192.168.11.12/openpne/');13,14c13,14&lt;     'username' => '',&lt;     'password' => '',---&gt;     'username' => 'openpne',&gt;     'password' => 'openpne',16c16&lt;     'database' => '',---&gt;     'database' => 'openpne',22c22&lt; define('ENCRYPT_KEY', '');---&gt; define('ENCRYPT_KEY', 'password');26c26&lt; define('MAIL_SERVER_DOMAIN', 'mail.example.com');---&gt; define('MAIL_SERVER_DOMAIN', 'mail.example.co.jp');# chown www-data:www-data /opt/OpenPNE/config.php  DB の作成  MySQL に DB, ユーザ、テーブルを作成し、初期データを流し込む。  # mysqlWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 337Server version: 5.0.32-Debian_7etch1-log Debian etch distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql&gt; CREATE DATABASE `openpne` DEFAULT CHARACTER SET utf8;Query OK, 1 row affected (0.00 sec)mysql&gt; grant all on openpne.* to openpne identified by 'openpne';Query OK, 0 rows affected (0.00 sec)mysql&gt; flush privileges;Query OK, 0 rows affected (0.00 sec)mysql&gt; exitBye# mysql -u openpne -p --default-character-set=utf8 openpne &lt; /opt/OpenPNE/setup/sql/mysql41/install/install-2.10-create_tables.sql Enter password: # mysql -u openpne -p --default-character-set=utf8 openpne &lt; /opt/OpenPNE/setup/sql/mysql41/install/install-2.10-insert_data.sql   Enter password: #  OpenPNE セットアップ画面表示  Web ブラウザから http://example.com/openpne/?m=setup にアクセスして初回設定を行う。OpenPNE の利用      トップ画面          http://example.com/openpne/                      管理コンソール          http://example.com/openpne/?m=admin                    ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-11-01T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>OpenPNE とは</h4>
<p>
  OpenPNE はオープンソースの SNS エンジン。
  面白そうなのでインストールして動かしてみた。
  <dl>
    <dt>OpenPNE</dt>
    <dd><a href="http://openpne.jp/">http://openpne.jp/</a></dd>
  </dl>
</p>
<h4>OpenPNE のインストール</h4>
<p>
  OpenPNE を Debian Etch 環境にインストールしてみた。
  PHP, MySQL のバージョンは以下の通り。
  <blockquote>
<pre>
# php --version
PHP 5.2.0-8+etch7 (cli) (built: Jul  2 2007 21:46:15) 
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
# mysql --version
mysql  Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2
</pre>
  </blockquote>
</p>
<h5>OpenPNE のダウンロードと解凍、設置</h5>
<p>
  OpenPNE をダウンロードして適当な場所に設置する。
  OPENPNE_HOME/public_html だけ Apache HTTP Server が直接アクセスする必要があるため /var/www に設置する。
  それ以外のファイルは /opt に設置した。
  <blockquote>
<pre>
# wget http://internap.dl.sourceforge.net/sourceforge/openpne/OpenPNE-2.10.0.tar.gz
--19:57:52--  http://internap.dl.sourceforge.net/sourceforge/openpne/OpenPNE-2.10.0.tar.gz
           => `OpenPNE-2.10.0.tar.gz'

  :

19:58:20 (187.97 KB/s) - `OpenPNE-2.10.0.tar.gz' saved [5194807/5194807]

# tar zxvf ./OpenPNE-2.10.0.tar.gz 
OpenPNE-2.10.0/
OpenPNE-2.10.0/bin/
OpenPNE-2.10.0/bin/tool_send_dairy_news.cron

  :

OpenPNE-2.10.0/webapp/templates/mail/m_pc_friend_intro.tpl
OpenPNE-2.10.0/webapp/templates/debug.tpl
OpenPNE-2.10.0/webapp/templates/error.tpl
# mv ./OpenPNE-2.10.0 /opt/
# ln -s /opt/OpenPNE-2.10.0 /opt/OpenPNE
# mv /opt/OpenPNE/public_html /var/www/openpne
# chown www-data:www-data -R /var/www/openpne/
</pre>
  </blockquote>
</p>
<h5>OpenPNE の設定</h5>
<p>
  OpenPNE の設定を行う。
  設定が必要なのは
  <ul>
    <li>/var/www/openpne/config.inc.php</li>
    <li>/opt/OpenPNE/config/php</li>
  </ul>
  の 2 つのファイル。
  環境に合わせて適当に編集を行う。
  <blockquote>
<pre>
# cp /var/www/openpne/config.inc.php /var/www/openpne/config.inc.php.original
# vi /var/www/openpne/config.inc.php
# diff /var/www/openpne/config.inc.php.original /var/www/openpne/config.inc.php
7c7
&lt; define('OPENPNE_DIR', realpath('../'));
---
&gt; define('OPENPNE_DIR', realpath('/opt/OpenPNE'));
# chown www-data:www-data -R /opt/OpenPNE/var/
# cp /opt/OpenPNE/config.php.sample /opt/OpenPNE/config.php
# vi /opt/OpenPNE/config.php

# diff /opt/OpenPNE/config.php.sample /opt/OpenPNE/config.php
7c7
&lt; define('OPENPNE_URL', 'http://sns.example.com/');
---
&gt; define('OPENPNE_URL', 'http://192.168.11.12/openpne/');
13,14c13,14
&lt;     'username' => '',
&lt;     'password' => '',
---
&gt;     'username' => 'openpne',
&gt;     'password' => 'openpne',
16c16
&lt;     'database' => '',
---
&gt;     'database' => 'openpne',
22c22
&lt; define('ENCRYPT_KEY', '');
---
&gt; define('ENCRYPT_KEY', 'password');
26c26
&lt; define('MAIL_SERVER_DOMAIN', 'mail.example.com');
---
&gt; define('MAIL_SERVER_DOMAIN', 'mail.example.co.jp');
# chown www-data:www-data /opt/OpenPNE/config.php
</pre>
  </blockquote>
</p>
<h5>DB の作成</h5>
<p>
  MySQL に DB, ユーザ、テーブルを作成し、初期データを流し込む。
  <blockquote>
<pre>
# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 337
Server version: 5.0.32-Debian_7etch1-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql&gt; CREATE DATABASE `openpne` DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)

mysql&gt; grant all on openpne.* to openpne identified by 'openpne';
Query OK, 0 rows affected (0.00 sec)

mysql&gt; flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; exit
Bye
# mysql -u openpne -p --default-character-set=utf8 openpne &lt; /opt/OpenPNE/setup/sql/mysql41/install/install-2.10-create_tables.sql 
Enter password: 
# mysql -u openpne -p --default-character-set=utf8 openpne &lt; /opt/OpenPNE/setup/sql/mysql41/install/install-2.10-insert_data.sql   
Enter password: 
#
</pre>
  </blockquote>
</p>
<h5>OpenPNE セットアップ画面表示</h5>
<p>
  Web ブラウザから http://example.com/openpne/?m=setup にアクセスして初回設定を行う。
</p>
<h4>OpenPNE の利用</h4>
<p>
  <dl>
    <dt>トップ画面</dt>
    <dd>
      http://example.com/openpne/<br>
       <a href="/blog/entries/Misc/20071101_01/openpne_0.png" title="openpne" rel="imagebox"><img src="/blog/entries/Misc/20071101_01/openpne_0.png" alt="[openpne]" width="250"/></a>
       <a href="/blog/entries/Misc/20071101_01/openpne_1.png" title="openpne" rel="imagebox"><img src="/blog/entries/Misc/20071101_01/openpne_1.png" alt="[openpne]" width="250"/></a><br>
    </dd>
    <dt>管理コンソール</dt>
    <dd>
      http://example.com/openpne/?m=admin<br>
       <a href="/blog/entries/Misc/20071101_01/openpne_admin_0.png" title="admin console" rel="imagebox"><img src="/blog/entries/Misc/20071101_01/openpne_admin_0.png" alt="[admin console]" width="250"/></a>
       <a href="/blog/entries/Misc/20071101_01/openpne_admin_1.png" title="admin console" rel="imagebox"><img src="/blog/entries/Misc/20071101_01/openpne_admin_1.png" alt="[admin console]" width="250"/></a><br>
    </dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071101_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071030_01.htm">
		<title><![CDATA[CAPTCHA の安全性についてメモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071030_01.htm</link>
		<description><![CDATA[  CAPTCHA の安全性が話題になっているみたいなのでメモ。      凪瀬 Blog - はてなのCAPTCHAは簡単に破れる    http://blogs.wankuma.com/nagise/archive/2007/10/26/104428.aspx    Radium Software Development - Breaking CAPTCHAs with NNs    http://www.radiumsoftware.com/0611.html#061110    高木浩光＠自宅の日記 - 飾りじゃないのよCAPTCHAは 〜前代未聞のCAPTCHAもどき    http://takagi-hiromitsu.jp/diary/20060810.html#p01    Wikipedia - CAPTCHA    http://ja.wikipedia.org/wiki/CAPTCHA  より安全な CAPTCHA とは?  はてなの CAPTCHA が問題視されているわけだが、「では一体どういう CAPTCHA がより安全なのだろう?」  という疑問が当然出てくる。  Breaking CAPTCHAs with NNsによると、      CAPTCHA 破りの工程は，画像から文字を１文字づつ切り出す「分割」 (segmentation) の段階と，    切り出した文字を１文字ごとに解析する「認識」 (recognition) の段階から構成されるが，    このうちコンピュータにとって困難なのは「分割」の方であり，「認識」は比較的容易であるとされる。        Kumar らの研究の結果は，文字による視覚 CAPCHA に関して，    文字毎の「認識」を困難にさせることを意図した歪みやノイズには全く意味が無く，    そのような労力は文字の「分割」を困難にさせる方へと注がれることが望ましいという結論を導き出している。    ということで、「分割」し難い CAPTCHA が安全であるという研究結果が発表されているそうだ。  その研究結果を直接参照してみると、何故「分割」がコンピュータにとって難しいのかが説明されている。      4.1 The segmentation problem    As a review, segmentation is difficult for the following reasons:                   Segmentation is computationally expensive. In order to find valid patterns, a         recognizer must attempt recognition at many different candidate locations.                    The segmentation function is complex. To segment successfully, the system         must learn to identify which patterns are valid among the set of all possible         valid and non-valid patterns. This task is intrinsically more difficult than         classification because the space of input is considerably larger. Unlike the space         of valid patterns, the space of non-valid patterns is typically too vast to sample.         This is a problem for many learning algorithms which yield too many false         positives when presented non-valid patterns.                    Identifying valid characters among a set of valid and invalid candidates is a         combinatorial problem. For example, correctly identifying which 8 characters         among 20 candidates (assuming 12 false positives), has a 1 in 125,970 (20         choose 8) chances of success by random guessing.               より安全な CAPTCHA が具体的にどういうものかというと、同じ論文内では以下の様に提案されている。      4.2 Building better/harder HIPs    The idea is that the additional arcs are themselves good candidates for false     characters. The previous segmentation attacks would fail on this HIP. Furthermore,     simple change of fonts, distortions, or arc types would require extensive work for     the attacker to adjust to.         この方式のより詳細な情報が Building Segmentation Based Humanfriendly Human Interaction Proofs (HIPs) に記載されている。        Using Machine Learning to Break Visual Human Interaction Proofs (HIPs)    http://research.microsoft.com/~kumarc/pubs/chellapilla_nips04.pdf    Building Segmentation Based Humanfriendly Human Interaction Proofs (HIPs)    http://research.microsoft.com/~kumarc/pubs/chellapilla_hip05.pdf  CAPTCHA の実装(Java)  Wikipedia の CAPTCHA によると、CAPTCHA の Java 実装は結構あるようだ。      The JCAPTCHA Project    http://jcaptcha.sourceforge.net/    The reCAPTCHA Project    http://www.crt.realtors.org/projects/reCaptcha/    The simple CAPTCHA Project    http://simplecaptcha.sourceforge.net/    この中でどれがより安全だろうか??  JCAPTCHA の DoubleRandomListGimpyEngineCaptcha が分割しにくいように見えるけれど・・・。]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-30T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  CAPTCHA の安全性が話題になっているみたいなのでメモ。
  <dl>
    <dt>凪瀬 Blog - はてなのCAPTCHAは簡単に破れる</dt>
    <dd><a href="http://blogs.wankuma.com/nagise/archive/2007/10/26/104428.aspx">http://blogs.wankuma.com/nagise/archive/2007/10/26/104428.aspx</a></dd>
    <dt>Radium Software Development - Breaking CAPTCHAs with NNs</dt>
    <dd><a href="http://www.radiumsoftware.com/0611.html#061110">http://www.radiumsoftware.com/0611.html#061110</a></dd>
    <dt>高木浩光＠自宅の日記 - 飾りじゃないのよCAPTCHAは 〜前代未聞のCAPTCHAもどき</dt>
    <dd><a href="http://takagi-hiromitsu.jp/diary/20060810.html#p01">http://takagi-hiromitsu.jp/diary/20060810.html#p01</a></dd>
    <dt>Wikipedia - CAPTCHA</dt>
    <dd><a href="http://ja.wikipedia.org/wiki/CAPTCHA">http://ja.wikipedia.org/wiki/CAPTCHA</a></dd>
  </dl>
</p>
<h4>より安全な CAPTCHA とは?</h4>
<p>
  はてなの CAPTCHA が問題視されているわけだが、「では一体どういう CAPTCHA がより安全なのだろう?」
  という疑問が当然出てくる。<br>
  <a href="http://www.radiumsoftware.com/0611.html#061110">Breaking CAPTCHAs with NNs</a>によると、
  <blockquote>
    CAPTCHA 破りの工程は，画像から文字を１文字づつ切り出す「分割」 (segmentation) の段階と，
    切り出した文字を１文字ごとに解析する「認識」 (recognition) の段階から構成されるが，
    このうちコンピュータにとって困難なのは「分割」の方であり，「認識」は比較的容易であるとされる。
  </blockquote>
  <blockquote>
    Kumar らの研究の結果は，文字による視覚 CAPCHA に関して，
    文字毎の「認識」を困難にさせることを意図した歪みやノイズには全く意味が無く，
    そのような労力は文字の「分割」を困難にさせる方へと注がれることが望ましいという結論を導き出している。
  </blockquote>
  ということで、「分割」し難い CAPTCHA が安全であるという研究結果が発表されているそうだ。
  <a href="http://research.microsoft.com/~kumarc/pubs/chellapilla_nips04.pdf">その研究結果</a>を直接参照してみると、何故「分割」がコンピュータにとって難しいのかが説明されている。
  <blockquote>
    4.1 The segmentation problem<br>
    As a review, segmentation is difficult for the following reasons: <br>
    <ol>
      <li>
        Segmentation is computationally expensive. In order to find valid patterns, a 
        recognizer must attempt recognition at many different candidate locations.
      </li>
      <li>
        The segmentation function is complex. To segment successfully, the system 
        must learn to identify which patterns are valid among the set of all possible 
        valid and non-valid patterns. This task is intrinsically more difficult than 
        classification because the space of input is considerably larger. Unlike the space 
        of valid patterns, the space of non-valid patterns is typically too vast to sample. 
        This is a problem for many learning algorithms which yield too many false 
        positives when presented non-valid patterns.
      </li>
      <li>
        Identifying valid characters among a set of valid and invalid candidates is a 
        combinatorial problem. For example, correctly identifying which 8 characters 
        among 20 candidates (assuming 12 false positives), has a 1 in 125,970 (20 
        choose 8) chances of success by random guessing.
      </li>
    </ol> 
  </blockquote>
  より安全な CAPTCHA が具体的にどういうものかというと、同じ論文内では以下の様に提案されている。
  <blockquote>
    4.2 Building better/harder HIPs<br>
    The idea is that the additional arcs are themselves good candidates for false 
    characters. The previous segmentation attacks would fail on this HIP. Furthermore, 
    simple change of fonts, distortions, or arc types would require extensive work for 
    the attacker to adjust to.<br>
     <a href="/blog/entries/Misc/20071030_01/stronger_captcha.png" title="stronger captcha" rel="imagebox"><img src="/blog/entries/Misc/20071030_01/stronger_captcha.png" alt="[stronger captcha]" width="200"/></a>
  </blockquote>
  この方式のより詳細な情報が <a href="http://research.microsoft.com/~kumarc/pubs/chellapilla_hip05.pdf">Building Segmentation Based Humanfriendly Human Interaction Proofs (HIPs)</a> に記載されている。
  <br>
  <dl>
    <dt>Using Machine Learning to Break Visual Human Interaction Proofs (HIPs)</dt>
    <dd><a href="http://research.microsoft.com/~kumarc/pubs/chellapilla_nips04.pdf">http://research.microsoft.com/~kumarc/pubs/chellapilla_nips04.pdf</a></dd>
    <dt>Building Segmentation Based Humanfriendly Human Interaction Proofs (HIPs)</dt>
    <dd><a href="http://research.microsoft.com/~kumarc/pubs/chellapilla_hip05.pdf">http://research.microsoft.com/~kumarc/pubs/chellapilla_hip05.pdf</a></dd>
  </dl>
</p>
<h4>CAPTCHA の実装(Java)</h4>
<p>
  <a href="http://ja.wikipedia.org/wiki/CAPTCHA">Wikipedia の CAPTCHA</a> によると、CAPTCHA の Java 実装は結構あるようだ。
  <dl>
    <dt>The JCAPTCHA Project</dt>
    <dd><a href="http://jcaptcha.sourceforge.net/">http://jcaptcha.sourceforge.net/</a></dd>
    <dt>The reCAPTCHA Project</dt>
    <dd><a href="http://www.crt.realtors.org/projects/reCaptcha/">http://www.crt.realtors.org/projects/reCaptcha/</a></dd>
    <dt>The simple CAPTCHA Project</dt>
    <dd><a href="http://simplecaptcha.sourceforge.net/">http://simplecaptcha.sourceforge.net/</a></dd>
  </dl>
  この中でどれがより安全だろうか??
  JCAPTCHA の DoubleRandomListGimpyEngineCaptcha が分割しにくいように見えるけれど・・・。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071030_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Merlin/20071026_01.htm">
		<title><![CDATA[J2SE 1.4.2 EOL プロセス開始]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Merlin/20071026_01.htm</link>
		<description><![CDATA[  J2SE 1.4.2 EOL かい?? 早い! 早いよ!!        J2SE 1.4.2 は Sun のサポート終了 (End of Life, EOL) のプロセスを開始しました。    EOL 移行期間は 2006 年 12 月 11 日から次のバージョンである Java SE 7 の提供開始     (現時点では 2008 年 夏の予定) までです。この掲示をもってユーザの皆様は、    最新リリースである Java SE 6 への移行を開始する必要があります。             Sun Develper Network - J2SE 1.4.2    http://java.sun.com/j2se/1.4.2/ja/    Java Technology EOL Policy    http://java.sun.com/products/archive/eol.policy.html    JPCERT/CC REPORT 2007-10-24 - 今週のひとくちメモ J2SE 1.4.2 のサポート終了    http://www.jpcert.or.jp/wr/2007/wr074101.html#Memo  ]]></description>
		<dc:subject>Merlin</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-26T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  J2SE 1.4.2 EOL かい?? 早い! 早いよ!!<br>
  <br>
  <blockquote>
    J2SE 1.4.2 は Sun のサポート終了 (End of Life, EOL) のプロセスを開始しました。
    EOL 移行期間は 2006 年 12 月 11 日から次のバージョンである Java SE 7 の提供開始 
    (現時点では 2008 年 夏の予定) までです。この掲示をもってユーザの皆様は、
    最新リリースである Java SE 6 への移行を開始する必要があります。
  </blockquote><br>
   <a href="/blog/entries/Merlin/20071026_01/J2SE1-4-2_EOL.png" title="J2SE 1.4.2 EOL announce" rel="imagebox"><img src="/blog/entries/Merlin/20071026_01/J2SE1-4-2_EOL.png" alt="[J2SE 1.4.2 EOL announce]" width="250"/></a><br>
  <br>
  <dl>
    <dt>Sun Develper Network - J2SE 1.4.2</dt>
    <dd><a href="http://java.sun.com/j2se/1.4.2/ja/">http://java.sun.com/j2se/1.4.2/ja/</a></dd>
    <dt>Java Technology EOL Policy</dt>
    <dd><a href="http://java.sun.com/products/archive/eol.policy.html">http://java.sun.com/products/archive/eol.policy.html</a></dd>
    <dt>JPCERT/CC REPORT 2007-10-24 - 今週のひとくちメモ J2SE 1.4.2 のサポート終了</dt>
    <dd><a href="http://www.jpcert.or.jp/wr/2007/wr074101.html#Memo">http://www.jpcert.or.jp/wr/2007/wr074101.html#Memo</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Merlin/20071026_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071025_01.htm">
		<title><![CDATA[NetCommons にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071025_01.htm</link>
		<description><![CDATA[NetCommons とは  NetCommons というのは      このサイトは国立情報学研究所が次世代情報共有基盤システムとして開発したNetCommonsの公式サイトです。        NetCommonsはCMS（Contents Management System)とLMS（Learning Management System)    とグループウェアを統合したコミュニティウェアです。NetCommonsによって簡単に構築できるサイトとして、    次のようなものが挙げられます。          e-ラーニングサイト      NPOやNGOのためのバーチャルオフィス      共同研究・学会活動のポータルサイト兼グループウェア      オフィス用グループウェア      ソーシャルネットワークサービス        というものだそうだ。Xoops ベースで構築されているとのこと。  LMS のシステムは今まで触ったことが無かったので試してみた。      NetCommons    http://www.netcommons.org/  NetCommons のインストール  NetCommons には MySQL, PHP, Apache Web Server が必要。  それだけ揃えてしまえば、後は tar ball を拾ってきてインストーラを実行するだけ。  以下は Debian Etch 環境にインストールしたときのメモ。環境の準備  MySQL 5, PHP5 をインストール。Apache Web Server は 2.x がインストール済みだったのでそのまま利用。  # apt-get install mysql-server-5.0 php5 php5-mysql libapache2-mod-php5Reading package lists... DoneBuilding dependency tree... Done# mysql -u rootWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 8Server version: 5.0.32-Debian_7etch1-log Debian etch distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql&gt; create database netcommons;Query OK, 1 row affected (0.00 sec)mysql&gt; grant all on netcommons.* to netcommons identified by 'netcommons';Query OK, 0 rows affected (0.00 sec)mysql&gt; flush privileges;Query OK, 0 rows affected (0.00 sec)mysql&gt; exit       Bye# cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.original# vi /etc/php5/apache2/php.ini# diff /etc/php5/apache2/php.ini.original /etc/php5/apache2/php.ini599c599&lt; ;extension=mysql.so---&gt; extension=mysql.so# /etc/init.d/apache2 restartForcing reload of web server (apache2)... waiting .#  NetCommons の設置  NetCommons をダウンロードしてきて設置。  *.php ファイルが EUC-JP の CRLF になっていたので EUC-JP の LF に変換した。  # wget http://www.netcommons.org/modules/cabinet/downloadnum_add.php?path=%2Fcabinet%2F3%2F%A5%B3%A5%A2%A5%D1%A5%C3%A5%B1%A1%BC%A5%B8%CD%D1%2FNetCommons-1.1.2%2FNetCommons-1.1.2.tar.gz&file_id=1941[1] 2621# tar zxvf ./NetCommons-1.1.2.tar.gz ./NetCommons-1.1.2/./NetCommons-1.1.2/html/# cd ./NetCommons-1.1.2# cp -r ./html ./html.converted# cd ./html# for i in `find . -name '*.php'`; do nkf -Lu -e $i &gt; ../html.converted/$i; done# mv ./NetCommons-1.1.2/html.converted /var/www/netcommons# chmod 777 -R /var/www/netcommons/uploads/ /var/www/netcommons/cache/ /var/www/netcommons/templates_c/ /var/www/netcommons/themes/  NetCommons のインストール  "http://example.com/netcommons/" にアクセスしてインストーラを起動する。           NetCommons インストールの後片付け  インストーラの削除と設定ファイルの権限変更を行う。  # rm -rf /var/www/netcommons/install/# chmod 444 /var/www/netcommons/mainfile.php #   NetCommons にアクセス  "http://example.com/netcommons/" にアクセスする。  とりあえずインストール時に設定した管理者でログイン。  とりあえずは動いたが、何故か管理室に入ることが出来なかった。  NETCOMMONS_SYSTEM_PATH というグローバル変数(?) がセットされていないのだが・・・。  何故?? (面倒なので調べていないw)     ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-25T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>NetCommons とは</h4>
<p>
  NetCommons というのは
  <blockquote>
    このサイトは国立情報学研究所が次世代情報共有基盤システムとして開発したNetCommonsの公式サイトです。
  </blockquote>
  <blockquote>
    NetCommonsはCMS（Contents Management System)とLMS（Learning Management System)
    とグループウェアを統合したコミュニティウェアです。NetCommonsによって簡単に構築できるサイトとして、
    次のようなものが挙げられます。
    <ul>
      <li>e-ラーニングサイト</li>
      <li>NPOやNGOのためのバーチャルオフィス</li>
      <li>共同研究・学会活動のポータルサイト兼グループウェア</li>
      <li>オフィス用グループウェア</li>
      <li>ソーシャルネットワークサービス</li>
    </ul>
  </blockquote>
  というものだそうだ。Xoops ベースで構築されているとのこと。
  LMS のシステムは今まで触ったことが無かったので試してみた。
  <dl>
    <dt>NetCommons</dt>
    <dd><a href="http://www.netcommons.org/">http://www.netcommons.org/</a></dd>
  </dl>
</p>
<h4>NetCommons のインストール</h4>
<p>
  NetCommons には MySQL, PHP, Apache Web Server が必要。
  それだけ揃えてしまえば、後は tar ball を拾ってきてインストーラを実行するだけ。
  以下は Debian Etch 環境にインストールしたときのメモ。
</p>
<h5>環境の準備</h5>
<p>
  MySQL 5, PHP5 をインストール。Apache Web Server は 2.x がインストール済みだったのでそのまま利用。
  <blockquote>
<pre>
# apt-get install mysql-server-5.0 php5 php5-mysql libapache2-mod-php5
Reading package lists... Done
Building dependency tree... Done

# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.32-Debian_7etch1-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql&gt; create database netcommons;
Query OK, 1 row affected (0.00 sec)

mysql&gt; grant all on netcommons.* to netcommons identified by 'netcommons';
Query OK, 0 rows affected (0.00 sec)

mysql&gt; flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; exit       
Bye

# cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.original
# vi /etc/php5/apache2/php.ini
# diff /etc/php5/apache2/php.ini.original /etc/php5/apache2/php.ini
599c599
&lt; ;extension=mysql.so
---
&gt; extension=mysql.so

# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)... waiting .

#
</pre>
  </blockquote>
</p>
<h4>NetCommons の設置</h4>
<p>
  NetCommons をダウンロードしてきて設置。
  *.php ファイルが EUC-JP の CRLF になっていたので EUC-JP の LF に変換した。
  <blockquote>
<pre>
# wget http://www.netcommons.org/modules/cabinet/downloadnum_add.php?
path=%2Fcabinet%2F3%2F%A5%B3%A5%A2%A5%D1%A5%C3%A5%B1%A1%BC%A5%B8%CD%
D1%2FNetCommons-1.1.2%2FNetCommons-1.1.2.tar.gz&file_id=1941
[1] 2621

# tar zxvf ./NetCommons-1.1.2.tar.gz 
./NetCommons-1.1.2/
./NetCommons-1.1.2/html/

# cd ./NetCommons-1.1.2
# cp -r ./html ./html.converted
# cd ./html
# for i in `find . -name '*.php'`; do nkf -Lu -e $i &gt; ../html.converted/$i; done
# mv ./NetCommons-1.1.2/html.converted /var/www/netcommons
# chmod 777 -R /var/www/netcommons/uploads/ /var/www/netcommons/cache/ 
/var/www/netcommons/templates_c/ /var/www/netcommons/themes/
</pre>
  </blockquote>
</p>
<h4>NetCommons のインストール</h4>
<p>
  "http://example.com/netcommons/" にアクセスしてインストーラを起動する。<br>
  <br>
   <a href="/blog/entries/Misc/20071025_01/NetCommons_installer_0.png" title="NetCommons installer(0)" rel="imagebox"><img src="/blog/entries/Misc/20071025_01/NetCommons_installer_0.png" alt="[NetCommons installer(0)]" width="200"/></a>
   <a href="/blog/entries/Misc/20071025_01/NetCommons_installer_1.png" title="NetCommons installer(1)" rel="imagebox"><img src="/blog/entries/Misc/20071025_01/NetCommons_installer_1.png" alt="[NetCommons installer(1)]" width="200"/></a>
   <a href="/blog/entries/Misc/20071025_01/NetCommons_installer_2.png" title="NetCommons installer(2)" rel="imagebox"><img src="/blog/entries/Misc/20071025_01/NetCommons_installer_2.png" alt="[NetCommons installer(2)]" width="200"/></a>
</p>
<h4>NetCommons インストールの後片付け</h4>
<p>
  インストーラの削除と設定ファイルの権限変更を行う。
  <blockquote>
<pre>
# rm -rf /var/www/netcommons/install/
# chmod 444 /var/www/netcommons/mainfile.php 
# 
</pre>
  </blockquote>
</p>
<h4>NetCommons にアクセス</h4>
<p>
  "http://example.com/netcommons/" にアクセスする。
  とりあえずインストール時に設定した管理者でログイン。
  とりあえずは動いたが、何故か管理室に入ることが出来なかった。
  NETCOMMONS_SYSTEM_PATH というグローバル変数(?) がセットされていないのだが・・・。
  何故?? (面倒なので調べていないw)<br>
  <br>
   <a href="/blog/entries/Misc/20071025_01/NetCommons_home.png" title="NetCommons Home" rel="imagebox"><img src="/blog/entries/Misc/20071025_01/NetCommons_home.png" alt="[NetCommons Home]" width="200"/></a>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071025_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/WebService/20071024_01.htm">
		<title><![CDATA[PlaceEngine API にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/WebService/20071024_01.htm</link>
		<description><![CDATA[PlaceEngine とは  PlaceEngine は、Wi-Fi 機器を使って簡単に現在位置を推定してくれるソフトウェア。  以前 Mac OS X にインストールして放置してあったのだけれど、API があるということを知ったので早速試してみた。      PlaceEngine    http://www.placeengine.com/    PlaceEngine 技術資料    http://www.placeengine.com/doc    PlaceEngine API ローカルアプリケーションプログラミング    http://www.placeengine.com/doc/tutl  サンプルコード  サンプルコードは、PlaceEngine API ローカルアプリケーションプログラミングとほとんど同じ。  Mac OS X 版では LocalDB 機能(ローカルに位置情報を記録する機能) は使用できないということなので、PlaceEngine サーバに位置情報を問い合わせるサンプルだけ試してみた。    サンプルアプリを作成するためには、      ここ から PlaceEngine クライアントをダウンロードし、インストールする。ここでは 2007/10/24 現在最新の o070531 を使用するものとする。     PlaceEngine を起動する。    ここで PlaceEngine API アプリケーションキーを取得する。    の準備が必要。  PlaceEngine API は直接 PlaceEngine サーバに問い合わせるわけではなく、ローカルの PlaceEngine クライアントに問い合わせるものなので、PlaceEngine クライアントがローカルで起動していないと動作しない。    サンプルを動作させると PlaceEngine がセキュリティ警告ダイアログを表示する。  実行しても安全だと思う場合は YES をクリックする。     package jp.in_vitro.codelets;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.net.HttpURLConnection;import java.net.URL;public class Codelet {    private static final String KEY = "aNR3HYXx1jzYqw24...";    private static final String URL_RTAGJS = "http://localhost:5448/rtagjs";    private static final String URL_LOC = "http://www.placeengine.com/api/loc";    private final long t;    public Codelet() {        super();        System.setProperty("http.nonProxyHosts", "localhost");        this.t = System.currentTimeMillis() / 1000;    }    public Loc getLoc() throws IOException {        Rtag rtag = this.getRtag(t);        if (rtag.getNumap() &gt; 0) {            String locRequest = URL_LOC + "?t=" + this.t + "&amp;rtag="                    + rtag.getRtag() + "&amp;appk=" + KEY + "&amp;fmt=json";            StringBuilder locResponse = sendHttpRequest(new URL(locRequest));            return parseLocResponse(locResponse);        }        return null;    }    protected Loc parseLocResponse(final StringBuilder response) {        Loc location = new Loc();        response.deleteCharAt(0);        String responseAsString = new String(response);        String param[] = responseAsString.split(",");        String param2[] = responseAsString.split("\\{");        if (param.length &gt;= 4 &amp;&amp; param2.length &gt;= 2) {            location.setLon(param[0]);            location.setLat(param[1]);            String info[] = param2[1].substring(0, param2[1].length() - 1)                    .split(",");            for (int i = 0; i &lt; info.length; i++) {                String tk[] = info[i].split(":");                String name = tk[0].substring(1, tk[0].length() - 1);                String value = tk[1];                if ("addr".equals(name)) {                    location.setAddr(value);                } else if ("msg".equals(name)) {                    location.setMsg(value);                } else if ("floor".equals(name)) {                    location.setFloor(value);                } else if ("t".equals(name)) {                    location.setT(value);                }            }        }        return location;    }    protected void printLoc(final Loc loc) {        System.out.println("Longitude(経度) : " + loc.getLon());        System.out.println("Latitude(緯度)  : " + loc.getLat());        System.out.println("Address(住所)   : " + loc.getAddr());        System.out.println("Floor          : " + loc.getFloor());        System.out.println("Message        : " + loc.getMsg());    }    public Rtag getRtag(final long t) throws IOException {        String rtagRequest = URL_RTAGJS + "?t=" + this.t + "&amp;appk=" + KEY;        StringBuilder rtagResponse = sendHttpRequest(new URL(rtagRequest));        Rtag rtag = this.parseRtagResponse(rtagResponse);        return rtag;    }    protected Rtag parseRtagResponse(final StringBuilder response) {        Rtag rtag = new Rtag();        String splitRtagjsResponse[] = response.substring(9,                response.length() - 2).split(", *");        String r = splitRtagjsResponse[0].substring(1, splitRtagjsResponse[0]                .length() - 1);        int numap = Integer.parseInt(splitRtagjsResponse[1]);        String t = splitRtagjsResponse[2];        rtag.setRtag(r);        rtag.setNumap(numap);        rtag.setT(t);        return rtag;    }    protected StringBuilder sendHttpRequest(final URL url) throws IOException {        HttpURLConnection connection = null;        BufferedReader reader = null;        try {            connection = (HttpURLConnection) url.openConnection();            connection.connect();            reader = new BufferedReader(new InputStreamReader(connection                    .getInputStream(), "UTF-8"));            StringBuilder response = new StringBuilder();            String line = null;            while ((line = reader.readLine()) != null) {                response.append(line);            }            return response;        } finally {            try {                if (reader != null) {                    reader.close();                }            } finally {                if (connection != null) {                    connection.disconnect();                }            }        }    }    public static void main(final String[] args) throws Exception {        Codelet me = new Codelet();        Loc loc = me.getLoc();        me.printLoc(loc);    }    public static class Rtag {        private String rtag;        private int numap;        private String t;        public Rtag() {            super();        }        public String getRtag() {            return this.rtag;        }        public void setRtag(final String rtag) {            this.rtag = rtag;        }        public int getNumap() {            return this.numap;        }        public void setNumap(final int numap) {            this.numap = numap;        }        public String getT() {            return this.t;        }        public void setT(final String t) {            this.t = t;        }    }    public static class Loc {        private String lat;        private String lon;        private String addr;        private String msg;        private String floor;        private String t;        public Loc() {            super();        }        public String getLat() {            return this.lat;        }        public void setLat(final String lat) {            this.lat = lat;        }        public String getLon() {            return this.lon;        }        public void setLon(final String lon) {            this.lon = lon;        }        public String getAddr() {            return this.addr;        }        public void setAddr(final String addr) {            this.addr = addr;        }        public String getMsg() {            return this.msg;        }        public void setMsg(final String msg) {            this.msg = msg;        }        public String getFloor() {            return this.floor;        }        public void setFloor(final String floor) {            this.floor = floor;        }        public String getT() {            return this.t;        }        public void setT(final String t) {            this.t = t;        }    }}  サンプルコードの実行結果  Longitude(経度) : 13*.******Latitude(緯度)  : 3*.******Address(住所)   : '東京都************'Floor          : nullMessage        : '位置が取得できました'  ]]></description>
		<dc:subject>WebService</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-24T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>PlaceEngine とは</h4>
<p>
  PlaceEngine は、Wi-Fi 機器を使って簡単に現在位置を推定してくれるソフトウェア。
  以前 Mac OS X にインストールして放置してあったのだけれど、API があるということを知ったので早速試してみた。
  <dl>
    <dt>PlaceEngine</dt>
    <dd><a href="http://www.placeengine.com/">http://www.placeengine.com/</a></dd>
    <dt>PlaceEngine 技術資料</dt>
    <dd><a href="http://www.placeengine.com/doc">http://www.placeengine.com/doc</a></dd>
    <dt>PlaceEngine API ローカルアプリケーションプログラミング</dt>
    <dd><a href="http://www.placeengine.com/doc/tutl">http://www.placeengine.com/doc/tutl</a></dd>
  </dl>
</p>
<h4>サンプルコード</h4>
<p>
  サンプルコードは、<a href="http://www.placeengine.com/doc/tutl">PlaceEngine API ローカルアプリケーションプログラミング</a>とほとんど同じ。
  Mac OS X 版では LocalDB 機能(ローカルに位置情報を記録する機能) は使用できないということなので、PlaceEngine サーバに位置情報を問い合わせるサンプルだけ試してみた。<br>
  <br>
  サンプルアプリを作成するためには、
  <ol>
    <li><a href="http://www.placeengine.com/show/install">ここ</a> から PlaceEngine クライアントをダウンロードし、インストールする。ここでは 2007/10/24 現在最新の o070531 を使用するものとする。 <a href="/blog/entries/WebService/20071024_01/PlaceEngine_version.png" title="PlaceEngine version" rel="imagebox"><img src="/blog/entries/WebService/20071024_01/PlaceEngine_version.png" alt="[PlaceEngine version]" width="200"/></a></li>
    <li>PlaceEngine を起動する。</li>
    <li><a href="http://www.placeengine.com/appk">ここ</a>で PlaceEngine API アプリケーションキーを取得する。</li>
  </ol>
  の準備が必要。
  PlaceEngine API は直接 PlaceEngine サーバに問い合わせるわけではなく、ローカルの PlaceEngine クライアントに問い合わせるものなので、PlaceEngine クライアントがローカルで起動していないと動作しない。<br>
  <br>
  サンプルを動作させると PlaceEngine がセキュリティ警告ダイアログを表示する。
  実行しても安全だと思う場合は YES をクリックする。<br>
   <a href="/blog/entries/WebService/20071024_01/PlaceEngine_warning.png" title="PlaceEngine warning" rel="imagebox"><img src="/blog/entries/WebService/20071024_01/PlaceEngine_warning.png" alt="[PlaceEngine warning]" width="200"/></a>
</p>
<p>
  <blockquote>
<pre>
package jp.in_vitro.codelets;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Codelet {

    private static final String KEY = "aNR3HYXx1jzYqw24...";
    private static final String URL_RTAGJS = "http://localhost:5448/rtagjs";
    private static final String URL_LOC = "http://www.placeengine.com/api/loc";
    private final long t;

    public Codelet() {
        super();

        System.setProperty("http.nonProxyHosts", "localhost");
        this.t = System.currentTimeMillis() / 1000;
    }

    public Loc getLoc() throws IOException {
        Rtag rtag = this.getRtag(t);

        if (rtag.getNumap() &gt; 0) {
            String locRequest = URL_LOC + "?t=" + this.t + "&amp;rtag="
                    + rtag.getRtag() + "&amp;appk=" + KEY + "&amp;fmt=json";
            StringBuilder locResponse = sendHttpRequest(new URL(locRequest));
            return parseLocResponse(locResponse);
        }
        return null;
    }

    protected Loc parseLocResponse(final StringBuilder response) {
        Loc location = new Loc();

        response.deleteCharAt(0);
        String responseAsString = new String(response);
        String param[] = responseAsString.split(",");
        String param2[] = responseAsString.split("\\{");

        if (param.length &gt;= 4 &amp;&amp; param2.length &gt;= 2) {
            location.setLon(param[0]);
            location.setLat(param[1]);

            String info[] = param2[1].substring(0, param2[1].length() - 1)
                    .split(",");
            for (int i = 0; i &lt; info.length; i++) {
                String tk[] = info[i].split(":");
                String name = tk[0].substring(1, tk[0].length() - 1);
                String value = tk[1];
                if ("addr".equals(name)) {
                    location.setAddr(value);
                } else if ("msg".equals(name)) {
                    location.setMsg(value);
                } else if ("floor".equals(name)) {
                    location.setFloor(value);
                } else if ("t".equals(name)) {
                    location.setT(value);
                }
            }
        }
        return location;
    }

    protected void printLoc(final Loc loc) {
        System.out.println("Longitude(経度) : " + loc.getLon());
        System.out.println("Latitude(緯度)  : " + loc.getLat());
        System.out.println("Address(住所)   : " + loc.getAddr());
        System.out.println("Floor          : " + loc.getFloor());
        System.out.println("Message        : " + loc.getMsg());
    }

    public Rtag getRtag(final long t) throws IOException {
        String rtagRequest = URL_RTAGJS + "?t=" + this.t + "&amp;appk=" + KEY;
        StringBuilder rtagResponse = sendHttpRequest(new URL(rtagRequest));
        Rtag rtag = this.parseRtagResponse(rtagResponse);
        return rtag;
    }

    protected Rtag parseRtagResponse(final StringBuilder response) {
        Rtag rtag = new Rtag();

        String splitRtagjsResponse[] = response.substring(9,
                response.length() - 2).split(", *");
        String r = splitRtagjsResponse[0].substring(1, splitRtagjsResponse[0]
                .length() - 1);
        int numap = Integer.parseInt(splitRtagjsResponse[1]);
        String t = splitRtagjsResponse[2];

        rtag.setRtag(r);
        rtag.setNumap(numap);
        rtag.setT(t);

        return rtag;
    }

    protected StringBuilder sendHttpRequest(final URL url) throws IOException {
        HttpURLConnection connection = null;
        BufferedReader reader = null;
        try {
            connection = (HttpURLConnection) url.openConnection();
            connection.connect();
            reader = new BufferedReader(new InputStreamReader(connection
                    .getInputStream(), "UTF-8"));
            StringBuilder response = new StringBuilder();
            String line = null;
            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            return response;
        } finally {
            try {
                if (reader != null) {
                    reader.close();
                }
            } finally {
                if (connection != null) {
                    connection.disconnect();
                }
            }
        }
    }

    public static void main(final String[] args) throws Exception {
        Codelet me = new Codelet();
        Loc loc = me.getLoc();
        me.printLoc(loc);
    }

    public static class Rtag {

        private String rtag;
        private int numap;
        private String t;

        public Rtag() {
            super();
        }
        public String getRtag() {
            return this.rtag;
        }
        public void setRtag(final String rtag) {
            this.rtag = rtag;
        }
        public int getNumap() {
            return this.numap;
        }
        public void setNumap(final int numap) {
            this.numap = numap;
        }
        public String getT() {
            return this.t;
        }
        public void setT(final String t) {
            this.t = t;
        }
    }

    public static class Loc {
        private String lat;
        private String lon;
        private String addr;
        private String msg;
        private String floor;
        private String t;

        public Loc() {
            super();
        }

        public String getLat() {
            return this.lat;
        }
        public void setLat(final String lat) {
            this.lat = lat;
        }
        public String getLon() {
            return this.lon;
        }
        public void setLon(final String lon) {
            this.lon = lon;
        }
        public String getAddr() {
            return this.addr;
        }
        public void setAddr(final String addr) {
            this.addr = addr;
        }
        public String getMsg() {
            return this.msg;
        }
        public void setMsg(final String msg) {
            this.msg = msg;
        }
        public String getFloor() {
            return this.floor;
        }
        public void setFloor(final String floor) {
            this.floor = floor;
        }
        public String getT() {
            return this.t;
        }
        public void setT(final String t) {
            this.t = t;
        }
    }
}
</pre>
  </blockquote>
</p>
<h4>サンプルコードの実行結果</h4>
<p>
  <blockquote>
<pre>
Longitude(経度) : 13*.******
Latitude(緯度)  : 3*.******
Address(住所)   : '東京都************'
Floor          : null
Message        : '位置が取得できました'
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/WebService/20071024_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Library/20071023_01.htm">
		<title><![CDATA[jMock で java.sql.Connection のモックオブジェクト生成にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Library/20071023_01.htm</link>
		<description><![CDATA[  JMock で java.sql.Connection のモックオブジェクト作成に挑戦してみた。  ・・・と言っても、まだ jMock のサンプルを眺めただけ。      jMock    http://www.jmock.org/  サンプルコード - その1  とりあえず基礎の基礎。  単純な java.sql.Connection のモックオブジェクトを作成してみた。  example1 はテスト成功パターン。example2 はテスト失敗パターン。  package jp.in_vitro.codelets.jmock;import java.sql.Connection;import java.sql.SQLException;import java.sql.Statement;import org.jmock.Expectations;import org.jmock.Mockery;public class Codelet {    public static void main(String[] args) throws SQLException {        Codelet me = new Codelet();        me.example0();        me.example1();    }    protected void example0() throws SQLException {        Mockery context = new Mockery();        final Connection connection = context.mock(Connection.class);        context.checking(new Expectations() {            {                one(connection).close();            }        });        connection.close();        context.assertIsSatisfied();    }    protected void example1() throws SQLException {        Mockery context = new Mockery();        final Connection connection = context.mock(Connection.class);        context.checking(new Expectations() {            {                one(connection).close();            }        });        // connection.close();        context.assertIsSatisfied();    }}  サンプルコード - その2  次に java.sql.Connection から java.sql.Statement を返してみた。  とりあえず指定した java.sql.Statement を java.sql.Connection#createStatement から返すことに成功。  package jp.in_vitro.codelets.jmock;import java.sql.Connection;import java.sql.SQLException;import java.sql.Statement;import org.jmock.Expectations;import org.jmock.Mockery;public class Codelet {    public static void main(String[] args) throws SQLException {        Codelet me = new Codelet();        me.example2();    }    protected void example2() throws SQLException {        Mockery context = new Mockery();        final Connection connection = context.mock(Connection.class);        final Statement expected = context.mock(Statement.class);        context.checking(new Expectations() {            {                one(connection).createStatement();                will(returnValue(expected));            }        });        Statement actual = connection.createStatement();        System.out.println("expected: " + expected + "@" + expected.hashCode());        System.out.println("actual: " + actual + "@" + actual.hashCode());        context.assertIsSatisfied();    }}  ]]></description>
		<dc:subject>Library</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-23T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  JMock で java.sql.Connection のモックオブジェクト作成に挑戦してみた。
  ・・・と言っても、まだ jMock のサンプルを眺めただけ。
  <dl>
    <dt>jMock</dt>
    <dd><a href="http://www.jmock.org/">http://www.jmock.org/</a></dd>
  </dl>
</p>
<h4>サンプルコード - その1</h4>
<p>
  とりあえず基礎の基礎。
  単純な java.sql.Connection のモックオブジェクトを作成してみた。
  example1 はテスト成功パターン。example2 はテスト失敗パターン。
  <blockquote>
<pre>
package jp.in_vitro.codelets.jmock;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import org.jmock.Expectations;
import org.jmock.Mockery;

public class Codelet {

    public static void main(String[] args) throws SQLException {
        Codelet me = new Codelet();
        me.example0();
        me.example1();
    }

    protected void example0() throws SQLException {
        Mockery context = new Mockery();
        final Connection connection = context.mock(Connection.class);
        context.checking(new Expectations() {
            {
                one(connection).close();
            }
        });

        connection.close();
        context.assertIsSatisfied();
    }

    protected void example1() throws SQLException {
        Mockery context = new Mockery();
        final Connection connection = context.mock(Connection.class);
        context.checking(new Expectations() {
            {
                one(connection).close();
            }
        });

        // connection.close();
        context.assertIsSatisfied();
    }
}
</pre>
  </blockquote>
</p>
<h4>サンプルコード - その2</h4>
<p>
  次に java.sql.Connection から java.sql.Statement を返してみた。
  とりあえず指定した java.sql.Statement を java.sql.Connection#createStatement から返すことに成功。
  <blockquote>
<pre>
package jp.in_vitro.codelets.jmock;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import org.jmock.Expectations;
import org.jmock.Mockery;

public class Codelet {

    public static void main(String[] args) throws SQLException {
        Codelet me = new Codelet();
        me.example2();
    }

    protected void example2() throws SQLException {
        Mockery context = new Mockery();
        final Connection connection = context.mock(Connection.class);
        final Statement expected = context.mock(Statement.class);
        context.checking(new Expectations() {
            {
                one(connection).createStatement();
                will(returnValue(expected));
            }
        });

        Statement actual = connection.createStatement();
        System.out.println("expected: " + expected + "@" + expected.hashCode());
        System.out.println("actual: " + actual + "@" + actual.hashCode());
        context.assertIsSatisfied();
    }
}
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20071023_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071022_01.htm">
		<title><![CDATA[各社携帯の XHTML 対応状況メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071022_01.htm</link>
		<description><![CDATA[  NTT Docomo, AU, Softbank mobile の XHTML 対応状況を調べたのでメモ。NTT Docomo  「端末スペック一覧」ページに XHTML の対応状況が記載されている。      XHTML Basic 1.1    http://www.w3.org/TR/xhtml-basic/    作ろう i モードコンテンツ    http://www.nttdocomo.co.jp/service/imode/make/    端末スペック一覧    http://www.nttdocomo.co.jp/service/imode/make/content/spec/index.html    iモード対応XHTMLの考え方    http://www.nttdocomo.co.jp/service/imode/make/content/xhtml/outline/s1.html  AU  「XHTML 対応機種」ページによると  「XHTML」で表記されたコンテンツを、作成者の意図どおりのデザインで閲覧するには、WAP2.0ブラウザ搭載端末で表示する必要があります。HDMLブラウザ搭載端末では、HDML標準対応となり、「XHTML」コンテンツに関しては、EZサーバによるコンテンツ変換機能を使用し「XHTML → HDML」の変換を行って表示することになります。    ということだそうだ。WAP2.0ブラウザ搭載状況は「機種別情報一覧」ページに記載されている。      技術情報    http://www.au.kddi.com/ezfactory/tec/index.html    XHTML 対応機種    http://www.au.kddi.com/ezfactory/howtoxhtml/02.html    機種別情報一覧    http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html  Softbank mobile  「ウェブ技術資料 - 概要編」によると  1.2 サービス世代以降、回線交換のみに対応する端末を C 型端末と呼称し、パケット交換サービス(PDC-P)にも対応する端末を P 型端末と呼称し、3G サービスに対応する端末を W 型端末、WAP/MMS サービスに対応する端末を 3GC 型端末と呼称する。1.3.1. ウェブ・コンテンツは HTML(Hyper Text Markup Language) もしくは MML(Mobile Markup Language), XHTML で記述する。ただし、MML は C 型および P 型端末でのみ利用可能であり、 XHTML は W 型、3GC 型端末でのみ利用可能である。    だそうだ。3G サービス対応端末、WAP/MMS サービス対応端末で表示可能ということのようだ。  ・・・残念なことに、3G サービス対応端末、WAP/MMS サービス対応端末の情報は見当たらなかった。      Softbank Developers Support Site    http://developers.softbankmobile.co.jp/dp/    ウェブ技術資料 - 概要編    http://www2.developers.softbankmobile.co.jp/dp/tool_dl/download.php?docid=110&companyid=    ウェブ技術資料 - XHTML 編    http://www2.developers.softbankmobile.co.jp/dp/tool_dl/download.php?docid=135&companyid=    端末情報    http://developers.softbankmobile.co.jp/dp/tech_svc/info/  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-22T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  NTT Docomo, AU, Softbank mobile の XHTML 対応状況を調べたのでメモ。
</p>
<h4>NTT Docomo</h4>
<p>
  「端末スペック一覧」ページに XHTML の対応状況が記載されている。
  <dl>
    <dt>XHTML Basic 1.1</dt>
    <dd><a href="http://www.w3.org/TR/xhtml-basic/">http://www.w3.org/TR/xhtml-basic/</a></dd>
    <dt>作ろう i モードコンテンツ</dt>
    <dd><a href="http://www.nttdocomo.co.jp/service/imode/make/">http://www.nttdocomo.co.jp/service/imode/make/</a></dd>
    <dt>端末スペック一覧</dt>
    <dd><a href="http://www.nttdocomo.co.jp/service/imode/make/content/spec/index.html">http://www.nttdocomo.co.jp/service/imode/make/content/spec/index.html</a></dd>
    <dt>iモード対応XHTMLの考え方</dt>
    <dd><a href="http://www.nttdocomo.co.jp/service/imode/make/content/xhtml/outline/s1.html">http://www.nttdocomo.co.jp/service/imode/make/content/xhtml/outline/s1.html</a></dd>
  </dl>
</p>
<h4>AU</h4>
<p>
  「XHTML 対応機種」ページによると
  <blockquote>
「XHTML」で表記されたコンテンツを、作成者の意図どおりのデザインで閲覧するには、WAP2.0ブラウザ搭載端末で表示する必要があります。HDMLブラウザ搭載端末では、HDML標準対応となり、「XHTML」コンテンツに関しては、EZサーバによるコンテンツ変換機能を使用し「XHTML → HDML」の変換を行って表示することになります。
  </blockquote>
  ということだそうだ。WAP2.0ブラウザ搭載状況は「機種別情報一覧」ページに記載されている。
  <dl>
    <dt>技術情報</dt>
    <dd><a href="http://www.au.kddi.com/ezfactory/tec/index.html">http://www.au.kddi.com/ezfactory/tec/index.html</a></dd>
    <dt>XHTML 対応機種</dt>
    <dd><a href="http://www.au.kddi.com/ezfactory/howtoxhtml/02.html">http://www.au.kddi.com/ezfactory/howtoxhtml/02.html</a></dd>
    <dt>機種別情報一覧</dt>
    <dd><a href="http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html">http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html</a></dd>
  </dl>
</p>
<h4>Softbank mobile</h4>
<p>
  「ウェブ技術資料 - 概要編」によると
  <blockquote>
1.2 サービス世代<br>
以降、回線交換のみに対応する端末を C 型端末と呼称し、パケット交換サービス(PDC-P)にも対応する端末を P 型端末と呼称し、3G サービスに対応する端末を W 型端末、WAP/MMS サービスに対応する端末を 3GC 型端末と呼称する。<br>
<br>
1.3.1. ウェブ<br>
・コンテンツは HTML(Hyper Text Markup Language) もしくは MML(Mobile Markup Language), XHTML で記述する。ただし、MML は C 型および P 型端末でのみ利用可能であり、 XHTML は W 型、3GC 型端末でのみ利用可能である。<br>
  </blockquote>
  だそうだ。3G サービス対応端末、WAP/MMS サービス対応端末で表示可能ということのようだ。
  ・・・残念なことに、3G サービス対応端末、WAP/MMS サービス対応端末の情報は見当たらなかった。
  <dl>
    <dt>Softbank Developers Support Site</dt>
    <dd><a href="http://developers.softbankmobile.co.jp/dp/">http://developers.softbankmobile.co.jp/dp/</a></dd>
    <dt>ウェブ技術資料 - 概要編</dt>
    <dd><a href="http://www2.developers.softbankmobile.co.jp/dp/tool_dl/download.php?docid=110&companyid=">http://www2.developers.softbankmobile.co.jp/dp/tool_dl/download.php?docid=110&companyid=</a></dd>
    <dt>ウェブ技術資料 - XHTML 編</dt>
    <dd><a href="http://www2.developers.softbankmobile.co.jp/dp/tool_dl/download.php?docid=135&companyid=">http://www2.developers.softbankmobile.co.jp/dp/tool_dl/download.php?docid=135&companyid=</a></dd>
    <dt>端末情報</dt>
    <dd><a href="http://developers.softbankmobile.co.jp/dp/tech_svc/info/">http://developers.softbankmobile.co.jp/dp/tech_svc/info/</a></dd>
  </dl>
</p>
]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071022_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071016_01.htm">
		<title><![CDATA[Pathway メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071016_01.htm</link>
		<description><![CDATA[       Pathway は Wikipedia ビューア。  Wikipedia の関連付けられたエントリからエントリへ渡り歩きながら必要な知識を得ることができる。  これは便利。          Pathway is an app designed to solve the aforementioned problems.     Its aim is to help you discover Wikipedia without having to worry     whether you’ll have enough time to read everything you want, or if you’ll get lost.            It accomplishes this by presenting you with a graphical “network” representation     of your visited article pages. A node represents an article,     a connection between two nodes means, of course,     that you’ve gone from the first article to the second one.     You can save the network you’ve created to disk and recover it.        Pathway    http://pathway.screenager.be/    About Pathway    http://pathway.screenager.be/about-pathway/  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-16T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
   <a href="/blog/entries/Apple/20071016_01/Pathway.png" title="Pathway" rel="imagebox"><img src="/blog/entries/Apple/20071016_01/Pathway.png" alt="[Pathway]" width="350"/></a><br>
  <br>
  Pathway は Wikipedia ビューア。
  Wikipedia の関連付けられたエントリからエントリへ渡り歩きながら必要な知識を得ることができる。
  これは便利。
  <br>
  <br>
  <blockquote>
    Pathway is an app designed to solve the aforementioned problems. 
    Its aim is to help you discover Wikipedia without having to worry 
    whether you’ll have enough time to read everything you want, or if you’ll get lost.
    <br>
    <br>
    It accomplishes this by presenting you with a graphical “network” representation 
    of your visited article pages. A node represents an article, 
    a connection between two nodes means, of course, 
    that you’ve gone from the first article to the second one. 
    You can save the network you’ve created to disk and recover it.
  </blockquote>
  <dl>
    <dt>Pathway</dt>
    <dd><a href="http://pathway.screenager.be/">http://pathway.screenager.be/</a></dd>
    <dt>About Pathway</dt>
    <dd><a href="http://pathway.screenager.be/about-pathway/">http://pathway.screenager.be/about-pathway/</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071016_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071014_01.htm">
		<title><![CDATA[Shrook メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071014_01.htm</link>
		<description><![CDATA[       Shrook は Mac OS X 用の RSS Reader。  しばらく Vienna を使用していたのだが、唐突に Feed の読み込みをしてくれなくなった。  どうも過去のエントリデータが破損した模様。  機能的には満足していたのだが、どうも動作がもっさりしていたこともあり Shrook を試してみることにした。  さて、データ量が増えてきたときにどうなることやら・・・。      Shrook    http://www.utsire.com/shrook/  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-14T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
   <a href="/blog/entries/Apple/20071014_01/Shrook.png" title="Shrook" rel="imagebox"><img src="/blog/entries/Apple/20071014_01/Shrook.png" alt="[Shrook]" width="350"/></a><br>
  <br>
  Shrook は Mac OS X 用の RSS Reader。
  しばらく Vienna を使用していたのだが、唐突に Feed の読み込みをしてくれなくなった。
  どうも過去のエントリデータが破損した模様。
  機能的には満足していたのだが、どうも動作がもっさりしていたこともあり Shrook を試してみることにした。
  さて、データ量が増えてきたときにどうなることやら・・・。
  <dl>
    <dt>Shrook</dt>
    <dd><a href="http://www.utsire.com/shrook/">http://www.utsire.com/shrook/</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071014_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20071013_01.htm">
		<title><![CDATA[SSL 証明書のインストール時に X509_check_private_key:key values mismatch エラー]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20071013_01.htm</link>
		<description><![CDATA[  Apache Web Server 2.2.6 に SSL 証明書をインストールしたときに不思議なエラーに遭遇した。  [warn] RSA server certificate CommonName (CN) `hoge.example.com' does NOT match server name!?[error] Unable to configure RSA server private key[error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch    何のことはない、間違って別サーバの SSL 証明書を使っていただけだった(^^;    # openssl x509 -noout -text -in ./server.crt    で SSL 証明書の内容を確認したら別サーバのものであることが一瞬で判明。  正しい SSL 証明書を持ってきたらすぐに解決。やれやれ。]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-13T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Apache Web Server 2.2.6 に SSL 証明書をインストールしたときに不思議なエラーに遭遇した。
  <blockquote>
<pre>
[warn] RSA server certificate CommonName (CN) `hoge.example.com' does NOT match server name!?
[error] Unable to configure RSA server private key
[error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
</pre>
  </blockquote>
  何のことはない、間違って別サーバの SSL 証明書を使っていただけだった(^^;
  <blockquote>
<pre>
  # openssl x509 -noout -text -in ./server.crt
</pre>
  </blockquote>
  で SSL 証明書の内容を確認したら別サーバのものであることが一瞬で判明。
  正しい SSL 証明書を持ってきたらすぐに解決。やれやれ。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20071013_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.htm">
		<title><![CDATA[ImageMagick を Mac OS X にインストール]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.htm</link>
		<description><![CDATA[  ImageMagick を Mac OS X にインストールした際のメモ。  メモと言っても、MacPorts を使っているので大したことはやっていない。      ImageMagick: Convert, Edit, and Compose Images    http://www.imagemagick.org/  MacPorts を使って ImageMagick をインストール  $ sudo port install ImageMagick  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-10T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  ImageMagick を Mac OS X にインストールした際のメモ。
  メモと言っても、MacPorts を使っているので大したことはやっていない。
  <dl>
    <dt>ImageMagick: Convert, Edit, and Compose Images</dt>
    <dd><a href="http://www.imagemagick.org/">http://www.imagemagick.org/</a></dd>
  </dl>
</p>
<h4>MacPorts を使って ImageMagick をインストール</h4>
<p>
  <blockquote>
<pre>
$ sudo port install ImageMagick
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.txt.htm">
		<title><![CDATA[ImageMagick を Mac OS X にインストール]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.txt.htm</link>
		<description><![CDATA[  ImageMagick を Mac OS X にインストールした際のメモ。  メモと言っても、MacPorts を使っているので大したことはやっていない。      ImageMagick: Convert, Edit, and Compose Images    http://www.imagemagick.org/  MacPorts を使って ImageMagick をインストール  $ sudo port install ImageMagick  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-10T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  ImageMagick を Mac OS X にインストールした際のメモ。
  メモと言っても、MacPorts を使っているので大したことはやっていない。
  <dl>
    <dt>ImageMagick: Convert, Edit, and Compose Images</dt>
    <dd><a href="http://www.imagemagick.org/">http://www.imagemagick.org/</a></dd>
  </dl>
</p>
<h4>MacPorts を使って ImageMagick をインストール</h4>
<p>
  <blockquote>
<pre>
$ sudo port install ImageMagick
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071010_01.txt.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20071009_01.htm">
		<title><![CDATA[MacPorts を Mac OS X にインストール]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20071009_01.htm</link>
		<description><![CDATA[  MacPorts を Mac OS X にインストールした際のメモ。      MacPorts    http://www.macports.org/  MacPorts のインストール      MacPorts のサイトから dmg ファイルを拾ってくる。    dmg をマウントし、インストーラを実行。後はウィザードの指示通り。          /Users/me/.bashrc を編集。以下を追加する。      export PATH=/opt/local/bin:/opt/local/sbin/:$PATHexport MANPATH=/opt/local/man:$MANPATH                    MacPorts の初期設定。      $ sudo port -d selfupdate$ sudo port -d sync            ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-10-09T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  MacPorts を Mac OS X にインストールした際のメモ。
  <dl>
    <dt>MacPorts</dt>
    <dd><a href="http://www.macports.org/">http://www.macports.org/</a></dd>
  </dl>
</p>
<h4>MacPorts のインストール</h4>
<p>
  <ol>
    <li>MacPorts のサイトから dmg ファイルを拾ってくる。</li>
    <li>dmg をマウントし、インストーラを実行。後はウィザードの指示通り。</li>
    <li>
      /Users/me/.bashrc を編集。以下を追加する。
      <blockquote>
<pre>
export PATH=/opt/local/bin:/opt/local/sbin/:$PATH
export MANPATH=/opt/local/man:$MANPATH
</pre>
      </blockquote>
    </li>
    <li>
      MacPorts の初期設定。
      <blockquote>
<pre>
$ sudo port -d selfupdate
$ sudo port -d sync
</pre>
      </blockquote>
    </li>
  </ol>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20071009_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20070927_01.htm">
		<title><![CDATA[Growl メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20070927_01.htm</link>
		<description><![CDATA[           Growl    http://growl.info/    growliChat    http://growlichat.com/    Gmail + Growl for Google Notifier    http://wafflesoftware.net/gmailgrowl/    NETAFULL - アプリケーションのイベントを通知してくれる「Growl」    http://netafull.net/macsoft/020136.html    ステキMac使いを目指す日記 - Growlを使ってMac OS Xの様々なイベントを通知する    http://d.hatena.ne.jp/mteramoto/20070404/p1  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-09-27T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
   <a href="/blog/entries/Apple/20070927_01/Growl.png" title="Growl notifier" rel="imagebox"><img src="/blog/entries/Apple/20070927_01/Growl.png" alt="[Growl notifier]" width="150"/></a><br>
  <br>
  <dl>
    <dt>Growl</dt>
    <dd><a href="http://growl.info/">http://growl.info/</a></dd>
    <dt>growliChat</dt>
    <dd><a href="http://growlichat.com/">http://growlichat.com/</a></dd>
    <dt>Gmail + Growl for Google Notifier</dt>
    <dd><a href="http://wafflesoftware.net/gmailgrowl/">http://wafflesoftware.net/gmailgrowl/</a></dd>
    <dt>NETAFULL - アプリケーションのイベントを通知してくれる「Growl」</dt>
    <dd><a href="http://netafull.net/macsoft/020136.html">http://netafull.net/macsoft/020136.html</a></dd>
    <dt>ステキMac使いを目指す日記 - Growlを使ってMac OS Xの様々なイベントを通知する</dt>
    <dd><a href="http://d.hatena.ne.jp/mteramoto/20070404/p1">http://d.hatena.ne.jp/mteramoto/20070404/p1</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070927_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070926_01.htm">
		<title><![CDATA[HTML5 メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070926_01.htm</link>
		<description><![CDATA[  HTML 5 の関連情報をメモ。      HTML 5 Working Draft    http://www.whatwg.org/specs/web-apps/current-work/    WAHTWG - WHATWG and HTML 5 FAQ 日本語訳    http://www.html5.jp/trans/whatwg_html5faq.html    HTML 5 の新要素    http://www-06.ibm.com/jp/developerworks/xml/library/x-html5/index.shtml?ca=drs-  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-09-26T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  HTML 5 の関連情報をメモ。
  <dl>
    <dt>HTML 5 Working Draft</dt>
    <dd><a href="http://www.whatwg.org/specs/web-apps/current-work/">http://www.whatwg.org/specs/web-apps/current-work/</a></dd>
    <dt>WAHTWG - WHATWG and HTML 5 FAQ 日本語訳</dt>
    <dd><a href="http://www.html5.jp/trans/whatwg_html5faq.html">http://www.html5.jp/trans/whatwg_html5faq.html</a></dd>
    <dt>HTML 5 の新要素</dt>
    <dd><a href="http://www-06.ibm.com/jp/developerworks/xml/library/x-html5/index.shtml?ca=drs-">http://www-06.ibm.com/jp/developerworks/xml/library/x-html5/index.shtml?ca=drs-</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070926_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20070918_01.htm">
		<title><![CDATA[POPFile を Mac OS X にインストール]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20070918_01.htm</link>
		<description><![CDATA[  何故か MTA に SPAM FILTER が導入されていない我が社。  Apple Mail にも SPAM FILTER があるが、いまいち精度が悪い。  というわけで、メール振り分けソフトの POPFile を Mac OS X にインストールしてみた。      POPFile - Automatic Email Classification    http://sourceforge.net/projects/popfile/    POPFile Documentation Project    http://popfile.sourceforge.net/wiki/jp    POPFile(自動メールフィルター)の日本語化    http://sourceforge.jp/projects/popfile/files/  POPFile のインストール  POPFile のインストールはインストーラにお任せで OK。  但し、ポートの 8080 を使用する(後で変更可能)ので、Apache Tomcat などがポート 8080 を使用している場合は予め終了しておいた方が良い。      日本語化プロジェクトのダウンロードサイトから POPFile-0.22.5ub.dmg をダウンロード    POPFile-0.22.5ub.dmg をマウントし、インストーラ実行    ウィザードの指示に従ってインストールを完了  POPFile の設定  POPFile は内部に Web インタフェースを持っており、設定はその Web インタフェースを使用する(以降、POPFile コントロールセンターと記述)。  Web ブラウザで http://localhost:8080/ にアクセスする。日本語表示設定      POPFile コントロールセンターの日本語化          Configuration -&gt; User Interface -&gt; Choose language -&gt; "Nihongo"      ※"Japanese" ではなく "Nihongo" なので注意。いいね。      環境設定                設定 -> ポート番号 -> ユーザーインターフェース用ポート番号      ※ポート 8080 を他のソフトで使用する場合はポート番号を変更する。        POPFile コントロールセンターのパスワード          セキュリティ -> ユーザーインターフェースパスワード      ※指定しない(デフォルト)場合は、パスワード入力なしで POPFile コントロールセンターが使用できる。      バケツ設定  バケツは、メールの振り分け先となる場所。  SPAM FILTERING を行うのであれば、"spam" と "notspam" の 2 つがあればいい。  より詳細な振り分けを行うのであれば、適宜必要な分だけバケツを作成する。  バケツ名には 半角"小文字"アルファベットとハイフン、アンダースコアしか使用できないので注意。      バケツの作成          バケツ -> 管理 -> バケツ作成      ※"spam", "work" の 2 つのバケツを作成した。      マグネット設定  FILTERING の前に、特定の条件にヒットしたメールを強制的に指定のバケツに振り分けることができる。  この条件をマグネットと言うらしい。      マグネットの作成          マグネット -> 新規マグネット作成      ※マグネットタイプ: 差出人、値： @example.com、分類先のバケツ： work というマグネットを作成した。      Apple Mail 設定  http://popfile.sourceforge.net/wiki/jp:howtos:mail に従って Apple Mail を設定した。POPFile の起動・終了・リブート      起動          $ sudo /Library/StartupItems/POPFile/POPFile startPassword:Starting POPfile POP mail proxy$              終了          $ sudo /Library/StartupItems/POPFile/POPFile startPassword:Stopping POPfile POP mail proxy$              リブート(動作しなかった)          $ sudo /Library/StartupItems/POPFile/POPFile restartRestarting POPfile POP mail proxykill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]$            FILTER の学習  メール受信時に subject ヘッダに付加される Prefix を見て適宜 FILTER に振り分けの指示を出す。  "[unclassified]" という Prefix が付いているメールが来たら POPFile コントロールセンターで振り分け先のバケツを指定するだけ。  後は、振り分け先バケツが間違っていたら修正したりする。]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-09-18T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  何故か MTA に SPAM FILTER が導入されていない我が社。
  Apple Mail にも SPAM FILTER があるが、いまいち精度が悪い。
  というわけで、メール振り分けソフトの POPFile を Mac OS X にインストールしてみた。
  <dl>
    <dt>POPFile - Automatic Email Classification</dt>
    <dd><a href="http://sourceforge.net/projects/popfile/">http://sourceforge.net/projects/popfile/</a></dd>
    <dt>POPFile Documentation Project</dt>
    <dd><a href="http://popfile.sourceforge.net/wiki/jp">http://popfile.sourceforge.net/wiki/jp</a></dd>
    <dt>POPFile(自動メールフィルター)の日本語化</dt>
    <dd><a href="http://sourceforge.jp/projects/popfile/files/">http://sourceforge.jp/projects/popfile/files/</a></dd>
  </dl>
</p>
<h4>POPFile のインストール</h4>
<p>
  POPFile のインストールはインストーラにお任せで OK。
  但し、ポートの 8080 を使用する(後で変更可能)ので、Apache Tomcat などがポート 8080 を使用している場合は予め終了しておいた方が良い。
  <ol>
    <li><a href="http://sourceforge.jp/projects/popfile/files/">日本語化プロジェクトのダウンロードサイト</a>から POPFile-0.22.5ub.dmg をダウンロード</li>
    <li>POPFile-0.22.5ub.dmg をマウントし、インストーラ実行</li>
    <li>ウィザードの指示に従ってインストールを完了</li>
  </ol>
</p>
<h4>POPFile の設定</h4>
<p>
  POPFile は内部に Web インタフェースを持っており、設定はその Web インタフェースを使用する(以降、POPFile コントロールセンターと記述)。
  Web ブラウザで http://localhost:8080/ にアクセスする。
</p>
<h5>日本語表示設定</h5>
<p>
  <dl>
    <dt>POPFile コントロールセンターの日本語化</dt>
    <dd>
      Configuration -&gt; User Interface -&gt; Choose language -&gt; "Nihongo"<br>
      ※"Japanese" ではなく "Nihongo" なので注意。いいね。
    </dd>
  </dl>
</p>
<h5>環境設定</h5>
<p>
  <dl>
    <dt></dt>
    <dd>
      設定 -> ポート番号 -> ユーザーインターフェース用ポート番号<br>
      ※ポート 8080 を他のソフトで使用する場合はポート番号を変更する。
    </dd>
    <dt>POPFile コントロールセンターのパスワード</dt>
    <dd>
      セキュリティ -> ユーザーインターフェースパスワード<br>
      ※指定しない(デフォルト)場合は、パスワード入力なしで POPFile コントロールセンターが使用できる。
    </dd>
  </dl>
</p>
<h5>バケツ設定</h5>
<p>
  バケツは、メールの振り分け先となる場所。
  SPAM FILTERING を行うのであれば、"spam" と "notspam" の 2 つがあればいい。
  より詳細な振り分けを行うのであれば、適宜必要な分だけバケツを作成する。
  バケツ名には 半角"小文字"アルファベットとハイフン、アンダースコアしか使用できないので注意。
  <dl>
    <dt>バケツの作成</dt>
    <dd>
      バケツ -> 管理 -> バケツ作成<br>
      ※"spam", "work" の 2 つのバケツを作成した。
    </dd>
  </dl>
</p>
<h5>マグネット設定</h5>
<p>
  FILTERING の前に、特定の条件にヒットしたメールを強制的に指定のバケツに振り分けることができる。
  この条件をマグネットと言うらしい。
  <dl>
    <dt>マグネットの作成</dt>
    <dd>
      マグネット -> 新規マグネット作成<br>
      ※マグネットタイプ: 差出人、値： @example.com、分類先のバケツ： work というマグネットを作成した。
    </dd>
  </dl>
</p>
<h5>Apple Mail 設定</h5>
<p>
  <a href="http://popfile.sourceforge.net/wiki/jp:howtos:mail">http://popfile.sourceforge.net/wiki/jp:howtos:mail</a> に従って Apple Mail を設定した。
</p>
<h4>POPFile の起動・終了・リブート</h4>
<p>
  <dl>
    <dt>起動</dt>
    <dd>
      <blockquote>
<pre>
$ sudo /Library/StartupItems/POPFile/POPFile start
Password:
Starting POPfile POP mail proxy
$
</pre>
      </blockquote>
    </dd>
    <dt>終了</dt>
    <dd>
      <blockquote>
<pre>
$ sudo /Library/StartupItems/POPFile/POPFile start
Password:
Stopping POPfile POP mail proxy
$
</pre>
      </blockquote>
    </dd>
    <dt>リブート(動作しなかった)</dt>
    <dd>
      <blockquote>
<pre>
$ sudo /Library/StartupItems/POPFile/POPFile restart
Restarting POPfile POP mail proxy
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
$
</pre>
      </blockquote>
    </dd>
  </dl>
</p>
<h4>FILTER の学習</h4>
<p>
  メール受信時に subject ヘッダに付加される Prefix を見て適宜 FILTER に振り分けの指示を出す。
  "[unclassified]" という Prefix が付いているメールが来たら POPFile コントロールセンターで振り分け先のバケツを指定するだけ。
  後は、振り分け先バケツが間違っていたら修正したりする。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070918_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20070910_01.htm">
		<title><![CDATA[QuickSilver メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20070910_01.htm</link>
		<description><![CDATA[       QuickSilver に関するメモ。  QuickSilver  http://quicksilver.blacktree.com/  コマンドランチャーだけではもったいない強力フリーウェア - QuickSilver  http://journal.mycom.co.jp/column/lifehack/024/  Blue Dot - ange on QuickSilver  http://bluedot.us/users/ange/tag/queue  43 Folders  http://www.43folders.com/category/quicksilver/]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-09-10T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
   <a href="/blog/entries/Apple/20070910_01/QuickSilver.png" title="QuickSilver" rel="imagebox"><img src="/blog/entries/Apple/20070910_01/QuickSilver.png" alt="[QuickSilver]" width="250"/></a><br>
  <br>
  QuickSilver に関するメモ。
<dl>
  <dt>QuickSilver</dt>
  <dd><a href="http://quicksilver.blacktree.com/">http://quicksilver.blacktree.com/</a></dd>
  <dt>コマンドランチャーだけではもったいない強力フリーウェア - QuickSilver</dt>
  <dd><a href="http://journal.mycom.co.jp/column/lifehack/024/">http://journal.mycom.co.jp/column/lifehack/024/</a></dd>
  <dt>Blue Dot - ange on QuickSilver</dt>
  <dd><a href="http://bluedot.us/users/ange/tag/queue">http://bluedot.us/users/ange/tag/queue</a></dd>
  <dt>43 Folders</dt>
  <dd><a href="http://www.43folders.com/category/quicksilver/">http://www.43folders.com/category/quicksilver/</a></dd>
</dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070910_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070903_01.htm">
		<title><![CDATA[deploy の際に、Javadoc もリモートリポジトリに登録したい]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070903_01.htm</link>
		<description><![CDATA[  ついでに、"mvn deploy" 時に Javadoc もリモートリポジトリに登録するように設定をしてみた。pom.xml の設定方法  設定はいたって簡単。、  maven-javadoc-plugin を pom.xml に登録するだけ。  設定方法は下記の通り。  &lt;project&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;      	&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;        &lt;executions&gt;          &lt;execution&gt;            &lt;id&gt;attach-javadocs&lt;/id&gt;            &lt;goals&gt;              &lt;goal&gt;jar&lt;/goal&gt;            &lt;/goals&gt;            &lt;phase&gt;deploy&lt;/phase&gt;          &lt;/execution&gt;        &lt;/executions&gt;        &lt;configuration&gt;          &lt;outputEncoding&gt;Shift_JIS&lt;/outputEncoding&gt;        &lt;/configuration&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;&lt;/project&gt;  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-09-03T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  ついでに、"mvn deploy" 時に Javadoc もリモートリポジトリに登録するように設定をしてみた。
</p>
<h4>pom.xml の設定方法</h4>
<p>
  設定はいたって簡単。、
  <a href="http://maven.apache.org/plugins/maven-javadoc-plugin/">maven-javadoc-plugin</a> を pom.xml に登録するだけ。
  設定方法は下記の通り。
  <blockquote>
<pre>
&lt;project&gt;
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
      	&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;attach-javadocs&lt;/id&gt;
            &lt;goals&gt;
              &lt;goal&gt;jar&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;phase&gt;deploy&lt;/phase&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
        &lt;configuration&gt;
          &lt;outputEncoding&gt;Shift_JIS&lt;/outputEncoding&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070903_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070902_01.htm">
		<title><![CDATA[deploy の際に、ソースコードもリモートリポジトリに登録したい]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070902_01.htm</link>
		<description><![CDATA[  "mvn deploy" を実行するとリモートリポジトリに bytecode の jar が登録される。  とりあえずそれで十分と言えば十分なのだけれど、Maven 2.x Integration for Eclipse を使っているとソースコードがリモートリポジトリにあるととても幸せになれる。  というわけで、"mvn deploy" 時にソースコードもリモートリポジトリに登録するように設定をしてみた。pom.xml の設定方法  設定はいたって簡単。、  maven-source-plugin を pom.xml に登録するだけ。  設定方法は下記の通り。  &lt;project&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;      	&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;        &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;        &lt;executions&gt;          &lt;execution&gt;            &lt;id&gt;attach-sources&lt;/id&gt;            &lt;goals&gt;              &lt;goal&gt;jar&lt;/goal&gt;            &lt;/goals&gt;            &lt;phase&gt;deploy&lt;/phase&gt;          &lt;/execution&gt;        &lt;/executions&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;&lt;/project&gt;  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-09-02T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  "mvn deploy" を実行するとリモートリポジトリに bytecode の jar が登録される。
  とりあえずそれで十分と言えば十分なのだけれど、<a href="http://maven.apache.org/eclipse-plugin.html">Maven 2.x Integration for Eclipse</a> を使っているとソースコードがリモートリポジトリにあるととても幸せになれる。
  というわけで、"mvn deploy" 時にソースコードもリモートリポジトリに登録するように設定をしてみた。
</p>
<h4>pom.xml の設定方法</h4>
<p>
  設定はいたって簡単。、
  <a href="http://maven.apache.org/plugins/maven-source-plugin/">maven-source-plugin</a> を pom.xml に登録するだけ。
  設定方法は下記の通り。
  <blockquote>
<pre>
&lt;project&gt;
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
      	&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;attach-sources&lt;/id&gt;
            &lt;goals&gt;
              &lt;goal&gt;jar&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;phase&gt;deploy&lt;/phase&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070902_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20070829_01.htm">
		<title><![CDATA[Mac OS X 起動時のソフトウェア自動起動方法メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20070829_01.htm</link>
		<description><![CDATA[  Mac OS X 起動時にソフトウェアを自動起動したい。  というわけで、関連リンクをメモ。      SystemStarterで、OS起動時にアプリも起動    http://www.0-i-0.com/tips/38-startup/startup.html    SystemStarter memo    http://www.eternal.nest.or.jp/shiro/macosx/systemstarter.html    Windows も 2000 以降はなかなか使い易くなったけれど、  やはり UNIX ベースの OS の方が馴染みやすいな。]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-08-29T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Mac OS X 起動時にソフトウェアを自動起動したい。
  というわけで、関連リンクをメモ。
  <dl>
    <dt>SystemStarterで、OS起動時にアプリも起動</dt>
    <dd><a href="http://www.0-i-0.com/tips/38-startup/startup.html">http://www.0-i-0.com/tips/38-startup/startup.html</a></dd>
    <dt>SystemStarter memo</dt>
    <dd><a href="http://www.eternal.nest.or.jp/shiro/macosx/systemstarter.html">http://www.eternal.nest.or.jp/shiro/macosx/systemstarter.html</a></dd>
  </dl>
  Windows も 2000 以降はなかなか使い易くなったけれど、
  やはり UNIX ベースの OS の方が馴染みやすいな。
</p>

]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070829_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20070824_01.htm">
		<title><![CDATA[Dashboard Widget をデスクトップ上におく]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20070824_01.htm</link>
		<description><![CDATA[padmacolors.org さんのDashboard Widget をデスクトップ上におくというエントリを読んで、Dashboard Widget をデスクトップ上におけることを知った。便利そうなので早速試してみた。  padmacolors.org さんのエントリにある通り、  $ defaults write com.apple.Dashboard devmode YES    を実行するだけで準備完了。Dashboard Widget をデスクトップ上においてみる。  とりあえず電卓をデスクトップ上においてみた。  やり方は簡単。  下記は Dashboard のショートカットキーが "F12" になっている前提。      "F12" を押して Dashboard を表示する。    電卓をドラッグする(ドラッグしたまま)。    電卓をドラッグしたまま "F12" を再度押して Dashboard を抜ける。    電卓がデスクトップ上に出てくる。     Dashboard Widget を Dashboard に戻す。  ではデスクトップ上に出てきた電卓を Dashboard に戻してみようと思う。  やり方はデスクトップに出したときと同じ。      電卓をドラッグする(ドラッグしたまま)。    電卓をドラッグしたまま "F12" を押して Dashboard を表示する。    電卓が Dashboard 上に戻る。  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-08-24T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
<a href="http://www.padmacolors.org/">padmacolors.org さん</a>の<a href="http://www.padmacolors.org/archives/2005/04/30_134939.php">Dashboard Widget をデスクトップ上におく</a>というエントリを読んで、Dashboard Widget をデスクトップ上におけることを知った。
便利そうなので早速試してみた。
</p>
<h4></h4>
<p>
  padmacolors.org さんのエントリにある通り、
  <blockquote>
<pre>
$ defaults write com.apple.Dashboard devmode YES
</pre>
  </blockquote>
  を実行するだけで準備完了。
</p>
<h4>Dashboard Widget をデスクトップ上においてみる。</h4>
<p>
  とりあえず電卓をデスクトップ上においてみた。
  やり方は簡単。
  下記は Dashboard のショートカットキーが "F12" になっている前提。
  <ol>
    <li>"F12" を押して Dashboard を表示する。</li>
    <li>電卓をドラッグする(ドラッグしたまま)。</li>
    <li>電卓をドラッグしたまま "F12" を再度押して Dashboard を抜ける。</li>
    <li>電卓がデスクトップ上に出てくる。</li>
  </ol>
   <a href="/blog/entries/Apple/20070824_01/calcurator_on_desktop.png" title="Calcurator on Desktop" rel="imagebox"><img src="/blog/entries/Apple/20070824_01/calcurator_on_desktop.png" alt="[Calcurator on Desktop]" width="200"/></a>
</p>
<h4>Dashboard Widget を Dashboard に戻す。</h4>
<p>
  ではデスクトップ上に出てきた電卓を Dashboard に戻してみようと思う。
  やり方はデスクトップに出したときと同じ。
  <ol>
    <li>電卓をドラッグする(ドラッグしたまま)。</li>
    <li>電卓をドラッグしたまま "F12" を押して Dashboard を表示する。</li>
    <li>電卓が Dashboard 上に戻る。</li>
  </ol>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070824_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20070820_01.htm">
		<title><![CDATA[Fink にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20070820_01.htm</link>
		<description><![CDATA[Fink とは  Fink は      Fink プロジェクトは オープンソースソフトウェアを Darwin と Mac OS X で使えるようにするものです。    Mac OS X 上でコンパイルと実行できるよう、 Unix ソフトウェアを修正 ("ポート") しています。    こうしてできたものは全て一つのディストリビューションに統合されます。 Fink では dpkg や apt-get などの Debian ツールを使い、バイナリパッケージ管理を行っています。    ユーザーはコンパイル済みのパッケージをダウンロードことも、すべてソースからビルドすることもできます。    というものらしい。  普段 Debian 系に慣れ親しんでいる関係で、apt が Mac OS X でも使用できたら便利だろうと思っていたので早速インストールしてみた。      Fink    http://finkproject.org/index.php  Fink のインストール      ダウンロードページから Fink 0.8.1 バイナリインストーラ (Intel) をダウンロード。    ダウンロードした Fink-0.8.1-Intel-Installer.dmg をマウント。    Fink-0.8.1-Intel-Installer.pkg を実行。    インストーラの指示に従ってインストールを行う。          apt インデックスを作成する。      $ fink scanpackagesInformation about 1723 packages read in 2 seconds.dpkg-scanpackages dists/local/main/binary-darwin-i386 override | gzip >dists/local/main/binary-darwin-i386/Packages.gz Wrote 0 entries to output Packages file.dpkg-scanpackages dists/stable/main/binary-darwin-i386 override | gzip >dists/stable/main/binary-darwin-i386/Packages.gz Wrote 0 entries to output Packages file.dpkg-scanpackages dists/stable/crypto/binary-darwin-i386 override | gzip >dists/stable/crypto/binary-darwin-i386/Packages.gz Wrote 0 entries to output Packages file.$ fink indexReading package info...Updating package index... done.$                    fink を最新バージョンにアップデート。      $ sudo apt-get updateHit http://bindist.finkmirrors.net 10.4/release/main PackagesHit http://bindist.finkmirrors.net 10.4/release/main ReleaseHit http://bindist.finkmirrors.net 10.4/release/crypto PackagesHit http://bindist.finkmirrors.net 10.4/release/crypto ReleaseGet:1 http://bindist.finkmirrors.net 10.4/current/main Packages [9745B]Hit http://bindist.finkmirrors.net 10.4/current/main Release                   Get:2 http://bindist.finkmirrors.net 10.4/current/crypto Packages [20B]        Hit http://bindist.finkmirrors.net 10.4/current/crypto Release                 Fetched 9765B in 6s (1461B/s)                                                  Reading Package Lists... DoneBuilding Dependency Tree... Done$ sudo apt-get install finkReading Package Lists... DoneBuilding Dependency Tree... Done1 packages upgraded, 0 newly installed, 0 to remove and 13  not upgraded.Need to get 856kB of archives. After unpacking 4096B will be used.Get:1 http://bindist.finkmirrors.net 10.4/current/main fink 0.24.23-31 [856kB]Fetched 856kB in 5s (151kB/s)(Reading database ... 4131 files and directories currently installed.)Preparing to replace fink 0.24.17-31 (using .../fink_0.24.23-31_darwin-i386.deb) ...Unpacking replacement fink ...Setting up fink (0.24.23-31) ...Checking system... i386-apple-darwin8.10.1This system was not released at the time this Fink release was made. Prerelease versions of Mac OS X might work with Fink, but there are noguarantees.Using the new 10.4 tree...ln -s 10.4 /sw/fink/distsReading package info...Updating package index... done.$            試しに XEmacs をインストール  $ sudo apt-get clean$ sudo apt-cache search xemacscssed - CSS editorcssed-dev - CSS editorflim - Library to provide basic features about message for Emacsenjove - Small, fast, portable Emacs clonemew - MIME mail reader for Emacs/XEmacsmew-bin - MIME mail reader for Emacs/XEmacswl - Yet Another Message Interface on Emacsenxemacs - Highly customizable text editorxemacs-base-pkg - Basic files needed for xemacs package installationxemacs-efs-pkg - Allows xemacs to fetch files from the FTP site or mirrorsxemacs-sumo-pkg - All xemacs packages together$ sudo apt-get install xemacsReading Package Lists... DoneBuilding Dependency Tree... DoneThe following extra packages will be installed:  gdbm3-shlibs libjpeg-shlibs libpng3-shlibs libtiff-shlibs xaw3d-shlibs  xemacs-base-pkg xemacs-efs-pkg xfree86 xfree86-shlibs The following NEW packages will be installed:  gdbm3-shlibs libjpeg-shlibs libpng3-shlibs libtiff-shlibs xaw3d-shlibs  xemacs xemacs-base-pkg xemacs-efs-pkg xfree86 xfree86-shlibs 0 packages upgraded, 10 newly installed, 0 to remove and 13  not upgraded.Need to get 61.4MB of archives. After unpacking 39.1MB will be used.Do you want to continue? [Y/n] YGet:1 http://bindist.finkmirrors.net 10.4/release/main libjpeg-shlibs 6b-16 [73.8kB]Get:2 http://bindist.finkmirrors.net 10.4/release/main libtiff-shlibs 3.6.1-4 [110kB]Get:3 http://bindist.finkmirrors.net 10.4/current/main xfree86-shlibs 4.5.0-1040 [2570kB]Get:4 http://bindist.finkmirrors.net 10.4/current/main xfree86 4.5.0-1040 [47.8MB]Get:5 http://bindist.finkmirrors.net 10.4/release/main libpng3-shlibs 1:1.2.8-1 [207kB]Get:6 http://bindist.finkmirrors.net 10.4/release/main gdbm3-shlibs 1.8.3-1 [42.4kB]Get:7 http://bindist.finkmirrors.net 10.4/release/main xemacs-base-pkg 1.84-1 [481kB]Get:8 http://bindist.finkmirrors.net 10.4/release/main xemacs-efs-pkg 1.32-1 [377kB]Get:9 http://bindist.finkmirrors.net 10.4/release/main xaw3d-shlibs 1.5-12 [400kB]Get:10 http://bindist.finkmirrors.net 10.4/release/main xemacs 1:21.4.15-1002 [9301kB]Fetched 61.4MB in 6m38s (154kB/s)                                              Selecting previously deselected package libjpeg-shlibs.(Reading database ... 4131 files and directories currently installed.)Unpacking libjpeg-shlibs (from .../libjpeg-shlibs_6b-16_darwin-i386.deb) ...Selecting previously deselected package libtiff-shlibs.Unpacking libtiff-shlibs (from .../libtiff-shlibs_3.6.1-4_darwin-i386.deb) ...Selecting previously deselected package xfree86-shlibs.Unpacking xfree86-shlibs (from .../xfree86-shlibs_4.5.0-1040_darwin-i386.deb) ...Selecting previously deselected package xfree86.Unpacking xfree86 (from .../xfree86_4.5.0-1040_darwin-i386.deb) ...WARNING: if you compile X11 applications against this XFree86 release,you will *not* be able to run them if you decide to revert to Apple'sX11 provided with the OS.Selecting previously deselected package libpng3-shlibs.Unpacking libpng3-shlibs (from .../libpng3-shlibs_1%3a1.2.8-1_darwin-i386.deb) ...Selecting previously deselected package gdbm3-shlibs.Unpacking gdbm3-shlibs (from .../gdbm3-shlibs_1.8.3-1_darwin-i386.deb) ...Selecting previously deselected package xemacs-base-pkg.Unpacking xemacs-base-pkg (from .../xemacs-base-pkg_1.84-1_darwin-i386.deb) ...Selecting previously deselected package xemacs-efs-pkg.Unpacking xemacs-efs-pkg (from .../xemacs-efs-pkg_1.32-1_darwin-i386.deb) ...Selecting previously deselected package xaw3d-shlibs.Unpacking xaw3d-shlibs (from .../xaw3d-shlibs_1.5-12_darwin-i386.deb) ...Selecting previously deselected package xemacs.Unpacking xemacs (from .../xemacs_1%3a21.4.15-1002_darwin-i386.deb) ...Setting up libjpeg-shlibs (6b-16) ...Setting up libtiff-shlibs (3.6.1-4) ...Setting up xfree86-shlibs (4.5.0-1040) ...Setting up xfree86 (4.5.0-1040) ...Setting up libpng3-shlibs (1.2.8-1) ...Setting up gdbm3-shlibs (1.8.3-1) ...Setting up xemacs-base-pkg (1.84-1) ...Setting up xemacs-efs-pkg (1.32-1) ...Setting up xaw3d-shlibs (1.5-12) ...Setting up xemacs (21.4.15-1002) ...$ /sw/bin/xemacs  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-08-20T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Fink とは</h4>
<p>
  Fink は
  <blockquote>
    Fink プロジェクトは オープンソースソフトウェアを Darwin と Mac OS X で使えるようにするものです。
    Mac OS X 上でコンパイルと実行できるよう、 Unix ソフトウェアを修正 ("ポート") しています。
    こうしてできたものは全て一つのディストリビューションに統合されます。 Fink では dpkg や apt-get などの Debian ツールを使い、バイナリパッケージ管理を行っています。
    ユーザーはコンパイル済みのパッケージをダウンロードことも、すべてソースからビルドすることもできます。
  </blockquote>
  というものらしい。
  普段 Debian 系に慣れ親しんでいる関係で、apt が Mac OS X でも使用できたら便利だろうと思っていたので早速インストールしてみた。
</p>
<p>
  <dl>
    <dt>Fink</dt>
    <dd><a href="http://finkproject.org/index.php?phpLang=ja">http://finkproject.org/index.php</a></dd>
  </dl>
</p>
<h4>Fink のインストール</h4>
<p>
  <ol>
    <li><a href="http://www.finkproject.org/download/index.php?phpLang=ja">ダウンロードページ</a>から Fink 0.8.1 バイナリインストーラ (Intel) をダウンロード。</li>
    <li>ダウンロードした Fink-0.8.1-Intel-Installer.dmg をマウント。</li>
    <li>Fink-0.8.1-Intel-Installer.pkg を実行。</li>
    <li>インストーラの指示に従ってインストールを行う。</li>
    <li>
      apt インデックスを作成する。
      <blockquote>
<pre>
<span style="color:#ff0000;">$ fink scanpackages</span>
Information about 1723 packages read in 2 seconds.
dpkg-scanpackages dists/local/main/binary-darwin-i386 override | gzip >dists/local/main/binary-darwin-i386/Packages.gz
 Wrote 0 entries to output Packages file.
dpkg-scanpackages dists/stable/main/binary-darwin-i386 override | gzip >dists/stable/main/binary-darwin-i386/Packages.gz
 Wrote 0 entries to output Packages file.
dpkg-scanpackages dists/stable/crypto/binary-darwin-i386 override | gzip >dists/stable/crypto/binary-darwin-i386/Packages.gz
 Wrote 0 entries to output Packages file.
<span style="color:#ff0000;">$ fink index</span>
Reading package info...
Updating package index... done.
<span style="color:#ff0000;">$</span>
</pre>
      </blockquote>
    </li>
    <li>
      fink を最新バージョンにアップデート。
      <blockquote>
<pre>
<span style="color:#ff0000;">$ sudo apt-get update</span>
Hit http://bindist.finkmirrors.net 10.4/release/main Packages
Hit http://bindist.finkmirrors.net 10.4/release/main Release
Hit http://bindist.finkmirrors.net 10.4/release/crypto Packages
Hit http://bindist.finkmirrors.net 10.4/release/crypto Release
Get:1 http://bindist.finkmirrors.net 10.4/current/main Packages [9745B]
Hit http://bindist.finkmirrors.net 10.4/current/main Release                   
Get:2 http://bindist.finkmirrors.net 10.4/current/crypto Packages [20B]        
Hit http://bindist.finkmirrors.net 10.4/current/crypto Release                 
Fetched 9765B in 6s (1461B/s)                                                  
Reading Package Lists... Done
Building Dependency Tree... Done
<span style="color:#ff0000;">$ sudo apt-get install fink</span>
Reading Package Lists... Done
Building Dependency Tree... Done
1 packages upgraded, 0 newly installed, 0 to remove and 13  not upgraded.
Need to get 856kB of archives. After unpacking 4096B will be used.
Get:1 http://bindist.finkmirrors.net 10.4/current/main fink 0.24.23-31 [856kB]
Fetched 856kB in 5s (151kB/s)
(Reading database ... 4131 files and directories currently installed.)
Preparing to replace fink 0.24.17-31 (using .../fink_0.24.23-31_darwin-i386.deb) ...
Unpacking replacement fink ...
Setting up fink (0.24.23-31) ...
Checking system... i386-apple-darwin8.10.1
This system was not released at the time this Fink release was made. 
Prerelease versions of Mac OS X might work with Fink, but there are no
guarantees.
Using the new 10.4 tree...
ln -s 10.4 /sw/fink/dists
Reading package info...
Updating package index... done.

<span style="color:#ff0000;">$</span>
</pre>
      </blockquote>
    </li>
  </ol>
</p>
<h4>試しに XEmacs をインストール</h4>
<p>
  <blockquote>
<pre>
<span style="color:#ff0000;">$ sudo apt-get clean</span>
<span style="color:#ff0000;">$ sudo apt-cache search xemacs</span>
cssed - CSS editor
cssed-dev - CSS editor
flim - Library to provide basic features about message for Emacsen
jove - Small, fast, portable Emacs clone
mew - MIME mail reader for Emacs/XEmacs
mew-bin - MIME mail reader for Emacs/XEmacs
wl - Yet Another Message Interface on Emacsen
xemacs - Highly customizable text editor
xemacs-base-pkg - Basic files needed for xemacs package installation
xemacs-efs-pkg - Allows xemacs to fetch files from the FTP site or mirrors
xemacs-sumo-pkg - All xemacs packages together
<span style="color:#ff0000;">$ sudo apt-get install xemacs</span>
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  gdbm3-shlibs libjpeg-shlibs libpng3-shlibs libtiff-shlibs xaw3d-shlibs
  xemacs-base-pkg xemacs-efs-pkg xfree86 xfree86-shlibs 
The following NEW packages will be installed:
  gdbm3-shlibs libjpeg-shlibs libpng3-shlibs libtiff-shlibs xaw3d-shlibs
  xemacs xemacs-base-pkg xemacs-efs-pkg xfree86 xfree86-shlibs 
0 packages upgraded, 10 newly installed, 0 to remove and 13  not upgraded.
Need to get 61.4MB of archives. After unpacking 39.1MB will be used.
Do you want to continue? [Y/n] Y
Get:1 http://bindist.finkmirrors.net 10.4/release/main libjpeg-shlibs 6b-16 [73.8kB]
Get:2 http://bindist.finkmirrors.net 10.4/release/main libtiff-shlibs 3.6.1-4 [110kB]
Get:3 http://bindist.finkmirrors.net 10.4/current/main xfree86-shlibs 4.5.0-1040 [2570kB]
Get:4 http://bindist.finkmirrors.net 10.4/current/main xfree86 4.5.0-1040 [47.8MB]
Get:5 http://bindist.finkmirrors.net 10.4/release/main libpng3-shlibs 1:1.2.8-1 [207kB]
Get:6 http://bindist.finkmirrors.net 10.4/release/main gdbm3-shlibs 1.8.3-1 [42.4kB]
Get:7 http://bindist.finkmirrors.net 10.4/release/main xemacs-base-pkg 1.84-1 [481kB]
Get:8 http://bindist.finkmirrors.net 10.4/release/main xemacs-efs-pkg 1.32-1 [377kB]
Get:9 http://bindist.finkmirrors.net 10.4/release/main xaw3d-shlibs 1.5-12 [400kB]
Get:10 http://bindist.finkmirrors.net 10.4/release/main xemacs 1:21.4.15-1002 [9301kB]
Fetched 61.4MB in 6m38s (154kB/s)                                              
Selecting previously deselected package libjpeg-shlibs.
(Reading database ... 4131 files and directories currently installed.)
Unpacking libjpeg-shlibs (from .../libjpeg-shlibs_6b-16_darwin-i386.deb) ...
Selecting previously deselected package libtiff-shlibs.
Unpacking libtiff-shlibs (from .../libtiff-shlibs_3.6.1-4_darwin-i386.deb) ...
Selecting previously deselected package xfree86-shlibs.
Unpacking xfree86-shlibs (from .../xfree86-shlibs_4.5.0-1040_darwin-i386.deb) ...
Selecting previously deselected package xfree86.
Unpacking xfree86 (from .../xfree86_4.5.0-1040_darwin-i386.deb) ...
WARNING: if you compile X11 applications against this XFree86 release,
you will *not* be able to run them if you decide to revert to Apple's
X11 provided with the OS.
Selecting previously deselected package libpng3-shlibs.
Unpacking libpng3-shlibs (from .../libpng3-shlibs_1%3a1.2.8-1_darwin-i386.deb) ...
Selecting previously deselected package gdbm3-shlibs.
Unpacking gdbm3-shlibs (from .../gdbm3-shlibs_1.8.3-1_darwin-i386.deb) ...
Selecting previously deselected package xemacs-base-pkg.
Unpacking xemacs-base-pkg (from .../xemacs-base-pkg_1.84-1_darwin-i386.deb) ...
Selecting previously deselected package xemacs-efs-pkg.
Unpacking xemacs-efs-pkg (from .../xemacs-efs-pkg_1.32-1_darwin-i386.deb) ...
Selecting previously deselected package xaw3d-shlibs.
Unpacking xaw3d-shlibs (from .../xaw3d-shlibs_1.5-12_darwin-i386.deb) ...
Selecting previously deselected package xemacs.
Unpacking xemacs (from .../xemacs_1%3a21.4.15-1002_darwin-i386.deb) ...
Setting up libjpeg-shlibs (6b-16) ...
Setting up libtiff-shlibs (3.6.1-4) ...
Setting up xfree86-shlibs (4.5.0-1040) ...
Setting up xfree86 (4.5.0-1040) ...

Setting up libpng3-shlibs (1.2.8-1) ...
Setting up gdbm3-shlibs (1.8.3-1) ...
Setting up xemacs-base-pkg (1.84-1) ...
Setting up xemacs-efs-pkg (1.32-1) ...
Setting up xaw3d-shlibs (1.5-12) ...
Setting up xemacs (21.4.15-1002) ...

<span style="color:#ff0000;">$ /sw/bin/xemacs</span>
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070820_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Trac/20070730_01.htm">
		<title><![CDATA[既存の Trac 0.9 のデータを Trac 0.10 に移行する]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Trac/20070730_01.htm</link>
		<description><![CDATA[  既存の Trac 0.9 環境を Trac 0.10 に移行したときの作業メモ。  yum でインストールして、trac-admin で既存データの upgrade を行うだけ。  # yum update trac.noarchLoading "installonlyn" pluginSetting up Update ProcessSetting up repositories    (SNIP)Updated: trac.noarch 0:0.10.3.1-2.fc5Complete!# trac-admin /home/trac/myproject hotcopy /home/trac/myproject.backupHotcopying /home/trac/myproject to /home/trac/myproject.20070801 ... Hotcopy done.# trac-admin /usr/local/beattrac upgrade --no-backupUpgrade done.# trac-admin /usr/local/beattrac wiki upgrade /usr/share/trac/wiki-default/TracGuide => TracGuide  TracGuide already up to date. /usr/share/trac/wiki-default/TracBackup => TracBackup /usr/share/trac/wiki-default/TracRoadmap => TracRoadmap /usr/share/trac/wiki-default/TracIni => TracIni /usr/share/trac/wiki-default/TracAccessibility => TracAccessibility /usr/share/trac/wiki-default/TracUnicode => TracUnicode /usr/share/trac/wiki-default/TracInstall => TracInstall /usr/share/trac/wiki-default/TracEnvironment => TracEnvironment /usr/share/trac/wiki-default/InterMapTxt => InterMapTxt /usr/share/trac/wiki-default/TracQuery => TracQuery /usr/share/trac/wiki-default/TracReports => TracReports /usr/share/trac/wiki-default/TitleIndex => TitleIndex  TitleIndex already up to date. /usr/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields /usr/share/trac/wiki-default/WikiPageNames => WikiPageNames /usr/share/trac/wiki-default/TracUpgrade => TracUpgrade /usr/share/trac/wiki-default/TracRss => TracRss /usr/share/trac/wiki-default/RecentChanges => RecentChanges  RecentChanges already up to date. /usr/share/trac/wiki-default/WikiProcessors => WikiProcessors /usr/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring /usr/share/trac/wiki-default/TracPlugins => TracPlugins /usr/share/trac/wiki-default/TracPermissions => TracPermissions /usr/share/trac/wiki-default/TracChangeset => TracChangeset /usr/share/trac/wiki-default/TracRevisionLog => TracRevisionLog /usr/share/trac/wiki-default/TracFastCgi => TracFastCgi /usr/share/trac/wiki-default/TracTickets => TracTickets /usr/share/trac/wiki-default/TracLogging => TracLogging  TracLogging already up to date. /usr/share/trac/wiki-default/WikiFormatting => WikiFormatting /usr/share/trac/wiki-default/TracLinks => TracLinks /usr/share/trac/wiki-default/TracTimeline => TracTimeline /usr/share/trac/wiki-default/TracSearch => TracSearch /usr/share/trac/wiki-default/CamelCase => CamelCase /usr/share/trac/wiki-default/TracBrowser => TracBrowser /usr/share/trac/wiki-default/TracImport => TracImport /usr/share/trac/wiki-default/WikiHtml => WikiHtml /usr/share/trac/wiki-default/TracWiki => TracWiki /usr/share/trac/wiki-default/TracCgi => TracCgi /usr/share/trac/wiki-default/TracStandalone => TracStandalone /usr/share/trac/wiki-default/WikiMacros => WikiMacros /usr/share/trac/wiki-default/TracInterfaceCustomization => TracInterfaceCustomization /usr/share/trac/wiki-default/TracModPython => TracModPython /usr/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks /usr/share/trac/wiki-default/TracNotification => TracNotification /usr/share/trac/wiki-default/TracSupport => TracSupport /usr/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText /usr/share/trac/wiki-default/InterWiki => InterWiki /usr/share/trac/wiki-default/TracAdmin => TracAdmin /usr/share/trac/wiki-default/SandBox => SandBox  SandBox already up to date. /usr/share/trac/wiki-default/WikiNewPage => WikiNewPage /usr/share/trac/wiki-default/WikiDeletePage => WikiDeletePage /usr/share/trac/wiki-default/InterTrac => InterTrac#  ]]></description>
		<dc:subject>Trac</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-30T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  既存の Trac 0.9 環境を Trac 0.10 に移行したときの作業メモ。
</p>
<p>
  yum でインストールして、trac-admin で既存データの upgrade を行うだけ。
  <blockquote>
<pre>
# yum update trac.noarch
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
    (SNIP)
Updated: trac.noarch 0:0.10.3.1-2.fc5
Complete!
# trac-admin /home/trac/myproject hotcopy /home/trac/myproject.backup
Hotcopying /home/trac/myproject to /home/trac/myproject.20070801 ... Hotcopy done.
# trac-admin /usr/local/beattrac upgrade --no-backup
Upgrade done.
# trac-admin /usr/local/beattrac wiki upgrade
 /usr/share/trac/wiki-default/TracGuide => TracGuide
  TracGuide already up to date.
 /usr/share/trac/wiki-default/TracBackup => TracBackup
 /usr/share/trac/wiki-default/TracRoadmap => TracRoadmap
 /usr/share/trac/wiki-default/TracIni => TracIni
 /usr/share/trac/wiki-default/TracAccessibility => TracAccessibility
 /usr/share/trac/wiki-default/TracUnicode => TracUnicode
 /usr/share/trac/wiki-default/TracInstall => TracInstall
 /usr/share/trac/wiki-default/TracEnvironment => TracEnvironment
 /usr/share/trac/wiki-default/InterMapTxt => InterMapTxt
 /usr/share/trac/wiki-default/TracQuery => TracQuery
 /usr/share/trac/wiki-default/TracReports => TracReports
 /usr/share/trac/wiki-default/TitleIndex => TitleIndex
  TitleIndex already up to date.
 /usr/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
 /usr/share/trac/wiki-default/WikiPageNames => WikiPageNames
 /usr/share/trac/wiki-default/TracUpgrade => TracUpgrade
 /usr/share/trac/wiki-default/TracRss => TracRss
 /usr/share/trac/wiki-default/RecentChanges => RecentChanges
  RecentChanges already up to date.
 /usr/share/trac/wiki-default/WikiProcessors => WikiProcessors
 /usr/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
 /usr/share/trac/wiki-default/TracPlugins => TracPlugins
 /usr/share/trac/wiki-default/TracPermissions => TracPermissions
 /usr/share/trac/wiki-default/TracChangeset => TracChangeset
 /usr/share/trac/wiki-default/TracRevisionLog => TracRevisionLog
 /usr/share/trac/wiki-default/TracFastCgi => TracFastCgi
 /usr/share/trac/wiki-default/TracTickets => TracTickets
 /usr/share/trac/wiki-default/TracLogging => TracLogging
  TracLogging already up to date.
 /usr/share/trac/wiki-default/WikiFormatting => WikiFormatting
 /usr/share/trac/wiki-default/TracLinks => TracLinks
 /usr/share/trac/wiki-default/TracTimeline => TracTimeline
 /usr/share/trac/wiki-default/TracSearch => TracSearch
 /usr/share/trac/wiki-default/CamelCase => CamelCase
 /usr/share/trac/wiki-default/TracBrowser => TracBrowser
 /usr/share/trac/wiki-default/TracImport => TracImport
 /usr/share/trac/wiki-default/WikiHtml => WikiHtml
 /usr/share/trac/wiki-default/TracWiki => TracWiki
 /usr/share/trac/wiki-default/TracCgi => TracCgi
 /usr/share/trac/wiki-default/TracStandalone => TracStandalone
 /usr/share/trac/wiki-default/WikiMacros => WikiMacros
 /usr/share/trac/wiki-default/TracInterfaceCustomization => TracInterfaceCustomization
 /usr/share/trac/wiki-default/TracModPython => TracModPython
 /usr/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
 /usr/share/trac/wiki-default/TracNotification => TracNotification
 /usr/share/trac/wiki-default/TracSupport => TracSupport
 /usr/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
 /usr/share/trac/wiki-default/InterWiki => InterWiki
 /usr/share/trac/wiki-default/TracAdmin => TracAdmin
 /usr/share/trac/wiki-default/SandBox => SandBox
  SandBox already up to date.
 /usr/share/trac/wiki-default/WikiNewPage => WikiNewPage
 /usr/share/trac/wiki-default/WikiDeletePage => WikiDeletePage
 /usr/share/trac/wiki-default/InterTrac => InterTrac
#
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070730_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Trac/20070726_01.htm">
		<title><![CDATA[静的リソースの trac.ini での指定方法]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Trac/20070726_01.htm</link>
		<description><![CDATA[  Trac の静的リソースには、個々の Trac インスタンス毎のものと、同一サーバ上の全 Trac から参照されるものの二種類がある。  それぞれストレージ上の設置場所が異なるので、trac.ini では指定方法をかえなければならない。  今回はロゴを変更したかったので、Trac インスタンス単位のリソースとして画像を設置してみた。静的リソースの trac.ini での指定方法      Trac インスタンス毎のリソース    ストレージの "/usr/share/trac/htdocs/" が trac.ini の "common/" に相当する。    全 Trac から参照されるのリソース    ストレージの "$TRAC_ENVIRONMENT_HOME/htdocs/" が trac.ini の "site/" に相当する。        http://www.example.com/trac/wiki/TracInterfaceCustomization        Change the src setting to site/ followed by the name of your image file. The width and height settings should be modified to match your image's dimensions (the Trac chrome handler uses "site/" for files within the project directory htdocs and "common/" for the common ones).  ロゴの登録方法  $TRAC_ENVIRONMENT_HOME/htdocs/logo.png という名前でロゴ画像を設置し、trac.ini に  [header_logo]height = -1link = site/logo.png    を指定する。]]></description>
		<dc:subject>Trac</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-26T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Trac の静的リソースには、個々の Trac インスタンス毎のものと、同一サーバ上の全 Trac から参照されるものの二種類がある。
  それぞれストレージ上の設置場所が異なるので、trac.ini では指定方法をかえなければならない。
  今回はロゴを変更したかったので、Trac インスタンス単位のリソースとして画像を設置してみた。
</p>
<h4>静的リソースの trac.ini での指定方法</h4>
<p>
  <dl>
    <dt>Trac インスタンス毎のリソース</dt>
    <dd>ストレージの "/usr/share/trac/htdocs/" が trac.ini の "common/" に相当する。</dd>
    <dt>全 Trac から参照されるのリソース</dt>
    <dd>ストレージの "$TRAC_ENVIRONMENT_HOME/htdocs/" が trac.ini の "site/" に相当する。</dd>
  </dl>
  <blockquote>
    http://www.example.com/trac/wiki/TracInterfaceCustomization<br>
    <br>
    Change the src setting to site/ followed by the name of your image file. The width and height settings should be modified to match your image's dimensions (the Trac chrome handler uses "site/" for files within the project directory htdocs and "common/" for the common ones).
  </blockquote>
</p>
<h4>ロゴの登録方法</h4>
<p>
  $TRAC_ENVIRONMENT_HOME/htdocs/logo.png という名前でロゴ画像を設置し、trac.ini に
  <blockquote>
<pre>
[header_logo]
height = -1
link = site/logo.png
</pre>
  </blockquote>
  を指定する。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070726_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Apple/20070724_01.htm">
		<title><![CDATA[Mac 用アプリケーションメモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Apple/20070724_01.htm</link>
		<description><![CDATA[  生まれて初めて Mac OS を使い始めたわけだが。  とりあえず困るのは Windows で手に馴染んでいたアプリケーションの代わりになるものがあるかどうかということ。  というわけで、知り合いの Mac OS 使いの方の助力を仰いで、Windows で良く使うアプリケーションの Mac OS 版(?) を教えてもらった。      Jedit X   ( ← 秀丸エディタ)    http://www.artman21.net/product/JeditX/index.html    シイラ   ( ← Sleipnir)    http://shiira.jp/    Fugu   ( ← WinScp)    http://rsug.itd.umich.edu/software/fugu/    TinkerTool   ( ← 窓の手)    http://www.bresink.de/osx/TinkerTool.html  ]]></description>
		<dc:subject>Apple</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-24T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  生まれて初めて Mac OS を使い始めたわけだが。
  とりあえず困るのは Windows で手に馴染んでいたアプリケーションの代わりになるものがあるかどうかということ。
  というわけで、知り合いの Mac OS 使いの方の助力を仰いで、Windows で良く使うアプリケーションの Mac OS 版(?) を教えてもらった。
</p>
<p>
  <dl>
    <dt>Jedit X   ( ← 秀丸エディタ)</dt>
    <dd><a href="http://www.artman21.net/product/JeditX/index.html">http://www.artman21.net/product/JeditX/index.html</a></dd>
    <dt>シイラ   ( ← Sleipnir)</dt>
    <dd><a href="http://shiira.jp/">http://shiira.jp/</a></dd>
    <dt>Fugu   ( ← WinScp)</dt>
    <dd><a href="http://rsug.itd.umich.edu/software/fugu/">http://rsug.itd.umich.edu/software/fugu/</a></dd>
    <dt>TinkerTool   ( ← 窓の手)</dt>
    <dd><a href="http://www.bresink.de/osx/TinkerTool.html">http://www.bresink.de/osx/TinkerTool.html</a></dd>
  </dl>
</p>

]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Apple/20070724_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Trac/20070720_01.htm">
		<title><![CDATA[Trac チケット起票時の "Assign to" フィールドをコンボボックス化する]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Trac/20070720_01.htm</link>
		<description><![CDATA[  Trac のチケットを起票する際、デフォルトでは "Assign to" フィールドは TextField になっている。  そのため、担当者のアカウント名を調べて入力するという作業が必要になる。  これが意外と面倒なので、"Assign to" を選択式に設定してみた。設定方法  設定は非常に簡単。  $TRAC_HOME/myproject/conf/trac.ini の [ticket] セクションにある restrict_owner を false → true に変更するだけ。  この設定はデフォルトで false になっている。  [ticket]restrict_owner = true  詳細情報  Trac の Help から関連情報を転載。  コンボボックスにプロジェクトメンバーが表示されない場合、下記の通り当該メンバーに Setting の変更などを行ってもらい、Trac セッションを作成する必要がある。      Assign-to as Drop-Down List    If the list of possible ticket owners is finite, you can change the assign-to ticket field from a text input to a drop-down list. This is done by setting the restrict_owner option of the [ticket] section in trac.ini to “true”. In that case, Trac will use the list of all users who have logged in and set their email address to populate the drop-down field.     To appear in the dropdown list, a user needs be registered with the project, i.e. a user session should exist in the database. Such an entry is automatically created in the database the first time the user submits a change in the project, for example when editing the user's details in the Settings page. Also, the user must have TICKET_MODIFY permissions.   ]]></description>
		<dc:subject>Trac</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-20T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Trac のチケットを起票する際、デフォルトでは "Assign to" フィールドは TextField になっている。
  そのため、担当者のアカウント名を調べて入力するという作業が必要になる。
  これが意外と面倒なので、"Assign to" を選択式に設定してみた。
</p>
<h4>設定方法</h4>
<p>
  設定は非常に簡単。
  $TRAC_HOME/myproject/conf/trac.ini の [ticket] セクションにある restrict_owner を false → true に変更するだけ。
  この設定はデフォルトで false になっている。
  <blockquote>
<pre>
[ticket]
restrict_owner = true
</pre>
  </blockquote>
</p>
<h4>詳細情報</h4>
<p>
  Trac の Help から関連情報を転載。
  コンボボックスにプロジェクトメンバーが表示されない場合、下記の通り当該メンバーに Setting の変更などを行ってもらい、Trac セッションを作成する必要がある。
  <blockquote>
    <b>Assign-to as Drop-Down List</b><br>
    If the list of possible ticket owners is finite, you can change the assign-to ticket field from a text input to a drop-down list. This is done by setting the restrict_owner option of the [ticket] section in trac.ini to “true”. In that case, Trac will use the list of all users who have logged in and set their email address to populate the drop-down field. <br>
    To appear in the dropdown list, a user needs be registered with the project, i.e. a user session should exist in the database. Such an entry is automatically created in the database the first time the user submits a change in the project, for example when editing the user's details in the Settings page. Also, the user must have TICKET_MODIFY permissions. 
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070720_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Trac/20070719_01.htm">
		<title><![CDATA[Trac の XML-RPC API にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Trac/20070719_01.htm</link>
		<description><![CDATA[      Trac XML-RPC Plugin    http://trac-hacks.org/wiki/XmlRpcPlugin    root/xmlrpcplugin/0.10/tracrpc/api.py    http://trac-hacks.org/browser/xmlrpcplugin/0.10/tracrpc/api.py  Trac 0.10.3 の XML-RPC API  Trac XML-RPC Plugin を導入すると、http://example.com/mytrac/xmlrpc (Trac のトップ画面の URL に /xmlrpc を付加する)で API を閲覧することができる。  Trac 0.10.3 に 0.10 用の XML-RPC Plugin を導入した環境では下記の API が使用できる。      wiki                                        Function            Description            Permission required                                                struct wiki.getRecentChanges(dateTime.iso8601 since)            Get list of changed pages since timestamp            WIKI_VIEW                                int wiki.getRPCVersionSupported()            Returns 2 with this version of the Trac API.            WIKI_VIEW                                string wiki.getPage(string pagename, int version=None)            Get the raw Wiki text of page, latest version.            WIKI_VIEW                                string wiki.getPageVersion(string pagename, int version=None)            Get the raw Wiki text of page, latest version.            WIKI_VIEW                                string wiki.getPageHTML(string pagename, int version=None)            Return page in rendered HTML, latest version.            WIKI_VIEW                                string wiki.getPageHTMLVersion(string pagename, int version=None)            Return page in rendered HTML, latest version.            WIKI_VIEW                                array wiki.getAllPages()            Returns a list of all pages. The result is an array of utf8 pagenames.            WIKI_VIEW                                struct wiki.getPageInfo(string pagename, int version=None)            Returns information about the given page.            WIKI_VIEW                                struct wiki.getPageInfoVersion(string pagename, int version=None)            Returns information about the given page.            WIKI_VIEW                                boolean wiki.putPage(string pagename, string content, struct attributes)            writes the content of the page.            WIKI_CREATE                                array wiki.listAttachments(string pagename)            Lists attachments on a given page.            WIKI_VIEW                                base64 wiki.getAttachment(string path)            returns the content of an attachment.            WIKI_VIEW                                boolean wiki.putAttachment(string path, base64 data)            (over)writes an attachment. Returns True if successful.This method is compatible with WikiRPC.  putAttachmentEx has a more extensive set of (Trac-specific) features.            WIKI_MODIFY                                boolean wiki.putAttachmentEx(string pagename, string filename, string description, base64 data, boolean replace=True)            Attach a file to a Wiki page. Returns the (possibly transformed) filename of the attachment. Use this method if you don't care about WikiRPC compatibility.            WIKI_MODIFY                                boolean wiki.deleteAttachment(string path)            Delete an attachment.            WIKI_DELETE                                array wiki.listLinks(string pagename)            Not implemented            WIKI_VIEW                                string wiki.wikiToHtml(string text)            Render arbitrary Wiki text as HTML.            WIKI_VIEW                                search - Search Trac.                                        Function            Description            Permission required                                                array search.getSearchFilters()            Retrieve a list of search filters with each element in the form (name, description).            SEARCH_VIEW                                array search.performSearch(string query, array filters=[])            Perform a search using the given filters. Defaults to all if not provided. Results are returned as a list of tuples in the form (href, title, date, author, excerpt).            SEARCH_VIEW                                ticket.milestone - Interface to ticket milestone objects.                                        Function            Description            Permission required                                                array ticket.milestone.getAll()            Get a list of all ticket milestone names.            TICKET_VIEW                                struct ticket.milestone.get(string name)            Get a ticket milestone.            TICKET_VIEW                                int ticket.milestone.delete(string name)            Delete a ticket milestone            TICKET_ADMIN                                int ticket.milestone.create(string name, struct attributes)            Create a new ticket milestone with the given attributes.            TICKET_ADMIN                                int ticket.milestone.update(string name, struct attributes)            Update ticket milestone with the given attributes.            TICKET_ADMIN                                ticket.severity - Interface to ticket severity.                                        Function            Description            Permission required                                                array ticket.severity.getAll()            Get a list of all ticket severity names.            TICKET_VIEW                                string ticket.severity.get(string name)            Get a ticket severity.            TICKET_VIEW                                int ticket.severity.delete(string name)            Delete a ticket severity            TICKET_ADMIN                                int ticket.severity.create(string name, string value)            Create a new ticket severity with the given value.            TICKET_ADMIN                                int ticket.severity.update(string name, string value)            Update ticket severity with the given value.            TICKET_ADMIN                                ticket.type - Interface to ticket type.                                        Function            Description            Permission required                                                array ticket.type.getAll()            Get a list of all ticket type names.            TICKET_VIEW                                string ticket.type.get(string name)            Get a ticket type.            TICKET_VIEW                                int ticket.type.delete(string name)            Delete a ticket type            TICKET_ADMIN                                int ticket.type.create(string name, string value)            Create a new ticket type with the given value.            TICKET_ADMIN                                int ticket.type.update(string name, string value)            Update ticket type with the given value.            TICKET_ADMIN                                system - Core of the XML-RPC system.                                        Function            Description            Permission required                                                array system.multicall(array signatures)            Takes an array of XML-RPC calls encoded as structs of the form (in a Pythonish notation here): {'methodName': string, 'params': array}            XML_RPC                                array system.listMethods()            This method returns a list of strings, one for each (non-system) method supported by the XML-RPC server.            XML_RPC                                string system.methodHelp(string method)            This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns a documentation string describing the use of that method. If no such string is available, an empty string is returned. The documentation string may contain HTML markup.            XML_RPC                                array system.methodSignature(string method)            This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns an array of possible signatures for this method. A signature is an array of types. The first of these types is the return type of the method, the rest are parameters.            XML_RPC                                array system.getAPIVersion()            Returns a list with two elements. First element is the major version number, second is the minor. Changes to the major version indicate API breaking changes, while minor version changes are simple additions, bug fixes, etc.            XML_RPC                                ticket.resolution - Interface to ticket resolution.                                        Function            Description            Permission required                                                array ticket.resolution.getAll()            Get a list of all ticket resolution names.            TICKET_VIEW                                string ticket.resolution.get(string name)            Get a ticket resolution.            TICKET_VIEW                                int ticket.resolution.delete(string name)            Delete a ticket resolution            TICKET_ADMIN                                int ticket.resolution.create(string name, string value)            Create a new ticket resolution with the given value.            TICKET_ADMIN                                int ticket.resolution.update(string name, string value)            Update ticket resolution with the given value.            TICKET_ADMIN                                ticket.priority - Interface to ticket priority.                                        Function            Description            Permission required                                                array ticket.priority.getAll()            Get a list of all ticket priority names.            TICKET_VIEW                                string ticket.priority.get(string name)            Get a ticket priority.            TICKET_VIEW                                int ticket.priority.delete(string name)            Delete a ticket priority            TICKET_ADMIN                                int ticket.priority.create(string name, string value)            Create a new ticket priority with the given value.            TICKET_ADMIN                                int ticket.priority.update(string name, string value)            Update ticket priority with the given value.            TICKET_ADMIN                                ticket.component - Interface to ticket component objects.                                        Function            Description            Permission required                                                array ticket.component.getAll()            Get a list of all ticket component names.            TICKET_VIEW                                struct ticket.component.get(string name)            Get a ticket component.            TICKET_VIEW                                int ticket.component.delete(string name)            Delete a ticket component            TICKET_ADMIN                                int ticket.component.create(string name, struct attributes)            Create a new ticket component with the given attributes.            TICKET_ADMIN                                int ticket.component.update(string name, struct attributes)            Update ticket component with the given attributes.            TICKET_ADMIN                                ticket.version - Interface to ticket version objects.                                        Function            Description            Permission required                                                array ticket.version.getAll()            Get a list of all ticket version names.            TICKET_VIEW                                struct ticket.version.get(string name)            Get a ticket version.            TICKET_VIEW                                int ticket.version.delete(string name)            Delete a ticket version            TICKET_ADMIN                                int ticket.version.create(string name, struct attributes)            Create a new ticket version with the given attributes.            TICKET_ADMIN                                int ticket.version.update(string name, struct attributes)            Update ticket version with the given attributes.            TICKET_ADMIN                                ticket - An interface to Trac's ticketing system.                                        Function            Description            Permission required                                                array ticket.query(string qstr=&#34;status!=closed&#34;)            Perform a ticket query, returning a list of ticket ID's.            TICKET_VIEW                                array ticket.getRecentChanges(dateTime.iso8601 since)            Returns a list of IDs of tickets that have changed since timestamp.            TICKET_VIEW                                array ticket.getAvailableActions(int id)            Returns the actions that can be performed on the ticket.            TICKET_VIEW                                array ticket.get(int id)            Fetch a ticket. Returns [id, time_created, time_changed, attributes].            TICKET_VIEW                                int ticket.create(string summary, string description, struct attributes={}, boolean notify=False)            Create a new ticket, returning the ticket ID.            TICKET_CREATE                                array ticket.update(int id, string comment, struct attributes={}, boolean notify=False)            Update a ticket, returning the new ticket in the same form as getTicket().            TICKET_APPEND                                int ticket.delete(int id)            Delete ticket with the given id.            TICKET_ADMIN                                struct ticket.changeLog(int id, int when=0)            Return the changelog as a list of tuples of the form (time, author, field, oldvalue, newvalue, permanent). While the other tuple elements are quite self-explanatory, the permanent flag is used to distinguish collateral changes that are not yet immutable (like attachments, currently).            TICKET_VIEW                                array ticket.listAttachments(int ticket)            Lists attachments for a given ticket. Returns (filename, description, size, time, author) for each attachment.            TICKET_VIEW                                base64 ticket.getAttachment(int ticket, string filename)            returns the content of an attachment.            TICKET_VIEW                                string ticket.putAttachment(int ticket, string filename, string description, base64 data, boolean replace=True)            Add an attachment, optionally (and defaulting to) overwriting an existing one. Returns filename.            TICKET_APPEND                                boolean ticket.deleteAttachment(int ticket, string filename)            Delete an attachment.            TICKET_ADMIN                                array ticket.getTicketFields()            Return a list of all ticket fields fields.            TICKET_VIEW                                ticket.status - Interface to ticket status.                                        Function            Description            Permission required                                                array ticket.status.getAll()            Get a list of all ticket status names.            TICKET_VIEW                                string ticket.status.get(string name)            Get a ticket status.            TICKET_VIEW                                int ticket.status.delete(string name)            Delete a ticket status            TICKET_ADMIN                                int ticket.status.create(string name, string value)            Create a new ticket status with the given value.            TICKET_ADMIN                                int ticket.status.update(string name, string value)            Update ticket status with the given value.            TICKET_ADMIN                              Java から Trac XML-RPC API にアクセスしてみる  試しに Java から Trac 上の Ticket を取得してみた。  ライブラリをインストールするのが面倒だったので、自前で HTTP コネクションを張っている。サンプルコード  public void testTracApi() throws Exception {  URL url = new URL("http://example.com/trac/xmlrpc");  HttpURLConnection con = (HttpURLConnection) url.openConnection();  con.setDoOutput(true);  con.setDoInput(true);  con.setRequestMethod("POST");  con.addRequestProperty("content-type", "text/xml");  OutputStream os = null;  try {    os = con.getOutputStream();    String request =       "&lt;methodCall&gt;\n" +       "  &lt;methodName&gt;ticket.get&lt;/methodName&gt;\n" +      "  &lt;params&gt;" +       "  &lt;param&gt;&lt;value&gt;&lt;int&gt;3&lt;/int&gt;&lt;/value&gt;&lt;/param&gt;" +       "  &lt;/params&gt;" +       "&lt;/methodCall&gt;\n";    os.write(request.getBytes());  } finally {    if (os != null) {      os.close();    }  }  ByteArrayOutputStream baos = new ByteArrayOutputStream();  InputStream is = null;  try {    is = con.getInputStream();    int ch = 0;    while ((ch = is.read()) &gt;= 0) {      baos.write(ch);    }  } finally {    if (is != null) {      is.close();    }  }  System.out.println("" + baos.toString("UTF-8"));}  レスポンス  &lt;?xml version='1.0'?&gt;&lt;methodResponse&gt;&lt;params&gt;&lt;param&gt;&lt;value&gt;&lt;array&gt;&lt;data&gt;&lt;value&gt;&lt;int&gt;3&lt;/int&gt;&lt;/value&gt;&lt;value&gt;&lt;int&gt;1179403566&lt;/int&gt;&lt;/value&gt;&lt;value&gt;&lt;int&gt;1179403566&lt;/int&gt;&lt;/value&gt;&lt;value&gt;&lt;struct&gt;&lt;member&gt;&lt;name&gt;status&lt;/name&gt;&lt;value&gt;&lt;string&gt;new&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;description&lt;/name&gt;&lt;value&gt;&lt;string&gt;基本的な設定を行う。&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;reporter&lt;/name&gt;&lt;value&gt;&lt;string&gt;et&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;cc&lt;/name&gt;&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;resolution&lt;/name&gt;&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;component&lt;/name&gt;&lt;value&gt;&lt;string&gt;Continuum&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;summary&lt;/name&gt;&lt;value&gt;&lt;string&gt;Continuum 設定&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;priority&lt;/name&gt;&lt;value&gt;&lt;string&gt;major&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;keywords&lt;/name&gt;&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;version&lt;/name&gt;&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;milestone&lt;/name&gt;&lt;value&gt;&lt;string&gt;[Continuum] M1&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;owner&lt;/name&gt;&lt;value&gt;&lt;string&gt;me&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;member&gt;&lt;name&gt;type&lt;/name&gt;&lt;value&gt;&lt;string&gt;task&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;/struct&gt;&lt;/value&gt;&lt;/data&gt;&lt;/array&gt;&lt;/value&gt;&lt;/param&gt;&lt;/params&gt;&lt;/methodResponse&gt;  ]]></description>
		<dc:subject>Trac</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-19T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  <dl>
    <dt>Trac XML-RPC Plugin</dt>
    <dd><a href="http://trac-hacks.org/wiki/XmlRpcPlugin">http://trac-hacks.org/wiki/XmlRpcPlugin</a></dd>
    <dt>root/xmlrpcplugin/0.10/tracrpc/api.py</dt>
    <dd><a href="http://trac-hacks.org/browser/xmlrpcplugin/0.10/tracrpc/api.py">http://trac-hacks.org/browser/xmlrpcplugin/0.10/tracrpc/api.py</a></dd>
  </dl>
</p>
<h4>Trac 0.10.3 の XML-RPC API</h4>
<p>
  Trac XML-RPC Plugin を導入すると、http://example.com/mytrac/xmlrpc (Trac のトップ画面の URL に /xmlrpc を付加する)で API を閲覧することができる。
  Trac 0.10.3 に 0.10 用の XML-RPC Plugin を導入した環境では下記の API が使用できる。
  <dl>
    <dt><br>wiki</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>struct wiki.getRecentChanges(dateTime.iso8601 since)</nobr></td>
            <td>Get list of changed pages since timestamp</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int wiki.getRPCVersionSupported()</nobr></td>
            <td>Returns 2 with this version of the Trac API.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string wiki.getPage(string pagename, int version=None)</nobr></td>
            <td>Get the raw Wiki text of page, latest version.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string wiki.getPageVersion(string pagename, int version=None)</nobr></td>
            <td>Get the raw Wiki text of page, latest version.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string wiki.getPageHTML(string pagename, int version=None)</nobr></td>
            <td>Return page in rendered HTML, latest version.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string wiki.getPageHTMLVersion(string pagename, int version=None)</nobr></td>
            <td>Return page in rendered HTML, latest version.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>array wiki.getAllPages()</nobr></td>
            <td>Returns a list of all pages. The result is an array of utf8 pagenames.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>struct wiki.getPageInfo(string pagename, int version=None)</nobr></td>
            <td>Returns information about the given page.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>struct wiki.getPageInfoVersion(string pagename, int version=None)</nobr></td>
            <td>Returns information about the given page.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>boolean wiki.putPage(string pagename, string content, struct attributes)</nobr></td>
            <td>writes the content of the page.</td>
            <td>WIKI_CREATE</td>
          </tr>
          <tr>
            <td><nobr>array wiki.listAttachments(string pagename)</nobr></td>
            <td>Lists attachments on a given page.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>base64 wiki.getAttachment(string path)</nobr></td>
            <td>returns the content of an attachment.</td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>boolean wiki.putAttachment(string path, base64 data)</nobr></td>
            <td>(over)writes an attachment. Returns True if successful.This method is compatible with WikiRPC.  <tt>putAttachmentEx</tt> has a more extensive set of (Trac-specific) features.</td>
            <td>WIKI_MODIFY</td>
          </tr>
          <tr>
            <td><nobr>boolean wiki.putAttachmentEx(string pagename, string filename, string description, base64 data, boolean replace=True)</nobr></td>
            <td>Attach a file to a Wiki page. Returns the (possibly transformed) filename of the attachment. Use this method if you don't care about WikiRPC compatibility.</td>
            <td>WIKI_MODIFY</td>
          </tr>
          <tr>
            <td><nobr>boolean wiki.deleteAttachment(string path)</nobr></td>
            <td>Delete an attachment.</td>
            <td>WIKI_DELETE</td>
          </tr>
          <tr>
            <td><nobr>array wiki.listLinks(string pagename)</nobr></td>
            <td><i>Not implemented</i></td>
            <td>WIKI_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string wiki.wikiToHtml(string text)</nobr></td>
            <td>Render arbitrary Wiki text as HTML.</td>
            <td>WIKI_VIEW</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>search - Search Trac.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array search.getSearchFilters()</nobr></td>
            <td>Retrieve a list of search filters with each element in the form (name, description).</td>
            <td>SEARCH_VIEW</td>
          </tr>
          <tr>
            <td><nobr>array search.performSearch(string query, array filters=[])</nobr></td>
            <td>Perform a search using the given filters. Defaults to all if not provided. Results are returned as a list of tuples in the form (href, title, date, author, excerpt).</td>
            <td>SEARCH_VIEW</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.milestone - Interface to ticket milestone objects.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.milestone.getAll()</nobr></td>
            <td>Get a list of all ticket milestone names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>struct ticket.milestone.get(string name)</nobr></td>
            <td>Get a ticket milestone.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.milestone.delete(string name)</nobr></td>
            <td>Delete a ticket milestone</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.milestone.create(string name, struct attributes)</nobr></td>
            <td>Create a new ticket milestone with the given attributes.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.milestone.update(string name, struct attributes)</nobr></td>
            <td>Update ticket milestone with the given attributes.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.severity - Interface to ticket severity.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.severity.getAll()</nobr></td>
            <td>Get a list of all ticket severity names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string ticket.severity.get(string name)</nobr></td>
            <td>Get a ticket severity.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.severity.delete(string name)</nobr></td>
            <td>Delete a ticket severity</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.severity.create(string name, string value)</nobr></td>
            <td>Create a new ticket severity with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.severity.update(string name, string value)</nobr></td>
            <td>Update ticket severity with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.type - Interface to ticket type.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.type.getAll()</nobr></td>
            <td>Get a list of all ticket type names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string ticket.type.get(string name)</nobr></td>
            <td>Get a ticket type.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.type.delete(string name)</nobr></td>
            <td>Delete a ticket type</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.type.create(string name, string value)</nobr></td>
            <td>Create a new ticket type with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.type.update(string name, string value)</nobr></td>
            <td>Update ticket type with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>system - Core of the XML-RPC system.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array system.multicall(array signatures)</nobr></td>
            <td>Takes an array of XML-RPC calls encoded as structs of the form (in a Pythonish notation here): {'methodName': string, 'params': array}</td>
            <td>XML_RPC</td>
          </tr>
          <tr>
            <td><nobr>array system.listMethods()</nobr></td>
            <td>This method returns a list of strings, one for each (non-system) method supported by the XML-RPC server.</td>
            <td>XML_RPC</td>
          </tr>
          <tr>
            <td><nobr>string system.methodHelp(string method)</nobr></td>
            <td>This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns a documentation string describing the use of that method. If no such string is available, an empty string is returned. The documentation string may contain HTML markup.</td>
            <td>XML_RPC</td>
          </tr>
          <tr>
            <td><nobr>array system.methodSignature(string method)</nobr></td>
            <td>This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns an array of possible signatures for this method. A signature is an array of types. The first of these types is the return type of the method, the rest are parameters.</td>
            <td>XML_RPC</td>
          </tr>
          <tr>
            <td><nobr>array system.getAPIVersion()</nobr></td>
            <td>Returns a list with two elements. First element is the major version number, second is the minor. Changes to the major version indicate API breaking changes, while minor version changes are simple additions, bug fixes, etc.</td>
            <td>XML_RPC</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.resolution - Interface to ticket resolution.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.resolution.getAll()</nobr></td>
            <td>Get a list of all ticket resolution names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string ticket.resolution.get(string name)</nobr></td>
            <td>Get a ticket resolution.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.resolution.delete(string name)</nobr></td>
            <td>Delete a ticket resolution</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.resolution.create(string name, string value)</nobr></td>
            <td>Create a new ticket resolution with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.resolution.update(string name, string value)</nobr></td>
            <td>Update ticket resolution with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.priority - Interface to ticket priority.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.priority.getAll()</nobr></td>
            <td>Get a list of all ticket priority names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string ticket.priority.get(string name)</nobr></td>
            <td>Get a ticket priority.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.priority.delete(string name)</nobr></td>
            <td>Delete a ticket priority</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.priority.create(string name, string value)</nobr></td>
            <td>Create a new ticket priority with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.priority.update(string name, string value)</nobr></td>
            <td>Update ticket priority with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.component - Interface to ticket component objects.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.component.getAll()</nobr></td>
            <td>Get a list of all ticket component names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>struct ticket.component.get(string name)</nobr></td>
            <td>Get a ticket component.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.component.delete(string name)</nobr></td>
            <td>Delete a ticket component</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.component.create(string name, struct attributes)</nobr></td>
            <td>Create a new ticket component with the given attributes.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.component.update(string name, struct attributes)</nobr></td>
            <td>Update ticket component with the given attributes.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.version - Interface to ticket version objects.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.version.getAll()</nobr></td>
            <td>Get a list of all ticket version names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>struct ticket.version.get(string name)</nobr></td>
            <td>Get a ticket version.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.version.delete(string name)</nobr></td>
            <td>Delete a ticket version</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.version.create(string name, struct attributes)</nobr></td>
            <td>Create a new ticket version with the given attributes.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.version.update(string name, struct attributes)</nobr></td>
            <td>Update ticket version with the given attributes.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket - An interface to Trac's ticketing system.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.query(string qstr=&#34;status!=closed&#34;)</nobr></td>
            <td>Perform a ticket query, returning a list of ticket ID's.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>array ticket.getRecentChanges(dateTime.iso8601 since)</nobr></td>
            <td>Returns a list of IDs of tickets that have changed since timestamp.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>array ticket.getAvailableActions(int id)</nobr></td>
            <td>Returns the actions that can be performed on the ticket.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>array ticket.get(int id)</nobr></td>
            <td>Fetch a ticket. Returns [id, time_created, time_changed, attributes].</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.create(string summary, string description, struct attributes={}, boolean notify=False)</nobr></td>
            <td>Create a new ticket, returning the ticket ID.</td>
            <td>TICKET_CREATE</td>
          </tr>
          <tr>
            <td><nobr>array ticket.update(int id, string comment, struct attributes={}, boolean notify=False)</nobr></td>
            <td>Update a ticket, returning the new ticket in the same form as getTicket().</td>
            <td>TICKET_APPEND</td>
          </tr>
          <tr>
            <td><nobr>int ticket.delete(int id)</nobr></td>
            <td>Delete ticket with the given id.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>struct ticket.changeLog(int id, int when=0)</nobr></td>
            <td>Return the changelog as a list of tuples of the form (time, author, field, oldvalue, newvalue, permanent). While the other tuple elements are quite self-explanatory, the <tt>permanent</tt> flag is used to distinguish collateral changes that are not yet immutable (like attachments, currently).</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>array ticket.listAttachments(int ticket)</nobr></td>
            <td>Lists attachments for a given ticket. Returns (filename, description, size, time, author) for each attachment.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>base64 ticket.getAttachment(int ticket, string filename)</nobr></td>
            <td>returns the content of an attachment.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string ticket.putAttachment(int ticket, string filename, string description, base64 data, boolean replace=True)</nobr></td>
            <td>Add an attachment, optionally (and defaulting to) overwriting an existing one. Returns filename.</td>
            <td>TICKET_APPEND</td>
          </tr>
          <tr>
            <td><nobr>boolean ticket.deleteAttachment(int ticket, string filename)</nobr></td>
            <td>Delete an attachment.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>array ticket.getTicketFields()</nobr></td>
            <td>Return a list of all ticket fields fields.</td>
            <td>TICKET_VIEW</td>
          </tr>
        </tbody>
      </table>
    </dd>
    <dt><br>ticket.status - Interface to ticket status.</dt>
    <dd>
      <table border="1">
        <thead style="background-color: #eeeeee;">
          <tr>
            <th>Function</th>
            <th>Description</th>
            <th><nobr>Permission required</nobr></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td><nobr>array ticket.status.getAll()</nobr></td>
            <td>Get a list of all ticket status names.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>string ticket.status.get(string name)</nobr></td>
            <td>Get a ticket status.</td>
            <td>TICKET_VIEW</td>
          </tr>
          <tr>
            <td><nobr>int ticket.status.delete(string name)</nobr></td>
            <td>Delete a ticket status</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.status.create(string name, string value)</nobr></td>
            <td>Create a new ticket status with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
          <tr>
            <td><nobr>int ticket.status.update(string name, string value)</nobr></td>
            <td>Update ticket status with the given value.</td>
            <td>TICKET_ADMIN</td>
          </tr>
        </tbody>
      </table>
    </dd>
  </dl>
</p>
<h4>Java から Trac XML-RPC API にアクセスしてみる</h4>
<p>
  試しに Java から Trac 上の Ticket を取得してみた。
  ライブラリをインストールするのが面倒だったので、自前で HTTP コネクションを張っている。
</p>
<h5>サンプルコード</h5>
<p>
  <blockquote>
<pre>
public void testTracApi() throws Exception {

  URL url = new URL("http://example.com/trac/xmlrpc");
  HttpURLConnection con = (HttpURLConnection) url.openConnection();
  con.setDoOutput(true);
  con.setDoInput(true);
  con.setRequestMethod("POST");
  con.addRequestProperty("content-type", "text/xml");
  OutputStream os = null;

  try {
    os = con.getOutputStream();
    String request = 
      "&lt;methodCall&gt;\n" + 
      "  &lt;methodName&gt;ticket.get&lt;/methodName&gt;\n" +
      "  &lt;params&gt;" + 
      "  &lt;param&gt;&lt;value&gt;&lt;int&gt;3&lt;/int&gt;&lt;/value&gt;&lt;/param&gt;" + 
      "  &lt;/params&gt;" + 
      "&lt;/methodCall&gt;\n";
    os.write(request.getBytes());
  } finally {
    if (os != null) {
      os.close();
    }
  }

  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  InputStream is = null;
  try {
    is = con.getInputStream();
    int ch = 0;
    while ((ch = is.read()) &gt;= 0) {
      baos.write(ch);
    }
  } finally {
    if (is != null) {
      is.close();
    }
  }

  System.out.println("" + baos.toString("UTF-8"));
}
</pre>
  </blockquote>
</p>
<h5>レスポンス</h5>
<p>
  <blockquote>
<pre>
&lt;?xml version='1.0'?&gt;
&lt;methodResponse&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;&lt;array&gt;&lt;data&gt;
&lt;value&gt;&lt;int&gt;3&lt;/int&gt;&lt;/value&gt;
&lt;value&gt;&lt;int&gt;1179403566&lt;/int&gt;&lt;/value&gt;
&lt;value&gt;&lt;int&gt;1179403566&lt;/int&gt;&lt;/value&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;
&lt;name&gt;status&lt;/name&gt;
&lt;value&gt;&lt;string&gt;new&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;description&lt;/name&gt;
&lt;value&gt;&lt;string&gt;基本的な設定を行う。&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;reporter&lt;/name&gt;
&lt;value&gt;&lt;string&gt;et&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;cc&lt;/name&gt;
&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;resolution&lt;/name&gt;
&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;component&lt;/name&gt;
&lt;value&gt;&lt;string&gt;Continuum&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;summary&lt;/name&gt;
&lt;value&gt;&lt;string&gt;Continuum 設定&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;priority&lt;/name&gt;
&lt;value&gt;&lt;string&gt;major&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;keywords&lt;/name&gt;
&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;version&lt;/name&gt;
&lt;value&gt;&lt;string&gt;&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;milestone&lt;/name&gt;
&lt;value&gt;&lt;string&gt;[Continuum] M1&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;owner&lt;/name&gt;
&lt;value&gt;&lt;string&gt;me&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;type&lt;/name&gt;
&lt;value&gt;&lt;string&gt;task&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/data&gt;&lt;/array&gt;&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
&lt;/methodResponse&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070719_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/WebService/20070718_01.htm">
		<title><![CDATA[XML-RPC 用 JavaScript ライブラリ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/WebService/20070718_01.htm</link>
		<description><![CDATA[  JavaScript で XML-RPC をサポートするライブラリをメモ。  結構揃っているので、クロスブラウザ、クロスプラットフォームの品質が高いものもありそう。      Mimic XML-RPC Client for Java Script(GPL)    http://sourceforge.net/projects/mimic-xmlrpc/    jsxmlRPC(BSD License)    http://sourceforge.net/projects/jsxmlrpc/    JS-RPC Client(GPL)    http://sourceforge.net/projects/jsrpc/    XML-RPC in Mozilla(Mozilla Public License)    http://www.mozilla.org/projects/xmlrpc/    vcXMLRPC(GPL)    http://www.vcdn.org/Public/XMLRPC/    Jamritas(独自ライセンス)    http://jamritas.sourceforge.net/    jsolait(LGPL)    http://jsolait.net/  ]]></description>
		<dc:subject>WebService</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-18T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  JavaScript で XML-RPC をサポートするライブラリをメモ。
  結構揃っているので、クロスブラウザ、クロスプラットフォームの品質が高いものもありそう。
  <dl>
    <dt>Mimic XML-RPC Client for Java Script(GPL)</dt>
    <dd><a href="http://sourceforge.net/projects/mimic-xmlrpc/">http://sourceforge.net/projects/mimic-xmlrpc/</a></dd>
    <dt>jsxmlRPC(BSD License)</dt>
    <dd><a href="http://sourceforge.net/projects/jsxmlrpc/">http://sourceforge.net/projects/jsxmlrpc/</a></dd>
    <dt>JS-RPC Client(GPL)</dt>
    <dd><a href="http://sourceforge.net/projects/jsrpc/">http://sourceforge.net/projects/jsrpc/</a></dd>
    <dt>XML-RPC in Mozilla(Mozilla Public License)</dt>
    <dd><a href="http://www.mozilla.org/projects/xmlrpc/">http://www.mozilla.org/projects/xmlrpc/</a></dd>
    <dt>vcXMLRPC(GPL)</dt>
    <dd><a href="http://www.vcdn.org/Public/XMLRPC/">http://www.vcdn.org/Public/XMLRPC/</a></dd>
    <dt>Jamritas(独自ライセンス)</dt>
    <dd><a href="http://jamritas.sourceforge.net/">http://jamritas.sourceforge.net/</a></dd>
    <dt>jsolait(LGPL)</dt>
    <dd><a href="http://jsolait.net/">http://jsolait.net/</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/WebService/20070718_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/WebService/20070717_01.htm">
		<title><![CDATA[XML-RPC メモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/WebService/20070717_01.htm</link>
		<description><![CDATA[  XML-RPC に関する情報をメモ。  例によって Google 先生の覚えが良いものを適当に列挙しただけ。  技術資料をざっと眺めてみたが、単純なので実装はかなり簡単そう。技術資料      XML-RPC.com    http://www.xmlrpc.com/    XML-RPC Specification    http://www.xmlrpc.com/spec    Wikipedia - XML-RPC    http://ja.wikipedia.org/wiki/XML-RPC    XML-RPC for Newbies    http://www.scripting.com/davenet/1998/07/14/xmlRpcForNewbies.html    XML-RPC HOWTO    http://www.linux.or.jp/JF/JFdocs/XML-RPC-HOWTO/  XML-RPC が使用できる公開サービス      XEP-0009: Jabber-RPC    http://www.xmpp.org/extensions/xep-0009.html    Movable Type で使える XML-RPC API    http://www.na.rim.or.jp/~tsupo/program/blogTool/mt_xmlRpc.html    tDiary ドキュメント - xmlrpc.rb    http://docs.tdiary.org/ja/?xmlrpc.rb    XML-RPC for Wiki (FreeStyle Wiki 用の XML-RPC モジュール)    http://www.donzoko.net/cgi/fswiki_xmlrpc/    郵便専門ネットを XML-RPC で活用する    http://yubin.senmon.net/service/xmlrpc.html  XML-RPC 用ライブラリ(Java)      Apache XML-RPC    http://ws.apache.org/xmlrpc/    Crispy    http://sourceforge.net/projects/crispy/  ]]></description>
		<dc:subject>WebService</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-17T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  XML-RPC に関する情報をメモ。
  例によって Google 先生の覚えが良いものを適当に列挙しただけ。
  技術資料をざっと眺めてみたが、単純なので実装はかなり簡単そう。
</p>
<h5>技術資料</h5>
<p>
  <dl>
    <dt>XML-RPC.com</dt>
    <dd><a href="http://www.xmlrpc.com/">http://www.xmlrpc.com/</a></dd>
    <dt>XML-RPC Specification</dt>
    <dd><a href="http://www.xmlrpc.com/spec">http://www.xmlrpc.com/spec</a></dd>
    <dt>Wikipedia - XML-RPC</dt>
    <dd><a href="http://ja.wikipedia.org/wiki/XML-RPC">http://ja.wikipedia.org/wiki/XML-RPC</a></dd>
    <dt>XML-RPC for Newbies</dt>
    <dd><a href="http://www.scripting.com/davenet/1998/07/14/xmlRpcForNewbies.html">http://www.scripting.com/davenet/1998/07/14/xmlRpcForNewbies.html</a></dd>
    <dt>XML-RPC HOWTO</dt>
    <dd><a href="http://www.linux.or.jp/JF/JFdocs/XML-RPC-HOWTO/">http://www.linux.or.jp/JF/JFdocs/XML-RPC-HOWTO/</a></dd>
  </dl>
</p>
<h5>XML-RPC が使用できる公開サービス</h5>
<p>
  <dl>
    <dt>XEP-0009: Jabber-RPC</dt>
    <dd><a href="http://www.xmpp.org/extensions/xep-0009.html">http://www.xmpp.org/extensions/xep-0009.html</a></dd>
    <dt>Movable Type で使える XML-RPC API</dt>
    <dd><a href="http://www.na.rim.or.jp/~tsupo/program/blogTool/mt_xmlRpc.html">http://www.na.rim.or.jp/~tsupo/program/blogTool/mt_xmlRpc.html</a></dd>
    <dt>tDiary ドキュメント - xmlrpc.rb</dt>
    <dd><a href="http://docs.tdiary.org/ja/?xmlrpc.rb">http://docs.tdiary.org/ja/?xmlrpc.rb</a></dd>
    <dt>XML-RPC for Wiki (FreeStyle Wiki 用の XML-RPC モジュール)</dt>
    <dd><a href="http://www.donzoko.net/cgi/fswiki_xmlrpc/">http://www.donzoko.net/cgi/fswiki_xmlrpc/</a></dd>
    <dt>郵便専門ネットを XML-RPC で活用する</dt>
    <dd><a href="http://yubin.senmon.net/service/xmlrpc.html">http://yubin.senmon.net/service/xmlrpc.html</a></dd>
  </dl>
</p>
<h5>XML-RPC 用ライブラリ(Java)</h5>
<p>
  <dl>
    <dt>Apache XML-RPC</dt>
    <dd><a href="http://ws.apache.org/xmlrpc/">http://ws.apache.org/xmlrpc/</a></dd>
    <dt>Crispy</dt>
    <dd><a href="http://sourceforge.net/projects/crispy/">http://sourceforge.net/projects/crispy/</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/WebService/20070717_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/AS/20070716_01.htm">
		<title><![CDATA[JBoss AS 4.2.0 の Windows サービス化にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/AS/20070716_01.htm</link>
		<description><![CDATA[  JBoss AS 4.2.0 を Windows サービスとして登録する方法をメモ。  Getting Started with JBoss 4.0 の Running as a Service の情報が古く、少々戸惑ったが Java Service Wrapper を使用することで無事 JBoss AS 4.2.0 を Windows サービスとして登録できた。      Java Service Wrapper    http://wrapper.tanukisoftware.org/doc/english/integrate-simple-win.html    RunJBossAsAServiceOnWindows    http://jboss.org/wiki/Wiki.jsp?page=RunJBossAsAServiceOnWindows    Running Jboss as a Windows Service    http://www.theserverside.com/discussions/thread.tss?thread_id=21279  Java Service Wrapper を JBoss AS 4.2.0 にコピー  まず、Java Service Wrapper を %JBOSS_HOME% にコピーする。  &gt; copy %WRAPPER_HOME%\bin\Wrapper.exe %JBOSS_HOME%\bin\&gt; copy %WRAPPER_HOME%\src\bin\App.bat.in %JBOSS_HOME%\bin\&gt; move %JBOSS_HOME%\bin\App.bat.in %JBOSS_HOME%\bin\JBoss.bat&gt; copy %WRAPPER_HOME%\src\bin\InstallApp-NT.bat.in %JBOSS_HOME%\bin\&gt; move %JBOSS_HOME%\bin\InstallApp-NT.bat.in %JBOSS_HOME%\bin\InstallJBoss-NT.bat&gt; copy %WRAPPER_HOME%\src\bin\UninstallApp-NT.bat.in %JBOSS_HOME%\bin\&gt; move %JBOSS_HOME%\bin\UninstallApp-NT.bat.in %JBOSS_HOME%\bin\UninstallJBoss-NT.bat&gt; copy %WRAPPER_HOME%\lib\Wrapper.DLL %JBOSS_HOME%\lib\&gt; copy %WRAPPER_HOME%\lib\wrapper.jar %JBOSS_HOME%\lib\&gt; md %JBOSS_HOME%\conf&gt; copy %WRAPPER_HOME%\src\conf\wrapper.conf.in %JBOSS_HOME%\conf\&gt; move %JBOSS_HOME%\src\conf\wrapper.conf.in %JBOSS_HOME%\conf\wrapper.conf  Java Service Wrapper の設定  %JBOSS_HOME%\conf\wrapper.conf を編集する。  #********************************************************************# Wrapper Properties#********************************************************************# Java Applicationwrapper.java.command=c:/jdk1.5.0_12/bin/java# Java Main class.  This class must implement the WrapperListener interface#  or guarantee that the WrapperManager class is initialized.  Helper#  classes are provided to do this for you.  See the Integration section#  of the documentation for details.wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp# Java Classpath (include wrapper.jar)  Add class path elements as#  needed starting from 1wrapper.java.classpath.1=c:/jboss-4.2.0.GA/lib/wrapper.jarwrapper.java.classpath.2=c:/jdk1.5.0_12/lib/tools.jarwrapper.java.classpath.3=./run.jar# Java Library Path (location of Wrapper.DLL or libwrapper.so)wrapper.java.library.path.1=c:/jboss-4.2.0.GA/lib# Java Additional Parameterswrapper.java.additional.1=-server# Initial Java Heap Size (in MB)#wrapper.java.initmemory=3# Maximum Java Heap Size (in MB)#wrapper.java.maxmemory=64# Application parameters.  Add parameters as needed starting from 1wrapper.app.parameter.1=org.jboss.Mainwrapper.app.parameter.2=-b 0.0.0.0#********************************************************************# Wrapper Logging Properties#********************************************************************# Format of output for the console.  (See docs for formats)wrapper.console.format=PM# Log Level for console output.  (See docs for log levels)wrapper.console.loglevel=INFO# Log file to use for wrapper output logging.wrapper.logfile=c:/jboss-4.2.0.GA/server/default/log/wrapper.log# Format of output for the log file.  (See docs for formats)wrapper.logfile.format=LPTM# Log Level for log file output.  (See docs for log levels)wrapper.logfile.loglevel=INFO# Maximum size that the log file will be allowed to grow to before#  the log is rolled. Size is specified in bytes.  The default value#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or#  'm' (mb) suffix.  For example: 10m = 10 megabytes.wrapper.logfile.maxsize=0# Maximum number of rolled log files which will be allowed before old#  files are deleted.  The default value of 0 implies no limit.wrapper.logfile.maxfiles=0# Log Level for sys/event log output.  (See docs for log levels)wrapper.syslog.loglevel=NONE#********************************************************************# Wrapper Windows Properties#********************************************************************# Title to use when running as a consolewrapper.console.title=JBoss Server#********************************************************************# Wrapper Windows NT/2000/XP Service Properties#********************************************************************# WARNING - Do not modify any of these properties when an application#  using this configuration file has been installed as a service.#  Please uninstall the service before modifying this section.  The#  service can then be reinstalled.# Name of the servicewrapper.ntservice.name=JBoss# Display name of the servicewrapper.ntservice.displayname=JBoss Server# Description of the servicewrapper.ntservice.description=JBoss Server# Service dependencies.  Add dependencies as needed starting from 1wrapper.ntservice.dependency.1=# Mode in which the service is installed.  AUTO_START or DEMAND_STARTwrapper.ntservice.starttype=AUTO_START# Allow the service to interact with the desktop.wrapper.ntservice.interactive=false  Java Service Wrapper の JMX サービスを JBoss AS に登録  %JBOSS_HOME%\server\default\deploy\java-service-wrapper-service.xml を作成する。  &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;!DOCTYPE server&gt;&lt;server&gt;    &lt;mbean code="org.tanukisoftware.wrapper.jmx.WrapperManager"           name="JavaServiceWrapper:service=WrapperManager"/&gt;        &lt;mbean code="org.tanukisoftware.wrapper.jmx.WrapperManagerTesting"           name="JavaServiceWrapper:service=WrapperManagerTesting"/&gt;&lt;/server&gt;  JBoss AS 4.2.0 を Windows サービスとして登録  &gt; cd %JBOSS_HOME%\bin&gt; InstallJBoss-NT.bat  JBoss AS 4.2.0 の起動と停止  起動は下記のコマンドで行う。  &gt; net start JBoss    停止は下記のコマンドで行う。  &gt; net stop JBoss  ]]></description>
		<dc:subject>AS</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-16T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  JBoss AS 4.2.0 を Windows サービスとして登録する方法をメモ。
  <a href="http://docs.jboss.org/jbossas/getting_started/v5/html/">Getting Started with JBoss 4.0</a> の <a href="http://docs.jboss.org/jbossas/getting_started/v5/html/install.html#d0e194">Running as a Service</a> の情報が古く、少々戸惑ったが Java Service Wrapper を使用することで無事 JBoss AS 4.2.0 を Windows サービスとして登録できた。
  <dl>
    <dt>Java Service Wrapper</dt>
    <dd><a href="http://wrapper.tanukisoftware.org/doc/english/integrate-simple-win.html">http://wrapper.tanukisoftware.org/doc/english/integrate-simple-win.html</a></dd>
    <dt>RunJBossAsAServiceOnWindows</dt>
    <dd><a href="http://jboss.org/wiki/Wiki.jsp?page=RunJBossAsAServiceOnWindows">http://jboss.org/wiki/Wiki.jsp?page=RunJBossAsAServiceOnWindows</a></dd>
    <dt>Running Jboss as a Windows Service</dt>
    <dd><a href="http://www.theserverside.com/discussions/thread.tss?thread_id=21279">http://www.theserverside.com/discussions/thread.tss?thread_id=21279</a></dd>
  </dl>
</p>
<h5>Java Service Wrapper を JBoss AS 4.2.0 にコピー</h5>
<p>
  まず、Java Service Wrapper を %JBOSS_HOME% にコピーする。
  <blockquote>
<pre>
&gt; copy %WRAPPER_HOME%\bin\Wrapper.exe %JBOSS_HOME%\bin\
&gt; copy %WRAPPER_HOME%\src\bin\App.bat.in %JBOSS_HOME%\bin\
&gt; move %JBOSS_HOME%\bin\App.bat.in %JBOSS_HOME%\bin\JBoss.bat
&gt; copy %WRAPPER_HOME%\src\bin\InstallApp-NT.bat.in %JBOSS_HOME%\bin\
&gt; move %JBOSS_HOME%\bin\InstallApp-NT.bat.in %JBOSS_HOME%\bin\InstallJBoss-NT.bat
&gt; copy %WRAPPER_HOME%\src\bin\UninstallApp-NT.bat.in %JBOSS_HOME%\bin\
&gt; move %JBOSS_HOME%\bin\UninstallApp-NT.bat.in %JBOSS_HOME%\bin\UninstallJBoss-NT.bat
&gt; copy %WRAPPER_HOME%\lib\Wrapper.DLL %JBOSS_HOME%\lib\
&gt; copy %WRAPPER_HOME%\lib\wrapper.jar %JBOSS_HOME%\lib\
&gt; md %JBOSS_HOME%\conf
&gt; copy %WRAPPER_HOME%\src\conf\wrapper.conf.in %JBOSS_HOME%\conf\
&gt; move %JBOSS_HOME%\src\conf\wrapper.conf.in %JBOSS_HOME%\conf\wrapper.conf
</pre>
  </blockquote>
</p>
<h5>Java Service Wrapper の設定</h5>
<p>
  %JBOSS_HOME%\conf\wrapper.conf を編集する。
  <blockquote>
<pre>
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=c:/jdk1.5.0_12/bin/java

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
<font color="red">wrapper.java.classpath.1=c:/jboss-4.2.0.GA/lib/wrapper.jar</font>
<font color="red">wrapper.java.classpath.2=c:/jdk1.5.0_12/lib/tools.jar</font>
wrapper.java.classpath.3=./run.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
<font color="red">wrapper.java.library.path.1=c:/jboss-4.2.0.GA/lib</font>

# Java Additional Parameters
wrapper.java.additional.1=-server

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.jboss.Main
<font color="red">wrapper.app.parameter.2=-b 0.0.0.0</font>

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=c:/jboss-4.2.0.GA/server/default/log/wrapper.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=JBoss Server

#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
<font color="red">wrapper.ntservice.name=JBoss</font>

# Display name of the service
<font color="red">wrapper.ntservice.displayname=JBoss Server</font>

# Description of the service
<font color="red">wrapper.ntservice.description=JBoss Server</font>

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
</pre>
  </blockquote>
<h5>Java Service Wrapper の JMX サービスを JBoss AS に登録</h5>
<p>
  %JBOSS_HOME%\server\default\deploy\java-service-wrapper-service.xml を作成する。
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE server&gt;
&lt;server&gt;
    &lt;mbean code="org.tanukisoftware.wrapper.jmx.WrapperManager"
           name="JavaServiceWrapper:service=WrapperManager"/&gt;
    
    &lt;mbean code="org.tanukisoftware.wrapper.jmx.WrapperManagerTesting"
           name="JavaServiceWrapper:service=WrapperManagerTesting"/&gt;
&lt;/server&gt;
</pre>
  </blockquote>
</p>
<h5>JBoss AS 4.2.0 を Windows サービスとして登録</h5>
<p>
  <blockquote>
<pre>
&gt; cd %JBOSS_HOME%\bin
&gt; InstallJBoss-NT.bat
<pre>
  </blockquote>
</p>
<h5>JBoss AS 4.2.0 の起動と停止</h5>
<p>
  起動は下記のコマンドで行う。
  <blockquote>
<pre>
&gt; net start JBoss
</pre>
  </blockquote>
  停止は下記のコマンドで行う。
  <blockquote>
<pre>
&gt; net stop JBoss
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/AS/20070716_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Library/20070714_01.htm">
		<title><![CDATA[Ant から Subversion へのアクセスにチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Library/20070714_01.htm</link>
		<description><![CDATA[  チャレンジというほどのものでもない。  単に SvnAnt を使ってみただけ。  Ant 1.7.0 と簡単に連携できた。  これは便利。  ちょっと Ant で簡単なスクリプトを書くときに重宝しそう。      SvnAnt    http://subclipse.tigris.org/svnant.html    Apache Ant    http://ant.apache.org/  build.xml  &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project name="my project" default="checkout" basedir="."&gt;  &lt;property name="workspace.dir" value="c:\workspace\myproject" /&gt;  &lt;property name="svn.userid"    value="scott" /&gt;  &lt;property name="svn.password"  value="tiger" /&gt;  &lt;property name="svn.url"       value="https://svn.example.com/svn/myproject/trunk" /&gt;  &lt;property name="svn.revision"  value="HEAD" /&gt;  &lt;path id="svnant.class.path"&gt;    &lt;fileset dir="${env.ANT_HOME}/antsvn/"&gt;      &lt;include name="*.jar" /&gt;    &lt;/fileset&gt;  &lt;/path&gt;  &lt;typedef resource="org/tigris/subversion/svnant/svnantlib.xml"           classpathref="svnant.class.path"/&gt;  &lt;target name="checkout"&gt;    &lt;delete dir="${workspace.dir}" /&gt;    &lt;mkdir dir="${workspace.dir}" /&gt;    &lt;svn username="${svn.userid}"         password="${svn.password}"&gt;      &lt;checkout url="${svn.url}"                revision="${svn.revision}"                destPath="${workspace.dir}" /&gt;    &lt;/svn&gt;  &lt;/target&gt;&lt;/project&gt;  ]]></description>
		<dc:subject>Library</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-14T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  チャレンジというほどのものでもない。
  単に SvnAnt を使ってみただけ。
  Ant 1.7.0 と簡単に連携できた。
  これは便利。
  ちょっと Ant で簡単なスクリプトを書くときに重宝しそう。
  <dl>
    <dt>SvnAnt</dt>
    <dd><a href="http://subclipse.tigris.org/svnant.html">http://subclipse.tigris.org/svnant.html</a></dd>
    <dt>Apache Ant</dt>
    <dd><a href="http://ant.apache.org/">http://ant.apache.org/</a></dd>
  </dl>
</p>
<h5>build.xml</h5>
<p>
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;project name="my project" default="checkout" basedir="."&gt;

  &lt;property name="workspace.dir" value="c:\workspace\myproject" /&gt;
  &lt;property name="svn.userid"    value="scott" /&gt;
  &lt;property name="svn.password"  value="tiger" /&gt;
  &lt;property name="svn.url"       value="https://svn.example.com/svn/myproject/trunk" /&gt;
  &lt;property name="svn.revision"  value="HEAD" /&gt;

  &lt;path id="svnant.class.path"&gt;
    &lt;fileset dir="${env.ANT_HOME}/antsvn/"&gt;
      &lt;include name="*.jar" /&gt;
    &lt;/fileset&gt;
  &lt;/path&gt;

  &lt;typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
           classpathref="svnant.class.path"/&gt;

  &lt;target name="checkout"&gt;
    &lt;delete dir="${workspace.dir}" /&gt;
    &lt;mkdir dir="${workspace.dir}" /&gt;
    &lt;svn username="${svn.userid}"
         password="${svn.password}"&gt;
      &lt;checkout url="${svn.url}"
                revision="${svn.revision}"
                destPath="${workspace.dir}" /&gt;
    &lt;/svn&gt;
  &lt;/target&gt;
&lt;/project&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070714_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Library/20070710_01.htm">
		<title><![CDATA[Apache Struts の Upgrade 方法をメモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Library/20070710_01.htm</link>
		<description><![CDATA[  既存アプリケーションで使用している Apache Struts を Upgrade するときに便利なドキュメントがあったのでメモ。      StrutsUpgradeNotes10to12    http://wiki.apache.org/struts/StrutsUpgradeNotes10to12    StrutsUpgradeNotes11to124    http://wiki.apache.org/struts/StrutsUpgradeNotes11to124    StrutsUpgradeNotes124to127    http://wiki.apache.org/struts/StrutsUpgradeNotes124to127    StrutsUpgradeNotes127to128    http://wiki.apache.org/struts/StrutsUpgradeNotes127to128    StrutsUpgradeNotes128to129    http://wiki.apache.org/struts/StrutsUpgradeNotes128to129    StrutsUpgradeNotes12to13    http://wiki.apache.org/struts/StrutsUpgradeNotes12to13  ]]></description>
		<dc:subject>Library</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-10T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  既存アプリケーションで使用している Apache Struts を Upgrade するときに便利なドキュメントがあったのでメモ。
  <dl>
    <dt>StrutsUpgradeNotes10to12</dt>
    <dd><a href="http://wiki.apache.org/struts/StrutsUpgradeNotes10to12">http://wiki.apache.org/struts/StrutsUpgradeNotes10to12</a></dd>
    <dt>StrutsUpgradeNotes11to124</dt>
    <dd><a href="http://wiki.apache.org/struts/StrutsUpgradeNotes11to124">http://wiki.apache.org/struts/StrutsUpgradeNotes11to124</a></dd>
    <dt>StrutsUpgradeNotes124to127</dt>
    <dd><a href="http://wiki.apache.org/struts/StrutsUpgradeNotes124to127">http://wiki.apache.org/struts/StrutsUpgradeNotes124to127</a></dd>
    <dt>StrutsUpgradeNotes127to128</dt>
    <dd><a href="http://wiki.apache.org/struts/StrutsUpgradeNotes127to128">http://wiki.apache.org/struts/StrutsUpgradeNotes127to128</a></dd>
    <dt>StrutsUpgradeNotes128to129</dt>
    <dd><a href="http://wiki.apache.org/struts/StrutsUpgradeNotes128to129">http://wiki.apache.org/struts/StrutsUpgradeNotes128to129</a></dd>
    <dt>StrutsUpgradeNotes12to13</dt>
    <dd><a href="http://wiki.apache.org/struts/StrutsUpgradeNotes12to13">http://wiki.apache.org/struts/StrutsUpgradeNotes12to13</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070710_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/AS/20070705_01.htm">
		<title><![CDATA[JBoss AS 4.2.x に外部(loopback外)からアクセスする方法]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/AS/20070705_01.htm</link>
		<description><![CDATA[  JBoss AS 4.2.x はデフォルト状態では loopback address 以外からのアクセスを受け付けない様、仕様が変更されたらしい。  loopback address 以外から接続する場合は起動時に "-b" オプションを指定する必要がある。  Release Notes には書いてあるけれど、こういう影響の大きい変更はもう少し派手に情宣して欲しいな・・・。      JBoss AS 4.2.0.GA Release Notes    http://sourceforge.net/project/shownotes.php?group_id=22866&release_id=507793        JBossAS now binds its services to localhost (127.0.0.1) *by default*, instead of binding to all available interfaces (0.0.0.0). This was primarily done for security reasons because of concerns of users going to production without having secured their servers properly. To enable remote access by binding JBoss services to a particular interface, simply run jboss with the -b option, but be aware you still need to secure you server properly.     &gt; run.bat --helpusage: run.bat [options]options:    -h, --help                    Show this help message    -V, --version                 Show version information    --                            Stop processing options    -D&lt;name&gt;[=&lt;value&gt;]            Set a system property    -d, --bootdir=&lt;dir&gt;           Set the boot patch directory; Must be absolute or url    -p, --patchdir=&lt;dir&gt;          Set the patch directory; Must be absolute or url    -n, --netboot=&lt;url&gt;           Boot from net with the given url as base    -c, --configuration=&lt;name&gt;    Set the server configuration name    -B, --bootlib=&lt;filename&gt;      Add an extra library to the front bootclasspath    -L, --library=&lt;filename&gt;      Add an extra library to the loaders classpath    -C, --classpath=&lt;url&gt;         Add an extra url to the loaders classpath    -P, --properties=&lt;url&gt;        Load system properties from the given url    -b, --host=&lt;host or ip&gt;       Bind address for all JBoss services    -g, --partition=&lt;name&gt;        HA Partition name (default=DefaultDomain)    -u, --udp=&lt;ip&gt;                UDP multicast address    -l, --log=&lt;log4j|jdk&gt;         Specify the logger plugin type  ]]></description>
		<dc:subject>AS</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-07-05T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  JBoss AS 4.2.x はデフォルト状態では loopback address 以外からのアクセスを受け付けない様、仕様が変更されたらしい。
  loopback address 以外から接続する場合は起動時に "-b" オプションを指定する必要がある。
  Release Notes には書いてあるけれど、こういう影響の大きい変更はもう少し派手に情宣して欲しいな・・・。

  <dl>
    <dt>JBoss AS 4.2.0.GA Release Notes</dt>
    <dd><a href="http://sourceforge.net/project/shownotes.php?group_id=22866&release_id=507793">http://sourceforge.net/project/shownotes.php?group_id=22866&release_id=507793</a></dd>
  </dl>
  <blockquote>
    JBossAS now binds its services to localhost (127.0.0.1) *by default*, instead of binding to all available interfaces (0.0.0.0). This was primarily done for security reasons because of concerns of users going to production without having secured their servers properly. To enable remote access by binding JBoss services to a particular interface, simply run jboss with the -b option, but be aware you still need to secure you server properly. 
  </blockquote>
</p>
<p>
  <blockquote>
<pre>
&gt; run.bat --help

usage: run.bat [options]

options:
    -h, --help                    Show this help message
    -V, --version                 Show version information
    --                            Stop processing options
    -D&lt;name&gt;[=&lt;value&gt;]            Set a system property
    -d, --bootdir=&lt;dir&gt;           Set the boot patch directory; Must be absolute or url
    -p, --patchdir=&lt;dir&gt;          Set the patch directory; Must be absolute or url
    -n, --netboot=&lt;url&gt;           Boot from net with the given url as base
    -c, --configuration=&lt;name&gt;    Set the server configuration name
    -B, --bootlib=&lt;filename&gt;      Add an extra library to the front bootclasspath
    -L, --library=&lt;filename&gt;      Add an extra library to the loaders classpath
    -C, --classpath=&lt;url&gt;         Add an extra url to the loaders classpath
    -P, --properties=&lt;url&gt;        Load system properties from the given url
    <font color="red">-b, --host=&lt;host or ip&gt;       Bind address for all JBoss services</font>
    -g, --partition=&lt;name&gt;        HA Partition name (default=DefaultDomain)
    -u, --udp=&lt;ip&gt;                UDP multicast address
    -l, --log=&lt;log4j|jdk&gt;         Specify the logger plugin type
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/AS/20070705_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070530_01.htm">
		<title><![CDATA[Maven2 の assembly プラグインにチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070530_01.htm</link>
		<description><![CDATA[maven-assembly-plugin とは  いわゆる「出荷用アーカイブの作成」に近いイメージのプラグイン。  特に出荷用というわけではないのだけれど、プロジェクト内の好きなファイルをアーカイビングすることが出来る。  アーカイブの形式も zip、tar.gz、tar.bz2、jar など様々な形式に対応している。  今回は、開発環境(要するにソース一式)を他の開発者にそのままアーカイビングして渡すことをイメージして遊んでみた。      Maven Assembly Plugin    http://maven.apache.org/plugins/maven-assembly-plugin/    assembly:assembly    http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html    Guide to creating assemblies    http://maven.apache.org/guides/mini/guide-assemblies.html    ソースコード    https://svn.apache.org/repos/asf/maven/plugins/tags/maven-assembly-plugin-2.2-beta-1/  pom.xml の設定  &lt;project&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;        &lt;configuration&gt;          &lt;descriptor&gt;assemple.xml&lt;/descriptor&gt;          &lt;outputDirectory&gt;..&lt;/outputDirectory&gt;        &lt;/configuration&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;&lt;/project&gt;  maven-assembly-plugin の設定ファイル  pom.xml で指定した名称で maven-assembly-plugin の設定ファイルを作成する。  下の例は開発環境を渡すことを想定しているため、ソースコード類とビルドツールをアーカイビングしている。  &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;assembly&gt;  &lt;id&gt;src&lt;/id&gt;  &lt;formats&gt;    &lt;format&gt;tar.gz&lt;/format&gt;  &lt;/formats&gt;  &lt;fileSets&gt;    &lt;fileSet&gt;      &lt;includes&gt;        &lt;include&gt;*.*&lt;/include&gt;        &lt;include&gt;.settings/**/*.*&lt;/include&gt;        &lt;include&gt;module1/pom.xml&lt;/include&gt;        &lt;include&gt;module1/src/**/*.*&lt;/include&gt;        &lt;include&gt;module2/pom.xml&lt;/include&gt;        &lt;include&gt;module2/src/**/*.*&lt;/include&gt;        &lt;include&gt;tool/maven-2.0.6/**/*.*&lt;/include&gt;      &lt;/includes&gt;    &lt;/fileSet&gt;  &lt;/fileSets&gt;&lt;/assembly&gt;  maven-assembly-plugin の実行  下のコマンドで実行できる。今回の例では、プロジェクトホームと同じディレクトリに ${finalName}-src.tar.gz というアーカイブが作成される。  アーカイブファイルに設定ファイルの id が付加される。  &gt; mvn assembly:assembly  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-30T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>maven-assembly-plugin とは</h4>
<p>
  いわゆる「出荷用アーカイブの作成」に近いイメージのプラグイン。
  特に出荷用というわけではないのだけれど、プロジェクト内の好きなファイルをアーカイビングすることが出来る。
  アーカイブの形式も zip、tar.gz、tar.bz2、jar など様々な形式に対応している。
  今回は、開発環境(要するにソース一式)を他の開発者にそのままアーカイビングして渡すことをイメージして遊んでみた。
  <dl>
    <dt>Maven Assembly Plugin</dt>
    <dd><a href="http://maven.apache.org/plugins/maven-assembly-plugin/">http://maven.apache.org/plugins/maven-assembly-plugin/</a></dd>
    <dt>assembly:assembly</dt>
    <dd><a href="http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html">http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html</a></dd>
    <dt>Guide to creating assemblies</dt>
    <dd><a href="http://maven.apache.org/guides/mini/guide-assemblies.html">http://maven.apache.org/guides/mini/guide-assemblies.html</a></dd>
    <dt>ソースコード</dt>
    <dd><a href="https://svn.apache.org/repos/asf/maven/plugins/tags/maven-assembly-plugin-2.2-beta-1/">https://svn.apache.org/repos/asf/maven/plugins/tags/maven-assembly-plugin-2.2-beta-1/</a></dd>
  </dl>
</p>
<h5>pom.xml の設定</h5>
<p>
  <blockquote>
<pre>
&lt;project&gt;
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;descriptor&gt;assemple.xml&lt;/descriptor&gt;
          &lt;outputDirectory&gt;..&lt;/outputDirectory&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>maven-assembly-plugin の設定ファイル</h5>
<p>
  pom.xml で指定した名称で maven-assembly-plugin の設定ファイルを作成する。
  下の例は開発環境を渡すことを想定しているため、ソースコード類とビルドツールをアーカイビングしている。
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;assembly&gt;
  &lt;id&gt;src&lt;/id&gt;
  &lt;formats&gt;
    &lt;format&gt;tar.gz&lt;/format&gt;
  &lt;/formats&gt;
  &lt;fileSets&gt;
    &lt;fileSet&gt;
      &lt;includes&gt;
        &lt;include&gt;*.*&lt;/include&gt;
        &lt;include&gt;.settings/**/*.*&lt;/include&gt;
        &lt;include&gt;module1/pom.xml&lt;/include&gt;
        &lt;include&gt;module1/src/**/*.*&lt;/include&gt;
        &lt;include&gt;module2/pom.xml&lt;/include&gt;
        &lt;include&gt;module2/src/**/*.*&lt;/include&gt;
        &lt;include&gt;tool/maven-2.0.6/**/*.*&lt;/include&gt;
      &lt;/includes&gt;
    &lt;/fileSet&gt;
  &lt;/fileSets&gt;
&lt;/assembly&gt;
</pre>
  </blockquote>
</p>
<h5>maven-assembly-plugin の実行</h5>
<p>
  下のコマンドで実行できる。今回の例では、プロジェクトホームと同じディレクトリに ${finalName}-src.tar.gz というアーカイブが作成される。
  アーカイブファイルに設定ファイルの id が付加される。
  <blockquote>
<pre>
&gt; mvn assembly:assembly
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070530_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Subversion/20070526_01.htm">
		<title><![CDATA[Subversion と Trac の連携にチャレンジ (2)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Subversion/20070526_01.htm</link>
		<description><![CDATA[  Subversion の Issue Tracker 連携機能は便利なのだけれど、ディレクトリ毎にいくつものプロパティを設定しなければいけないという面倒さがある。  auto-props を使用できれば良いのだが、auto-props は残念なことにファイル専用でディレクトリには適用されない。  ディレクトリを作成する度にプロパティを手動で設定するのは馬鹿らしいので、自動化を考えてみた。自動化の方法      auto-props    ディレクトリには auto-props は適用されない。不可能。    svn propset を CRON で実行。    ディレクトリ作成直後に連携機能が使用できない。さすがに /etc/cron.minutely というのは無いし。    pre-commit hook を利用    pre-commit で svn co、svn propset、svn commit を実施するとコンフリクトが発生して元の svn commit が失敗してしまう。NG。ちなみに、svn propset は working copy が無いと動作しないので、面倒でも一度 svn co しないと propset できない(Subversion subversion Issue 2238 で議論されている)。ちなみに、proplist や propget は working copy 無しでも実行できる。    post-commit hook を利用    これが唯一の方法?? post-commit で svn co、svn propset、svn commit を行う。パフォーマンス的には問題だが、所詮個人用途のサーバだから大丈夫だろう。  post-commit で bugtraq プロパティ追加の自動化/var/svn/hooks/post-commit  というわけで、post-commit 用のスクリプトを作成してみた。  善し悪しは別として、bugtraq:url プロパティが設定されていないディレクトリ(もしくはその直下のファイル)が commit された際に自動的に bugtraq 関連のプロパティをセットする。  ユーザ情報を埋め込まないと行けないのが難と言えば難だが、他に方法が無かったので必要悪ということで諦めた。  ちょっとややこしくなってしまったが、結果的に期待通りの動作が得られたので良しとする。  # cat /var/svn/hooks/post-commit#!/bin/sh# POST-COMMIT HOOKBUGTRAQ_PROPS=/var/svn/bugtraq_props.confTMP_DIR=/var/tmp/svnSVN_REPOSITORY=file:///var/svn/SVN_USER=meSVN_PASSWORD=mypasswordSVNLOOK=/usr/bin/svnlookSVN=/usr/bin/svnREPOS="$1"REV="$2"#-----------------------------------------------------------------# propset bugtraq conrigurations to directories#-----------------------------------------------------------------configureBugtraqProps() {  #---------------------------------------------------------------  # load configuration for bugtraq.  # if configuration file does not exist, do nothing.  #---------------------------------------------------------------  test -x $BUGTRAQ_PROPS || return  . $BUGTRAQ_PROPS  CHANGED_DIRS="$1"  for i in $CHANGED_DIRS;  do    #-------------------------------------------------------------    # if "bugtraq:url" prop is not set, assume that this directory    # has no bagtraq configuration    #-------------------------------------------------------------    BUGTRAQ_URL=`$SVNLOOK propget -r "$REV" "$REPOS" "bugtraq:url" "$i"`    if [ "$BUGTRAQ_URL" == "" ]    then      #-----------------------------------------------------------      # unfortunately, svn propset command needs working copy of repository.      # so, checkout target directory to temporary working copy      #-----------------------------------------------------------      rm -rf $TMP_DIR      mkdir $TMP_DIR      cd $TMP_DIR      $SVN checkout "$SVN_REPOSITORY$i" --non-recursive -r HEAD --username "$SVN_USER" --password "$SVN_PASSWORD" --non-interactive      #-----------------------------------------------------------      # propset to target directory      #-----------------------------------------------------------      $SVN propset "bugtraq:url" "$bugtraq_url" `ls $TMP_DIR`      $SVN propset "bugtraq:label" "$bugtraq_label" `ls $TMP_DIR`      $SVN propset "bugtraq:message" "$bugtraq_message" `ls $TMP_DIR`      $SVN propset "bugtraq:warnifnoissue" "$bugtraq_warnifnoissue" `ls $TMP_DIR`      $SVN propset "bugtraq:number" "$bugtraq_number" `ls $TMP_DIR`      $SVN propset "bugtraq:append" "$bugtraq_append" `ls $TMP_DIR`      $SVN propset "bugtraq:logregex" "$bugtraq_logregex" `ls $TMP_DIR`      #-----------------------------------------------------------      # commit prop changes      #-----------------------------------------------------------      $SVN commit `ls $TMP_DIR` --username "$SVN_USER" --password "$SVN_PASSWORD" --message "set bugtraq props"      #-----------------------------------------------------------      # clean up temporary working copy      #-----------------------------------------------------------      rm -rf $TMP_DIR    fi  done}CHANGED_DIRS=`$SVNLOOK dirs-changed -r "$REV" "$REPOS"`configureBugtraqProps "$CHANGED_DIRS"exit 0  /var/svn/bugtraq_props.conf  この設定は環境に併せて適宜変更する必要がある。  # cat /var/svn/bugtraq_props.confbugtraq_url=https://www.example.com/trac/ticket/%BUGID%bugtraq_label="Ticket ID"bugtraq_message="#%BUGID%"bugtraq_warnifnoissue=falsebugtraq_number=truebugtraq_append=falsebugtraq_logregex="#?(\d+)"  ]]></description>
		<dc:subject>Subversion</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-26T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Subversion の Issue Tracker 連携機能は便利なのだけれど、ディレクトリ毎にいくつものプロパティを設定しなければいけないという面倒さがある。
  auto-props を使用できれば良いのだが、auto-props は残念なことにファイル専用でディレクトリには適用されない。
  ディレクトリを作成する度にプロパティを手動で設定するのは馬鹿らしいので、自動化を考えてみた。
</p>
<h4>自動化の方法</h4>
<p>
  <dl>
    <dt>auto-props</dt>
    <dd>ディレクトリには auto-props は適用されない。不可能。</dd>
    <dt>svn propset を CRON で実行。</dt>
    <dd>ディレクトリ作成直後に連携機能が使用できない。さすがに /etc/cron.minutely というのは無いし。</dd>
    <dt>pre-commit hook を利用</dt>
    <dd>pre-commit で svn co、svn propset、svn commit を実施するとコンフリクトが発生して元の svn commit が失敗してしまう。NG。ちなみに、svn propset は working copy が無いと動作しないので、面倒でも一度 svn co しないと propset できない(<a href="http://subversion.tigris.org/issues/show_bug.cgi?id=2238">Subversion subversion Issue 2238</a> で議論されている)。ちなみに、proplist や propget は working copy 無しでも実行できる。</dd>
    <dt>post-commit hook を利用</dt>
    <dd>これが唯一の方法?? post-commit で svn co、svn propset、svn commit を行う。パフォーマンス的には問題だが、所詮個人用途のサーバだから大丈夫だろう。</dd>
  </dl>
</p>
<h4>post-commit で bugtraq プロパティ追加の自動化</h4>
<h5>/var/svn/hooks/post-commit</h5>
<p>
  というわけで、post-commit 用のスクリプトを作成してみた。
  善し悪しは別として、bugtraq:url プロパティが設定されていないディレクトリ(もしくはその直下のファイル)が commit された際に自動的に bugtraq 関連のプロパティをセットする。
  ユーザ情報を埋め込まないと行けないのが難と言えば難だが、他に方法が無かったので必要悪ということで諦めた。
  ちょっとややこしくなってしまったが、結果的に期待通りの動作が得られたので良しとする。
  <blockquote>
<pre>
# cat /var/svn/hooks/post-commit
#!/bin/sh
# POST-COMMIT HOOK

BUGTRAQ_PROPS=/var/svn/bugtraq_props.conf
TMP_DIR=/var/tmp/svn
SVN_REPOSITORY=file:///var/svn/
SVN_USER=me
SVN_PASSWORD=mypassword
SVNLOOK=/usr/bin/svnlook
SVN=/usr/bin/svn
REPOS="$1"
REV="$2"

#-----------------------------------------------------------------
# propset bugtraq conrigurations to directories
#-----------------------------------------------------------------
configureBugtraqProps() {

  #---------------------------------------------------------------
  # load configuration for bugtraq.
  # if configuration file does not exist, do nothing.
  #---------------------------------------------------------------
  test -x $BUGTRAQ_PROPS || return
  . $BUGTRAQ_PROPS
  CHANGED_DIRS="$1"
  for i in $CHANGED_DIRS;
  do

    #-------------------------------------------------------------
    # if "bugtraq:url" prop is not set, assume that this directory
    # has no bagtraq configuration
    #-------------------------------------------------------------
    BUGTRAQ_URL=`$SVNLOOK propget -r "$REV" "$REPOS" "bugtraq:url" "$i"`
    if [ "$BUGTRAQ_URL" == "" ]
    then

      #-----------------------------------------------------------
      # unfortunately, svn propset command needs working copy of repository.
      # so, checkout target directory to temporary working copy
      #-----------------------------------------------------------
      rm -rf $TMP_DIR
      mkdir $TMP_DIR
      cd $TMP_DIR
      $SVN checkout "$SVN_REPOSITORY$i" --non-recursive -r HEAD --username "$SVN_USER" --password "$SVN_PASSWORD" --non-interactive

      #-----------------------------------------------------------
      # propset to target directory
      #-----------------------------------------------------------
      $SVN propset "bugtraq:url" "$bugtraq_url" `ls $TMP_DIR`
      $SVN propset "bugtraq:label" "$bugtraq_label" `ls $TMP_DIR`
      $SVN propset "bugtraq:message" "$bugtraq_message" `ls $TMP_DIR`
      $SVN propset "bugtraq:warnifnoissue" "$bugtraq_warnifnoissue" `ls $TMP_DIR`
      $SVN propset "bugtraq:number" "$bugtraq_number" `ls $TMP_DIR`
      $SVN propset "bugtraq:append" "$bugtraq_append" `ls $TMP_DIR`
      $SVN propset "bugtraq:logregex" "$bugtraq_logregex" `ls $TMP_DIR`

      #-----------------------------------------------------------
      # commit prop changes
      #-----------------------------------------------------------
      $SVN commit `ls $TMP_DIR` --username "$SVN_USER" --password "$SVN_PASSWORD" --message "set bugtraq props"

      #-----------------------------------------------------------
      # clean up temporary working copy
      #-----------------------------------------------------------
      rm -rf $TMP_DIR
    fi
  done
}

CHANGED_DIRS=`$SVNLOOK dirs-changed -r "$REV" "$REPOS"`
configureBugtraqProps "$CHANGED_DIRS"
exit 0
</pre>
  </blockquote>
</p>
<h5>/var/svn/bugtraq_props.conf</h5>
<p>
  この設定は環境に併せて適宜変更する必要がある。
  <blockquote>
<pre>
# cat /var/svn/bugtraq_props.conf
bugtraq_url=https://www.example.com/trac/ticket/%BUGID%
bugtraq_label="Ticket ID"
bugtraq_message="#%BUGID%"
bugtraq_warnifnoissue=false
bugtraq_number=true
bugtraq_append=false
bugtraq_logregex="#?(\d+)"
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Subversion/20070526_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Subversion/20070525_01.htm">
		<title><![CDATA[Subversion と Trac の連携にチャレンジ (1)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Subversion/20070525_01.htm</link>
		<description><![CDATA[  Subversion には、クライアントプログラム用に "bugtraq" で始まるプロパティが規定されている。  このプロパティが指定されているディレクトリはバグトラッキングシステムとの連携機能が特別に用意される(大抵のクライアントで)。  というわけで、Subversion と Trac を連携させてみた。      Issue Tracker Integration    http://svn.collab.net/subclipse/help/topic/org.tigris.subversion.subclipse.doc/html/reference/issuetracker.html    Integration of Subversion (GUI) clients with Bug Tracking Tools    http://guest:guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/doc/issuetrackers.txt  設定したプロパティ  設定するのはディレクトリのみで OK。  TortoiseSVN を使用すると再帰的に設定を行ってくれるので便利。        bugtraq_url    https://www.example.com/trac/ticket/%BUGID%    Issue Tracker の URL。"%BUGID%"という文字列がコミット時に入力された Issue ID に自動的に置換される。        bugtraq_label    "Ticket ID"    Subversion クライアントに表示される ID 用のラベル。Trac の場合は Bug も Issue も Ticket と呼ばれているので Ticket ID にしている。        bugtraq_message    "#%BUGID%"    コミット時、コメントに自動的に追記されるメッセージ。        bugtraq_warnifnoissue    false    コミット時に Issue ID が指定されなかった場合に警告をするか否か。個人的にコード以外の情報も Subversion で管理しているので false にしているが、開発用リソースのみが格納されているディレクトリの場合は true の方が良いかもしれない。        bugtraq_number    true    Issue ID が数値かどうか。Issue ID が Subversion クライアントに入力された際、クライアントが Issue ID をバリデーションしてくれる。        bugtraq_append    false    bugtraq_message で指定したメッセージを、ユーザが入力したコメントの「前」に追記するか「後」に追記するかを指定する。false の時に前になる。        bugtraq_logregex    "#?(\d+)"    Issue ID の正規表現。Issue ID が Subversion クライアントに入力された際、クライアントが Issue ID をバリデーションしてくれる。    TortoiseSVN のコミット画面の変化        設定前    設定後                  Subclipse のコミット画面の変化        設定前    設定後                  ]]></description>
		<dc:subject>Subversion</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-25T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Subversion には、クライアントプログラム用に "bugtraq" で始まるプロパティが規定されている。
  このプロパティが指定されているディレクトリはバグトラッキングシステムとの連携機能が特別に用意される(大抵のクライアントで)。
  というわけで、Subversion と Trac を連携させてみた。
  <dl>
    <dt>Issue Tracker Integration</dt>
    <dd><a href="http://svn.collab.net/subclipse/help/topic/org.tigris.subversion.subclipse.doc/html/reference/issuetracker.html">http://svn.collab.net/subclipse/help/topic/org.tigris.subversion.subclipse.doc/html/reference/issuetracker.html</a></dd>
    <dt>Integration of Subversion (GUI) clients with Bug Tracking Tools</dt>
    <dd><a href="http://guest:guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/doc/issuetrackers.txt">http://guest:guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/doc/issuetrackers.txt</a></dd>
  </dl>
</p>
<h4>設定したプロパティ</h4>
<p>
  設定するのはディレクトリのみで OK。
  TortoiseSVN を使用すると再帰的に設定を行ってくれるので便利。
  <table border="1">
  <tr>
    <td>bugtraq_url</td>
    <td>https://www.example.com/trac/ticket/%BUGID%</td>
    <td>Issue Tracker の URL。"%BUGID%"という文字列がコミット時に入力された Issue ID に自動的に置換される。</td>
  </tr>
  <tr>
    <td>bugtraq_label</td>
    <td>"Ticket ID"</td>
    <td>Subversion クライアントに表示される ID 用のラベル。Trac の場合は Bug も Issue も Ticket と呼ばれているので Ticket ID にしている。</td>
  </tr>
  <tr>
    <td>bugtraq_message</td>
    <td>"#%BUGID%"</td>
    <td>コミット時、コメントに自動的に追記されるメッセージ。</td>
  </tr>
  <tr>
    <td>bugtraq_warnifnoissue</td>
    <td>false</td>
    <td>コミット時に Issue ID が指定されなかった場合に警告をするか否か。個人的にコード以外の情報も Subversion で管理しているので false にしているが、開発用リソースのみが格納されているディレクトリの場合は true の方が良いかもしれない。</td>
  </tr>
  <tr>
    <td>bugtraq_number</td>
    <td>true</td>
    <td>Issue ID が数値かどうか。Issue ID が Subversion クライアントに入力された際、クライアントが Issue ID をバリデーションしてくれる。</td>
  </tr>
  <tr>
    <td>bugtraq_append</td>
    <td>false</td>
    <td>bugtraq_message で指定したメッセージを、ユーザが入力したコメントの「前」に追記するか「後」に追記するかを指定する。false の時に前になる。</td>
  </tr>
  <tr>
    <td>bugtraq_logregex</td>
    <td>"#?(\d+)"</td>
    <td>Issue ID の正規表現。Issue ID が Subversion クライアントに入力された際、クライアントが Issue ID をバリデーションしてくれる。</td>
  </tr>
  </table>
</p>
<h4>TortoiseSVN のコミット画面の変化</h4>
<p>
  <table>
  <tr>
    <td>設定前</td>
    <td>設定後</td>
  </tr>
  <tr>
    <td> <a href="/blog/entries/Subversion/20070525_01/tortoisesvn_01.png" title="TortoiseSVN設定前" rel="imagebox"><img src="/blog/entries/Subversion/20070525_01/tortoisesvn_01.png" alt="[TortoiseSVN設定前]" width="300"/></a></td>
    <td> <a href="/blog/entries/Subversion/20070525_01/tortoisesvn_02.png" title="TortoiseSVN設定後" rel="imagebox"><img src="/blog/entries/Subversion/20070525_01/tortoisesvn_02.png" alt="[TortoiseSVN設定後]" width="300"/></a></td>
  </tr>
  </table>
</p>
<h4>Subclipse のコミット画面の変化</h4>
<p>
  <table>
  <tr>
    <td>設定前</td>
    <td>設定後</td>
  </tr>
  <tr>
    <td> <a href="/blog/entries/Subversion/20070525_01/subclipse_01.png" title="Subclipse設定前" rel="imagebox"><img src="/blog/entries/Subversion/20070525_01/subclipse_01.png" alt="[Subclipse設定前]" width="300"/></a></td>
    <td> <a href="/blog/entries/Subversion/20070525_01/subclipse_02.png" title="Subclipse設定後" rel="imagebox"><img src="/blog/entries/Subversion/20070525_01/subclipse_02.png" alt="[Subclipse設定後]" width="300"/></a></td>
  </tr>
  </table>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Subversion/20070525_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Library/20070524_01.htm">
		<title><![CDATA[Log4j を使用してログを syslog に出力する]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Library/20070524_01.htm</link>
		<description><![CDATA[  Debian Etch の syslog にリモートから Log4j を使用してログを出力する方法をメモ。syslogd の設定  Debian Etch では、デフォルト状態の syslogd はリモートからのログを受け付けない設定になっている。  そのため、syslogd の設定を変更して syslogd をリブートする必要がある。  設定は /etc/default/syslogd で行う。  # diff /etc/default/syslogd.original /etc/default/syslogd13c13 SYSLOGD="-r"# /etc/init.d/sysklogd restart#    設定が正常に反映されたか確認するために、syslog のポートが開いているかチェックする。  # netstat -an | grep -i udp | grep 514udp        0      0 0.0.0.0:514             0.0.0.0:*#    UDP の 514 が開いていたら設定は成功。Log4j の設定  Log4j にはデフォルトで syslog にログを出力してくれる org.apache.log4j.net.SyslogAppender が用意されている。  しかし、残念なことに org.apache.log4j.PatternLayout が文字エンコーディングの変換機能を持っていないので、マルチバイト文字をメッセージに使用するとログが文字化けしてしまう。  そのため、PatternLayout を拡張して文字エンコーディングを変換する機能を持った Layout クラスを自作する必要がある。  Debian Etch の場合は(インストール時の設定にもよるけれど)、通常デフォルトの文字エンコーディングは EUC-JP になっていると思うので、EUC-JP に変換できればマルチバイト文字をログに出力できる。文字エンコーディング変換機能付き PatternLayout  PatternLayout の拡張は非常に簡単。  単純に文字エンコーディングを設定内容からインジェクションしてもらい、PatternLayout でメッセージをフォーマットした後に変換処理をするだけ。  package jp.in_vitro.samplecode;import java.io.UnsupportedEncodingException;import org.apache.log4j.PatternLayout;import org.apache.log4j.spi.LoggingEvent;/** * メッセージのフォーマット後に文字エンコーディング変換を行う {@link PatternLayout}。 */public class CharsetSupportPatternLayout extends PatternLayout {    /** メッセージをフォーマット後に変換する文字エンコーディング。 */    private String charset;    public CharsetSupportPatternLayout() {        super();    }    public CharsetSupportPatternLayout(final String pattern) {        super(pattern);    }    public void setCharset(final String charset) {        this.charset = charset;    }    @Override    public String format(final LoggingEvent event) {        String message = super.format(event);        if (this.charset != null) {            try {                message = new String(message.getBytes(this.charset));            } catch (UnsupportedEncodingException e) {            }        }        return message;    }}  Log4j の設定  log4j.properties に下記の様な感じで設定する。log4j.xml にする場合はこの内容に準じて XML に書き直せば良い。  Facility は syslog のカテゴリに相当するもので、デフォルトでは user、uucp などが規定されている。  システムにもよるけれど、専用の Facility を用意した方が分かり易いと個人的には思う。  前述の通り、Debian Etch の場合、charset は EUC-JP を指定する(と大抵は上手くいくと思う)。  ConversionPattern は通常と少し違い、時刻と改行コードを省略している。  時刻は syslogd が自動的に付加してくれるのと、改行コードはプラットフォーム毎に異なるのでメッセージには付加しないようにしている。  メッセージに改行コードが付いていなくても、syslogd が付加してくれる様なので特に問題はない(はず)。  log4j.appender.syslog=org.apache.log4j.net.SyslogAppenderlog4j.appender.syslog.Facility=[facility]log4j.appender.syslog.SyslogHost=[syslog server]log4j.appender.syslog.layout=jp.in_vitro.samplecode.CharsetSupportPatternLayoutlog4j.appender.syslog.layout.charset=[syslog server default character encoding]log4j.appender.syslog.layout.ConversionPattern=%5p %c{1} - %m  実験  下記の様なテストコードを Windows XP 上で実行してみた。  面倒なので facility は uucp を間借りした。  Logger log = Logger.getLogger(CharsetSupportPatternLayoutTest.class);log.fatal("Oh, my god!!");log.error("緊急事態");log.warn("気をつけて");log.info("お知らせ");log.debug("デバッグ");    リモートの Debian Etch では以下の様なログが出力された。  # tail -f /var/log/uucp.logMay 26 16:14:03 192.168.1.101 FATAL Hoge - Oh, my god!!May 26 16:14:03 192.168.1.101 ERROR Hoge - 緊急事態May 26 16:14:03 192.168.1.101  WARN Hoge - 気をつけてMay 26 16:14:03 192.168.1.101  INFO Hoge - お知らせMay 26 16:14:04 192.168.1.101 DEBUG Hoge - デバッグ    というわけで、実験成功。  但し、何故か変な化け方をする文字が結構ある。  メッセージの 'る' が 'た' に変わってしまうといった感じ。  後で原因を調査しないと・・・。]]></description>
		<dc:subject>Library</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-24T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Debian Etch の syslog にリモートから Log4j を使用してログを出力する方法をメモ。
</p>
<h4>syslogd の設定</h4>
<p>
  Debian Etch では、デフォルト状態の syslogd はリモートからのログを受け付けない設定になっている。
  そのため、syslogd の設定を変更して syslogd をリブートする必要がある。
  設定は /etc/default/syslogd で行う。
  <blockquote>
<pre>
# diff /etc/default/syslogd.original /etc/default/syslogd
13c13
< SYSLOGD=""
---
> SYSLOGD="-r"
# /etc/init.d/sysklogd restart
#
</pre>
  </blockquote>
  設定が正常に反映されたか確認するために、syslog のポートが開いているかチェックする。
  <blockquote>
<pre>
# netstat -an | grep -i udp | grep 514
udp        0      0 0.0.0.0:514             0.0.0.0:*
#
</pre>
  </blockquote>
  UDP の 514 が開いていたら設定は成功。
</p>
<h4>Log4j の設定</h4>
<p>
  Log4j にはデフォルトで syslog にログを出力してくれる org.apache.log4j.net.SyslogAppender が用意されている。
  しかし、残念なことに org.apache.log4j.PatternLayout が文字エンコーディングの変換機能を持っていないので、マルチバイト文字をメッセージに使用するとログが文字化けしてしまう。
  そのため、PatternLayout を拡張して文字エンコーディングを変換する機能を持った Layout クラスを自作する必要がある。
  Debian Etch の場合は(インストール時の設定にもよるけれど)、通常デフォルトの文字エンコーディングは EUC-JP になっていると思うので、EUC-JP に変換できればマルチバイト文字をログに出力できる。
</p>
<h5>文字エンコーディング変換機能付き PatternLayout</h5>
<p>
  PatternLayout の拡張は非常に簡単。
  単純に文字エンコーディングを設定内容からインジェクションしてもらい、PatternLayout でメッセージをフォーマットした後に変換処理をするだけ。
  <blockquote>
<pre>
package jp.in_vitro.samplecode;

import java.io.UnsupportedEncodingException;

import org.apache.log4j.PatternLayout;
import org.apache.log4j.spi.LoggingEvent;

/**
 * メッセージのフォーマット後に文字エンコーディング変換を行う {@link PatternLayout}。
 */
public class CharsetSupportPatternLayout extends PatternLayout {

    /** メッセージをフォーマット後に変換する文字エンコーディング。 */
    private String charset;

    public CharsetSupportPatternLayout() {
        super();
    }

    public CharsetSupportPatternLayout(final String pattern) {
        super(pattern);
    }

    public void setCharset(final String charset) {
        this.charset = charset;
    }

    @Override
    public String format(final LoggingEvent event) {
        String message = super.format(event);
        if (this.charset != null) {
            try {
                message = new String(message.getBytes(this.charset));
            } catch (UnsupportedEncodingException e) {
            }
        }
        return message;
    }
}
</pre>
  </blockquote>
</p>
<h5>Log4j の設定</h5>
<p>
  log4j.properties に下記の様な感じで設定する。log4j.xml にする場合はこの内容に準じて XML に書き直せば良い。
  Facility は syslog のカテゴリに相当するもので、デフォルトでは user、uucp などが規定されている。
  システムにもよるけれど、専用の Facility を用意した方が分かり易いと個人的には思う。
  前述の通り、Debian Etch の場合、charset は EUC-JP を指定する(と大抵は上手くいくと思う)。
  ConversionPattern は通常と少し違い、時刻と改行コードを省略している。
  時刻は syslogd が自動的に付加してくれるのと、改行コードはプラットフォーム毎に異なるのでメッセージには付加しないようにしている。
  メッセージに改行コードが付いていなくても、syslogd が付加してくれる様なので特に問題はない(はず)。
  <blockquote>
<pre>
log4j.appender.syslog=org.apache.log4j.net.SyslogAppender
log4j.appender.syslog.Facility=[facility]
log4j.appender.syslog.SyslogHost=[syslog server]
log4j.appender.syslog.layout=jp.in_vitro.samplecode.CharsetSupportPatternLayout
log4j.appender.syslog.layout.charset=[syslog server default character encoding]
log4j.appender.syslog.layout.ConversionPattern=%5p %c{1} - %m
</pre>
  </blockquote>
</p>
<h5>実験</h5>
<p>
  下記の様なテストコードを Windows XP 上で実行してみた。
  面倒なので facility は uucp を間借りした。
  <blockquote>
<pre>
Logger log = Logger.getLogger(CharsetSupportPatternLayoutTest.class);
log.fatal("Oh, my god!!");
log.error("緊急事態");
log.warn("気をつけて");
log.info("お知らせ");
log.debug("デバッグ");</pre>
</pre>
  </blockquote>
  リモートの Debian Etch では以下の様なログが出力された。
  <blockquote>
<pre>
# tail -f /var/log/uucp.log
May 26 16:14:03 192.168.1.101 FATAL Hoge - Oh, my god!!
May 26 16:14:03 192.168.1.101 ERROR Hoge - 緊急事態
May 26 16:14:03 192.168.1.101  WARN Hoge - 気をつけて
May 26 16:14:03 192.168.1.101  INFO Hoge - お知らせ
May 26 16:14:04 192.168.1.101 DEBUG Hoge - デバッグ
</pre>
  </blockquote>
  というわけで、実験成功。
  但し、何故か変な化け方をする文字が結構ある。
  メッセージの 'る' が 'た' に変わってしまうといった感じ。
  後で原因を調査しないと・・・。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070524_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070523_01.htm">
		<title><![CDATA[Subversion Web UI のデザインをカスタマイズする]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070523_01.htm</link>
		<description><![CDATA[  Apache2 + Subversion で運用している場合、Subversion の Web UI を簡単にカスタマイズできる。  Debian Etch での方法をメモ。svnindex.xsl、svnindex.css のコピー  /var/www/apache2-default/ に svnindex.xsl と svnindex.css が設置されているので、  この 2 つのファイルを Apache2 が参照可能な位置にコピー(DocumentRoot 直下など)。/etc/apache2/mods-available/dav_svn.conf の編集  dav_svn.conf に SVNIndexXSLT を指定する。パスは DocumentRoot からの相対パスを指定。  &lt;Location /svn&gt;  ...SNIP...  # Web UI Design  SVNIndexXSLT /svnindex.xsl  ...SNIP...&lt;/Location&gt;  svnindex.xsl、svnindex.css の編集  後はお好みで svnindex.xsl、svnindex.css を編集する。  デフォルト状態に多少手を入れたものが こちら。  興味のある方はお持ちください。]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-23T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Apache2 + Subversion で運用している場合、Subversion の Web UI を簡単にカスタマイズできる。
  Debian Etch での方法をメモ。
</p>
<h4>svnindex.xsl、svnindex.css のコピー</h4>
<p>
  /var/www/apache2-default/ に svnindex.xsl と svnindex.css が設置されているので、
  この 2 つのファイルを Apache2 が参照可能な位置にコピー(DocumentRoot 直下など)。
</p>
<h4>/etc/apache2/mods-available/dav_svn.conf の編集</h4>
<p>
  dav_svn.conf に SVNIndexXSLT を指定する。パスは DocumentRoot からの相対パスを指定。
  <blockquote>
<pre>
&lt;Location /svn&gt;

  ...SNIP...

  # Web UI Design
  SVNIndexXSLT /svnindex.xsl

  ...SNIP...

&lt;/Location&gt;
</pre>
  </blockquote>
</p>
<h4>svnindex.xsl、svnindex.css の編集</h4>
<p>
  後はお好みで svnindex.xsl、svnindex.css を編集する。
  デフォルト状態に多少手を入れたものが <a href="/blog/entries/Misc/20070523_01/svn_web_ui_design.zip"><img src="/blog/attach.png" style="border:none;"/>こちら</a>。
  興味のある方はお持ちください。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070523_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070522_01.htm">
		<title><![CDATA[packaging の際にソースコードの jar も生成する。]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070522_01.htm</link>
		<description><![CDATA[  Maven2 で "mvn package" する際に同時にソースコード及びリソースを jar でアーカイビングする方法をメモ。  納品の際に便利。pom.xml の設定  maven-source-plugin を使用するだけなので、設定は非常に簡単。  ただ、maven-source-plugin のソースコードを見ると、pom.xml に登録するだけで package phase になると自動的に実行される設定になっているのだが、  実際に動作させてみると何故か動かない。仕方がないので、executions を指定して実行するようにした。環境の問題だろうか?? バグだろうか??  &lt;project&gt;    ...SNIP...  &lt;build&gt;    &lt;plugin&gt;      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;      &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;      &lt;executions&gt;        &lt;phase&gt;package&lt;/phase&gt;        &lt;execution&gt;          &lt;goals&gt;            &lt;goal&gt;jar&lt;/goal&gt;          &lt;/goals&gt;        &lt;/execution&gt;      &lt;/executions&gt;    &lt;/plugin&gt;  &lt;/build&gt;    ...SNIP...&lt;/project&gt;  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-22T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Maven2 で "mvn package" する際に同時にソースコード及びリソースを jar でアーカイビングする方法をメモ。
  納品の際に便利。
</p>
<h4>pom.xml の設定</h4>
<p>
  maven-source-plugin を使用するだけなので、設定は非常に簡単。
  ただ、maven-source-plugin のソースコードを見ると、pom.xml に登録するだけで package phase になると自動的に実行される設定になっているのだが、
  実際に動作させてみると何故か動かない。仕方がないので、executions を指定して実行するようにした。環境の問題だろうか?? バグだろうか??
  <blockquote>
<pre>
&lt;project&gt;

    ...SNIP...

  &lt;build&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
        &lt;phase&gt;package&lt;/phase&gt;
        &lt;execution&gt;
          &lt;goals&gt;
            &lt;goal&gt;jar&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
    &lt;/plugin&gt;
  &lt;/build&gt;

    ...SNIP...

&lt;/project&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070522_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Library/20070521_01.htm">
		<title><![CDATA[Mock ライブラリを調査]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Library/20070521_01.htm</link>
		<description><![CDATA[  Java で利用できる Mock ライブラリを調べてみた。  昔使用していた MockObjects は  いつの間にか開発が停止して現在ではダウンロード出来なくなっているようだ。Mock ライブラリEasyMock  現時点で一番情報が多そうなのが EasyMock か。  多少慣れるのに時間がかかりそうだが、結構使い出はありそう。  jMock とどちらを選択するかは好みの問題になるだろうか。      EasyMock    http://www.easymock.org/    EasyMock 2.2 Readme    http://www.easymock.org/EasyMock2_2_Documentation.html    EasyMock 2 License (MIT License)    http://www.easymock.org/License.html  jMock  EasyMock とどちらを選択するか悩むところ。  とりあえず両方試してみて自分に合う方を選択するということになりそう。      jMock    http://www.jmock.org/index.html    Getting Started    http://www.jmock.org/getting-started.html    jMock Project License    http://www.jmock.org/license.html  RMock      RMock testing framework     http://rmock.sourceforge.net/    The RMock 2.0.0 user guide    http://rmock.sourceforge.net/documentation/xdoc.html    Project License (Apache License Version 2.0)    http://rmock.sourceforge.net/documentation/license.html  mocquer      mocquer    https://mocquer.dev.java.net/    CPL    http://www.opensource.org/licenses/cpl1.0.php  ]]></description>
		<dc:subject>Library</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-21T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Java で利用できる Mock ライブラリを調べてみた。
  <a href="http://www.in-vitro.jp/blog/index.cgi/Library/20060326_01.htm">昔使用していた MockObjects</a> は
  いつの間にか開発が停止して現在ではダウンロード出来なくなっているようだ。
</p>
<h4>Mock ライブラリ</h4>
<h5>EasyMock</h5>
<p>
  現時点で一番情報が多そうなのが EasyMock か。
  多少慣れるのに時間がかかりそうだが、結構使い出はありそう。
  jMock とどちらを選択するかは好みの問題になるだろうか。
  <dl>
    <dt>EasyMock</dt>
    <dd><a href="http://www.easymock.org/">http://www.easymock.org/</a></dd>
    <dt>EasyMock 2.2 Readme</dt>
    <dd><a href="http://www.easymock.org/EasyMock2_2_Documentation.html">http://www.easymock.org/EasyMock2_2_Documentation.html</a></dd>
    <dt>EasyMock 2 License (MIT License)</dt>
    <dd><a href="http://www.easymock.org/License.html">http://www.easymock.org/License.html</a></dd>
  </dl>
</p>
<h5>jMock</h5>
<p>
  EasyMock とどちらを選択するか悩むところ。
  とりあえず両方試してみて自分に合う方を選択するということになりそう。
  <dl>
    <dt>jMock</dt>
    <dd><a href="http://www.jmock.org/index.html">http://www.jmock.org/index.html</a></dd>
    <dt>Getting Started</dt>
    <dd><a href="http://www.jmock.org/getting-started.html">http://www.jmock.org/getting-started.html</a></dd>
    <dt>jMock Project License</dt>
    <dd><a href="http://www.jmock.org/license.html">http://www.jmock.org/license.html</a></dd>
  </dl>
</p>
<h5>RMock</h5>
<p>
  <dl>
    <dt>RMock testing framework </dt>
    <dd><a href="http://rmock.sourceforge.net/">http://rmock.sourceforge.net/</a></dd>
    <dt>The RMock 2.0.0 user guide</dt>
    <dd><a href="http://rmock.sourceforge.net/documentation/xdoc.html">http://rmock.sourceforge.net/documentation/xdoc.html</a></dd>
    <dt>Project License (Apache License Version 2.0)</dt>
    <dd><a href="http://rmock.sourceforge.net/documentation/license.html">http://rmock.sourceforge.net/documentation/license.html</a></dd>
  </dl>
</p>
<h5>mocquer</h5>
<p>
  <dl>
    <dt>mocquer</dt>
    <dd><a href="https://mocquer.dev.java.net/">https://mocquer.dev.java.net/</a></dd>
    <dt>CPL</dt>
    <dd><a href="http://www.opensource.org/licenses/cpl1.0.php">http://www.opensource.org/licenses/cpl1.0.php</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Library/20070521_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070520_01.htm">
		<title><![CDATA[GUI プログラミングで使用できるフリーのアイコン集]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070520_01.htm</link>
		<description><![CDATA[  GUI プログラミングをすると、いつもアイコンをどうするかで困ってしまう。  大抵は簡単なものを自作するのだが、時間がかかって仕方がない。  というわけで、フリーで使用できる GUI 用のアイコン集を探してみた。      Icon Collection    http://sourceforge.net/projects/icon-collection/    Ximian Open-Officeのアイコン    http://www.novell.com/coolsolutions/nnlsmag/assets/ooo-stock.zip    Gnomeのアイコン:    http://art.gnome.org/themes/icon/    SVG BlueSphereのアイコンとテーマ:    http://svgicons.sourceforge.net/    KDEのアイコン:          http://www.buzzard.me.uk/jonathan/kde-icons.html      http://www.kde-look.org/        Iconize Textlinks with CSS    http://www.pooliestudios.com/projects/iconize/    Drunkey Love    http://www.el73.be/drunkey-love/downloads/    Eclipse Icons    http://codehaus.org/~bwalding/eclipse-icons/    Sanscons    http://somerandomdude.net/srd-projects/clearbits  情報源  上記のアイコン集は下記のサイトから GUI に使用できそうなものをチョイスした。  下記のサイトを公開してくださっている方に感謝。      Java GUIプログラミングの、とてもBasicなFAQ    http://homepage1.nifty.com/algafield/JavaGUIFaq19j.html    POP*POP的アイコン配布サイトまとめ    http://www.popxpop.com/archives/2006/12/post_48.html  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-20T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  GUI プログラミングをすると、いつもアイコンをどうするかで困ってしまう。
  大抵は簡単なものを自作するのだが、時間がかかって仕方がない。
  というわけで、フリーで使用できる GUI 用のアイコン集を探してみた。
</p>
<p>
  <dl>
    <dt>Icon Collection</dt>
    <dd><a href="http://sourceforge.net/projects/icon-collection/">http://sourceforge.net/projects/icon-collection/</a></dd>
    <dt>Ximian Open-Officeのアイコン</dt>
    <dd><a href="http://www.novell.com/coolsolutions/nnlsmag/assets/ooo-stock.zip">http://www.novell.com/coolsolutions/nnlsmag/assets/ooo-stock.zip</a></dd>
    <dt>Gnomeのアイコン:</dt>
    <dd><a href="http://art.gnome.org/themes/icon/">http://art.gnome.org/themes/icon/</a></dd>
    <dt>SVG BlueSphereのアイコンとテーマ:</dt>
    <dd><a href="http://svgicons.sourceforge.net/">http://svgicons.sourceforge.net/</a></dd>
    <dt>KDEのアイコン:</dt>
    <dd>
      <a href="http://www.buzzard.me.uk/jonathan/kde-icons.html">http://www.buzzard.me.uk/jonathan/kde-icons.html</a><br>
      <a href="http://www.kde-look.org/">http://www.kde-look.org/</a>
    </dd>
    <dt>Iconize Textlinks with CSS</dt>
    <dd><a href="http://www.pooliestudios.com/projects/iconize/">http://www.pooliestudios.com/projects/iconize/</a></dd>
    <dt>Drunkey Love</dt>
    <dd><a href="http://www.el73.be/drunkey-love/downloads/">http://www.el73.be/drunkey-love/downloads/</a></dd>
    <dt>Eclipse Icons</dt>
    <dd><a href="http://codehaus.org/~bwalding/eclipse-icons/">http://codehaus.org/~bwalding/eclipse-icons/</a></dd>
    <dt>Sanscons</dt>
    <dd><a href="http://somerandomdude.net/srd-projects/clearbits">http://somerandomdude.net/srd-projects/clearbits</a></dd>
  </dl>
</p>
<h5>情報源</h5>
<p>
  上記のアイコン集は下記のサイトから GUI に使用できそうなものをチョイスした。
  下記のサイトを公開してくださっている方に感謝。
  <dl>
    <dt>Java GUIプログラミングの、とてもBasicなFAQ</dt>
    <dd><a href="http://homepage1.nifty.com/algafield/JavaGUIFaq19j.html">http://homepage1.nifty.com/algafield/JavaGUIFaq19j.html</a></dd>
    <dt>POP*POP的アイコン配布サイトまとめ</dt>
    <dd><a href="http://www.popxpop.com/archives/2006/12/post_48.html">http://www.popxpop.com/archives/2006/12/post_48.html</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070520_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070518_01.htm">
		<title><![CDATA[Maven2 Cobertura plugin でカバレッジにチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070518_01.htm</link>
		<description><![CDATA[Cobertura とは  Cobertura は、Java 用のカバレッジツール。類似のものに Clover、EMMA、jcoverage などがある。  けれど、Clover は商用利用はライセンス購入が必要、EMMA は Maven2 用のプラグインが無い、JCoverage はいつの間にか Eclipse Plugin 専用になっている、ということで現状 Maven2 で気楽にカバレッジツールを使用する場合は Cobertura しか選択肢が無い。  というわけで、Cobertura を使用してカバレッジレポートを作成してみた。      Cobertura    http://cobertura.sourceforge.net/  pom.xml の設定  Cobertura の設定は build で instrument して、report で結果を出力するようにすれば良い。  pom.xml に下記の様な設定をして、"mvn site" で簡単にカバレッジレポートを見ることができる。  &lt;project&gt;    ...SNIP...  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;        &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;        &lt;executions&gt;          &lt;phase&gt;pre-site&lt;/phase&gt;          &lt;execution&gt;            &lt;goals&gt;              &lt;goal&gt;clean&lt;/goal&gt;              &lt;goal&gt;check&lt;/goal&gt;            &lt;/goals&gt;          &lt;/execution&gt;        &lt;/executions&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;    ...SNIP...  &lt;reporting&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;        &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/reporting&gt;&lt;/project&gt;  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-18T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Cobertura とは</h4>
<p>
  Cobertura は、Java 用のカバレッジツール。類似のものに <a href="http://www.cenqua.com/clover/">Clover</a>、<a href="http://emma.sourceforge.net/">EMMA</a>、<a href="http://www.jcoverage.com/">jcoverage</a> などがある。
  けれど、Clover は商用利用はライセンス購入が必要、EMMA は Maven2 用のプラグインが無い、JCoverage はいつの間にか Eclipse Plugin 専用になっている、ということで現状 Maven2 で気楽にカバレッジツールを使用する場合は Cobertura しか選択肢が無い。
  というわけで、Cobertura を使用してカバレッジレポートを作成してみた。
  <dl>
    <dt>Cobertura</dt>
    <dd><a href="http://cobertura.sourceforge.net/">http://cobertura.sourceforge.net/</a></dd>
  </dl>
</p>
<h5>pom.xml の設定</h5>
<p>
  Cobertura の設定は build で instrument して、report で結果を出力するようにすれば良い。
  pom.xml に下記の様な設定をして、"mvn site" で簡単にカバレッジレポートを見ることができる。
  <blockquote>
<pre>
&lt;project&gt;

    ...SNIP...

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
        &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;
        &lt;executions&gt;
          &lt;phase&gt;pre-site&lt;/phase&gt;
          &lt;execution&gt;
            &lt;goals&gt;
              &lt;goal&gt;clean&lt;/goal&gt;
              &lt;goal&gt;check&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

    ...SNIP...

  &lt;reporting&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
        &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/reporting&gt;

&lt;/project&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070518_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Trac/20070517_01.htm">
		<title><![CDATA[Mylar で Eclipse + Trac Ticket 連携にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Trac/20070517_01.htm</link>
		<description><![CDATA[Mylar とは  Eclipse Mylar Project によると、Mylar とは      Eclipse Mylar is a task-focused UI that reduces information overload and makes multi-tasking easy.    というものだそうだ。要するに、Eclipse 上で Eclipse UI に従ってタスク管理をすることができるというプラグインのこと。  面白いのは、Trac 用の Mylar Connector が用意されていて、Trac 側で XML-RPC プラグインを用意しておくと Mylar で Trac のチケットを管理できるようになるということ。  Trac はチケットの上手な活用が肝になるので、Eclipse と連携できると便利。  ということで、早速試してみた。      Eclipse Mylar    http://www.eclipse.org/mylar/    Trac XML-RPC プラグイン    http://trac-hacks.org/wiki/XmlRpcPlugin  Trac XML-RPC プラグインのインストール  これは、上記の Trac XML-RPC プラグインのページに従ってインストール作業をすれば OK。Eclipse Mylar のインストール  Eclipse 3.3M7 で Mylar のインストールを試してみた。  Mylar は Callisto の後継となる Europa に含まれているので、インストールは非常に簡単。  Subversion にも Mylar 用プラグインがあったので、ついでにインストールしておいたが、  何の役に立っているのか良くわかっていない(^^; まぁ、大は小を兼ねるということで。       Mylar は Europa でインストールできるので、Software Updates の機能を使用する。       "Search for new features to install" を選択して次へ。       今回は Mylar 関連のプラグインとして Europa に登録されている Mylar プラグインと Subclipseに含まれている Mylar プラグインをインストールするので、Europa と Subclipse にチェックして次へ。       Mylar 関連のプラグインをチェックして次へ。図では全て選択してあるが、Connector は必要なものだけで良い。例えば、Trac にしか接続しないのであれば、Trac Connector だけ選択しておけば良い。       後はお決まりのライセンス確認。次へ。       インストールされるプラグインを確認。次へ。       インストールの最終確認。次へ。       Eclipse リブートの確認。次へ。  Eclipse Mylar の設定  Eclipse Mylar プラグインのインストールが終了して、Eclipse の再起動が終わったら Mylar の設定を行う。         Eclipse のリブートが完了すると、Mylar の設定画面が表示される。特に変更すべき内容も無かったのでデフォルトの設定のまま次へ(変更したい方はどうぞ)。       "Task List" View を右クリックして "New" を選択すると、"Query..." が表示されるのでこれを選択。       デフォルトではタスクリポジトリに "Eclipse.org" しか登録されていないので、自分の Trac を登録する。"Add Task Repository" を選択。       Server に Trac の URL を入力。Label は任意の文字列で良い。後は、認証が必要であれば認証情報を入力。Trac の場合、Access Type は XML-RPC にする。一通り入力が終わったら、"Validate Settings" を押して一度タスクリポジトリに接続してみる。エラーが出なければ設定完了。       今追加したタスクリポジトリを選択して次へ。       クエリの内容を入力する。今回は全てのチケットを表示する様にしておくため何も設定を行わずに次へ。       "Task List" にチケットが表示されたら設定完了。後は、ここからチケットの起票や更新が可能となる。便利。  ]]></description>
		<dc:subject>Trac</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-17T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Mylar とは</h4>
<p>
  Eclipse Mylar Project によると、Mylar とは
  <blockquote>
    Eclipse Mylar is a task-focused UI that reduces information overload and makes multi-tasking easy.
  </blockquote>
  というものだそうだ。要するに、Eclipse 上で Eclipse UI に従ってタスク管理をすることができるというプラグインのこと。
  面白いのは、Trac 用の Mylar Connector が用意されていて、Trac 側で XML-RPC プラグインを用意しておくと Mylar で Trac のチケットを管理できるようになるということ。
  Trac はチケットの上手な活用が肝になるので、Eclipse と連携できると便利。
  ということで、早速試してみた。
  <dl>
    <dt>Eclipse Mylar</dt>
    <dd><a href="http://www.eclipse.org/mylar/">http://www.eclipse.org/mylar/</a></dd>
    <dt>Trac XML-RPC プラグイン</dt>
    <dd><a href="http://trac-hacks.org/wiki/XmlRpcPlugin">http://trac-hacks.org/wiki/XmlRpcPlugin</a></dd>
  </dl>
</p>
<h5>Trac XML-RPC プラグインのインストール</h5>
<p>
  これは、上記の Trac XML-RPC プラグインのページに従ってインストール作業をすれば OK。
</p>
<h5>Eclipse Mylar のインストール</h5>
<p>
  Eclipse 3.3M7 で Mylar のインストールを試してみた。
  Mylar は Callisto の後継となる Europa に含まれているので、インストールは非常に簡単。
  Subversion にも Mylar 用プラグインがあったので、ついでにインストールしておいたが、
  何の役に立っているのか良くわかっていない(^^; まぁ、大は小を兼ねるということで。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_001.jpg" title="Mylar インストール(1)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_001.jpg" alt="[Mylar インストール(1)]" width="600"/></a><br>
  Mylar は Europa でインストールできるので、Software Updates の機能を使用する。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_002.jpg" title="Mylar インストール(2)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_002.jpg" alt="[Mylar インストール(2)]" width="500"/></a><br>
  "Search for new features to install" を選択して次へ。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_003.jpg" title="Mylar インストール(3)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_003.jpg" alt="[Mylar インストール(3)]" width="500"/></a><br>
  今回は Mylar 関連のプラグインとして Europa に登録されている Mylar プラグインと Subclipseに含まれている Mylar プラグインをインストールするので、Europa と Subclipse にチェックして次へ。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_004.jpg" title="Mylar インストール(4)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_004.jpg" alt="[Mylar インストール(4)]" width="600"/></a><br>
  Mylar 関連のプラグインをチェックして次へ。図では全て選択してあるが、Connector は必要なものだけで良い。例えば、Trac にしか接続しないのであれば、Trac Connector だけ選択しておけば良い。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_005.jpg" title="Mylar インストール(5)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_005.jpg" alt="[Mylar インストール(5)]" width="500"/></a><br>
  後はお決まりのライセンス確認。次へ。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_006.jpg" title="Mylar インストール(6)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_006.jpg" alt="[Mylar インストール(6)]" width="500"/></a><br>
  インストールされるプラグインを確認。次へ。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_007.jpg" title="Mylar インストール(7)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_007.jpg" alt="[Mylar インストール(7)]" width="500"/></a><br>
  インストールの最終確認。次へ。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_008.jpg" title="Mylar インストール(8)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_008.jpg" alt="[Mylar インストール(8)]" width="400"/></a><br>
  Eclipse リブートの確認。次へ。<br>
  <br>
</p>
<h5>Eclipse Mylar の設定</h5>
<p>
  Eclipse Mylar プラグインのインストールが終了して、Eclipse の再起動が終わったら Mylar の設定を行う。
  <br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_009.jpg" title="Mylar 設定(1)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_009.jpg" alt="[Mylar 設定(1)]" width="450"/></a><br>
  Eclipse のリブートが完了すると、Mylar の設定画面が表示される。特に変更すべき内容も無かったのでデフォルトの設定のまま次へ(変更したい方はどうぞ)。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_010.jpg" title="Mylar 設定(2)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_010.jpg" alt="[Mylar 設定(2)]" width="600"/></a><br>
  "Task List" View を右クリックして "New" を選択すると、"Query..." が表示されるのでこれを選択。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_011.jpg" title="Mylar 設定(3)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_011.jpg" alt="[Mylar 設定(3)]" width="450"/></a><br>
  デフォルトではタスクリポジトリに "Eclipse.org" しか登録されていないので、自分の Trac を登録する。"Add Task Repository" を選択。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_012.jpg" title="Mylar 設定(4)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_012.jpg" alt="[Mylar 設定(4)]" width="500"/></a><br>
  Server に Trac の URL を入力。Label は任意の文字列で良い。後は、認証が必要であれば認証情報を入力。Trac の場合、Access Type は XML-RPC にする。一通り入力が終わったら、"Validate Settings" を押して一度タスクリポジトリに接続してみる。エラーが出なければ設定完了。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_013.jpg" title="Mylar 設定(5)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_013.jpg" alt="[Mylar 設定(5)]" width="450"/></a><br>
  今追加したタスクリポジトリを選択して次へ。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_014.jpg" title="Mylar 設定(6)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_014.jpg" alt="[Mylar 設定(6)]" width="450"/></a><br>
  クエリの内容を入力する。今回は全てのチケットを表示する様にしておくため何も設定を行わずに次へ。<br>
  <br>
   <a href="/blog/entries/Trac/20070517_01/mylar_015.jpg" title="Mylar 設定(7)" rel="imagebox"><img src="/blog/entries/Trac/20070517_01/mylar_015.jpg" alt="[Mylar 設定(7)]" width="600"/></a><br>
  "Task List" にチケットが表示されたら設定完了。後は、ここからチケットの起票や更新が可能となる。便利。<br>
  <br>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070517_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070516_01.htm">
		<title><![CDATA[Maven2 で POM の inheritance &amp; aggregation を整理してみる(4)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070516_01.htm</link>
		<description><![CDATA[まとめ  結局、Maven2 の Inheritance と Aggregation は上手く使いわけると結構便利だと再認識できた。  Maven2 の POM を階層化して管理する場合は下記の図の様になるだろうか。     ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-16T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>まとめ</h4>
<p>
  結局、Maven2 の Inheritance と Aggregation は上手く使いわけると結構便利だと再認識できた。
  Maven2 の POM を階層化して管理する場合は下記の図の様になるだろうか。<br>
  <br>
   <a href="/blog/entries/Maven/20070516_01/Maven2_inheritance_vs_aggregation.png" title="Inheritance と Aggregation の使い分け" rel="imagebox"><img src="/blog/entries/Maven/20070516_01/Maven2_inheritance_vs_aggregation.png" alt="[Inheritance と Aggregation の使い分け]" width="700"/></a>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070516_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070514_01.htm">
		<title><![CDATA[Maven2 で POM の inheritance &amp; aggregation を整理してみる(3)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070514_01.htm</link>
		<description><![CDATA[inheritance &amp; aggregation の実験  inheritance &amp; aggregation 用のサンプルプロジェクトは下記の様な構成。  基本的には前回 2 つと全く同じ。  \both\pom.xml は packageing=pom で aggregation を使用できるようにしてある。  \both\child\pom.xml は継承を表す parent タグを使用して \both\pom.xml を継承してある。  \both　　├pom.xml　　└child　　　　├pom.xml　　　　└src　　　　　　└java　　　　　　　　└com　　　　　　　　　└example　　　　　　　　　　　└HelloWorld.java  \both\pom.xml  artifactId、name 以外は aggregation のサンプルと全く同一。  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;project&gt;  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;  &lt;name&gt;pom both sample&lt;/name&gt;  &lt;groupId&gt;com.example&lt;/groupId&gt;  &lt;artifactId&gt;pom-both-sample&lt;/artifactId&gt;  &lt;version&gt;1.0.0&lt;/version&gt;  &lt;packaging&gt;pom&lt;/packaging&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;        &lt;version&gt;2.0.0&lt;/version&gt;        &lt;executions&gt;          &lt;execution&gt;            &lt;phase&gt;compile&lt;/phase&gt;            &lt;goals&gt;              &lt;goal&gt;dumpPom&lt;/goal&gt;            &lt;/goals&gt;          &lt;/execution&gt;        &lt;/executions&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;  &lt;reporting&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;        &lt;configuration&gt;          &lt;charset&gt;Shift_JIS&lt;/charset&gt;        &lt;/configuration&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/reporting&gt;  &lt;organization&gt;    &lt;name&gt;example.com&lt;/name&gt;    &lt;url&gt;http://www.example.com/&lt;/url&gt;  &lt;/organization&gt;  &lt;developers&gt;    &lt;developer&gt;      &lt;id&gt;me&lt;/id&gt;      &lt;name&gt;me&lt;/name&gt;    &lt;/developer&gt;  &lt;/developers&gt;  &lt;issueManagement&gt;    &lt;system&gt;Bugzilla&lt;/system&gt;    &lt;url&gt;http://www.example.com/bugzilla&lt;/url&gt;  &lt;/issueManagement&gt;  &lt;ciManagement&gt;    &lt;system&gt;continuum&lt;/system&gt;    &lt;url&gt;http://www.example.com/continuum&lt;/url&gt;  &lt;/ciManagement&gt;  &lt;mailingLists&gt;    &lt;mailingList&gt;      &lt;name&gt;Developer ML&lt;/name&gt;      &lt;subscribe&gt;subscribe@example.com&lt;/subscribe&gt;      &lt;unsubscribe&gt;unsubscribe@example.com&lt;/unsubscribe&gt;      &lt;post&gt;developer@example.com&lt;/post&gt;    &lt;/mailingList&gt;  &lt;/mailingLists&gt;  &lt;scm&gt;    &lt;connection&gt;scm:svn:http://www.example.com/svn/my-project&lt;/connection&gt;    &lt;developerConnection&gt;scm:svn:https://127.0.0.1/svn/my-project&lt;/developerConnection&gt;    &lt;tag&gt;HEAD&lt;/tag&gt;    &lt;url&gt;http://www.example.com/websvn/my-project&lt;/url&gt;  &lt;/scm&gt;  &lt;repositories&gt;    &lt;repository&gt;      &lt;id&gt;repository.example.com&lt;/id&gt;      &lt;name&gt;example.com repository&lt;/name&gt;      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;    &lt;/repository&gt;  &lt;/repositories&gt;    &lt;distributionManagement&gt;    &lt;repository&gt;      &lt;id&gt;repository.example.com&lt;/id&gt;      &lt;name&gt;example.com repository&lt;/name&gt;      &lt;url&gt;scp://www.example.com/maven2&lt;/url&gt;    &lt;/repository&gt;  &lt;/distributionManagement&gt;    &lt;modules&gt;    &lt;module&gt;child&lt;/module&gt;  &lt;/modules&gt;&lt;/project&gt;  \both\child\pom.xml  artifactId、name 以外は inheritance のサンプルと全く同一。  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;project&gt;  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;  &lt;parent&gt;    &lt;groupId&gt;com.example&lt;/groupId&gt;    &lt;artifactId&gt;pom-both-sample&lt;/artifactId&gt;    &lt;version&gt;1.0.0&lt;/version&gt;  &lt;/parent&gt;  &lt;artifactId&gt;pom-both-sample-child&lt;/artifactId&gt;  &lt;name&gt;pom both sample - child&lt;/name&gt;  &lt;packaging&gt;jar&lt;/packaging&gt;&lt;/project&gt;  \both で Maven2 による compile を実行した結果  aggregation を使用しているので、\both\pom.xml を使用してコンパイルを実行すると \both\child\pom.xml も同時に処理されている。  また、inheritance も使用しているので、\both\pom.xml の設定項目が \both\child\pom.xml に継承されている。  both&gt;mvn compile[INFO] Scanning for projects...[INFO] Reactor build order:[INFO]   pom both sample[INFO]   pom both sample - child[INFO] ----------------------------------------------------------------------------[INFO] Building pom both sample[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-both-sample:pom:1.0.0  groupId : com.example  atrifactId : pom-both-sample  version : 1.0.0  name : pom both sample***********************************************************Parent : nullFile : D:\both\pom.xmlBasedir : D:\bothRepositories : [org.apache.maven.model.Repository@13059051[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@3945515[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@8530b8],]Modules : [child,]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]ReportPlugins : [org.apache.maven.model.ReportPlugin@1deeb40,]Developers : [org.apache.maven.model.Developer@30633470[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@25109548[name=example.com,url=http://www.example.com/][INFO] ----------------------------------------------------------------------------[INFO] Building pom both sample - child[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [resources:resources][INFO] Using default encoding to copy filtered resources.[INFO] [compiler:compile][INFO] Compiling 1 source file to D:\both\child\target\classes[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-both-sample-child:jar:1.0.0  groupId : com.example  atrifactId : pom-both-sample-child  version : 1.0.0  name : pom both sample - child***********************************************************Parent : org.apache.maven.project.MavenProject@f328409File : D:\both\child\pom.xmlBasedir : D:\both\childRepositories : [org.apache.maven.model.Repository@29857804[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@13594894[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1077fc9],]Modules : []BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-compiler-plugin],]ReportPlugins : [org.apache.maven.model.ReportPlugin@a2220f,]Developers : [org.apache.maven.model.Developer@1668655[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@7388808[name=example.com,url=http://www.example.com/]***** POM INFORMATION *************************************  id : com.example:pom-both-sample:pom:1.0.0  groupId : com.example  atrifactId : pom-both-sample  version : 1.0.0  name : pom both sample***********************************************************Parent : nullFile : D:\both\pom.xmlBasedir : D:\bothRepositories : [org.apache.maven.model.Repository@13059051[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@3945515[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@8530b8],]Modules : [child,]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]ReportPlugins : [org.apache.maven.model.ReportPlugin@1deeb40,]Developers : [org.apache.maven.model.Developer@30633470[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@25109548[name=example.com,url=http://www.example.com/][INFO][INFO][INFO] ------------------------------------------------------------------------[INFO] Reactor Summary:[INFO] ------------------------------------------------------------------------[INFO] pom both sample ....................................... SUCCESS [0.969s][INFO] pom both sample - child ............................... SUCCESS [1.766s][INFO] ------------------------------------------------------------------------[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 3 seconds[INFO] Finished at: Mon May 14 00:14:11 JST 2007[INFO] Final Memory: 4M/13M[INFO] ------------------------------------------------------------------------both&gt;  \both\child で Maven2 による compile を実行した結果  \both\child\pom.xml を使用してコンパイルを実行してみる。  \both\pom.xml を継承しているので、\both\child\pom.xml がきちんと \both\pom.xml の内容を引き継いでいることが分かる。  both\child&gt;mvn compile[INFO] Scanning for projects...[INFO] ----------------------------------------------------------------------------[INFO] Building pom both sample - child[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [resources:resources][INFO] Using default encoding to copy filtered resources.[INFO] [compiler:compile][INFO] Compiling 1 source file to D:\both\child\target\classes[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-both-sample-child:jar:1.0.0  groupId : com.example  atrifactId : pom-both-sample-child  version : 1.0.0  name : pom both sample - child***********************************************************Parent : org.apache.maven.project.MavenProject@f328409File : D:\both\child\pom.xmlBasedir : D:\both\childRepositories : [org.apache.maven.model.Repository@33459432[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@13948523[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@149105b],]Modules : []BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-compiler-plugin],]ReportPlugins : [org.apache.maven.model.ReportPlugin@196f4b5,]Developers : [org.apache.maven.model.Developer@33445663[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@6326112[name=example.com,url=http://www.example.com/]***** POM INFORMATION *************************************  id : com.example:pom-both-sample:pom:1.0.0  groupId : com.example  atrifactId : pom-both-sample  version : 1.0.0  name : pom both sample***********************************************************Parent : nullFile : D:\both\pom.xmlBasedir : D:\bothRepositories : [org.apache.maven.model.Repository@13301441[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@17708501[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1f03691],]Modules : [child,]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]ReportPlugins : [org.apache.maven.model.ReportPlugin@1b03c1a,]Developers : [org.apache.maven.model.Developer@5313146[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@6888942[name=example.com,url=http://www.example.com/][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 4 seconds[INFO] Finished at: Mon May 14 00:22:39 JST 2007[INFO] Final Memory: 4M/8M[INFO] ------------------------------------------------------------------------both\child&gt;  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-14T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>inheritance &amp; aggregation の実験</h4>
<p>
  inheritance &amp; aggregation 用のサンプルプロジェクトは下記の様な構成。
  基本的には前回 2 つと全く同じ。
  \both\pom.xml は packageing=pom で aggregation を使用できるようにしてある。
  \both\child\pom.xml は継承を表す parent タグを使用して \both\pom.xml を継承してある。
  <blockquote>
<pre>
\both
　　├pom.xml
　　└child
　　　　├pom.xml
　　　　└src
　　　　　　└java
　　　　　　　　└com
　　　　　　　　　└example
　　　　　　　　　　　└HelloWorld.java
</pre>
  </blockquote>
</p>
<h5>\both\pom.xml</h5>
<p>
  artifactId、name 以外は aggregation のサンプルと全く同一。
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;

&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;name&gt;pom both sample&lt;/name&gt;
  &lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;pom-both-sample&lt;/artifactId&gt;
  &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;
        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;
        &lt;version&gt;2.0.0&lt;/version&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;phase&gt;compile&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;dumpPom&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

  &lt;reporting&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;charset&gt;Shift_JIS&lt;/charset&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/reporting&gt;

  &lt;organization&gt;
    &lt;name&gt;example.com&lt;/name&gt;
    &lt;url&gt;http://www.example.com/&lt;/url&gt;
  &lt;/organization&gt;

  &lt;developers&gt;
    &lt;developer&gt;
      &lt;id&gt;me&lt;/id&gt;
      &lt;name&gt;me&lt;/name&gt;
    &lt;/developer&gt;
  &lt;/developers&gt;

  &lt;issueManagement&gt;
    &lt;system&gt;Bugzilla&lt;/system&gt;
    &lt;url&gt;http://www.example.com/bugzilla&lt;/url&gt;
  &lt;/issueManagement&gt;

  &lt;ciManagement&gt;
    &lt;system&gt;continuum&lt;/system&gt;
    &lt;url&gt;http://www.example.com/continuum&lt;/url&gt;
  &lt;/ciManagement&gt;

  &lt;mailingLists&gt;
    &lt;mailingList&gt;
      &lt;name&gt;Developer ML&lt;/name&gt;
      &lt;subscribe&gt;subscribe@example.com&lt;/subscribe&gt;
      &lt;unsubscribe&gt;unsubscribe@example.com&lt;/unsubscribe&gt;
      &lt;post&gt;developer@example.com&lt;/post&gt;
    &lt;/mailingList&gt;
  &lt;/mailingLists&gt;

  &lt;scm&gt;
    &lt;connection&gt;scm:svn:http://www.example.com/svn/my-project&lt;/connection&gt;
    &lt;developerConnection&gt;scm:svn:https://127.0.0.1/svn/my-project&lt;/developerConnection&gt;
    &lt;tag&gt;HEAD&lt;/tag&gt;
    &lt;url&gt;http://www.example.com/websvn/my-project&lt;/url&gt;
  &lt;/scm&gt;

  &lt;repositories&gt;
    &lt;repository&gt;
      &lt;id&gt;repository.example.com&lt;/id&gt;
      &lt;name&gt;example.com repository&lt;/name&gt;
      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;
    &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;distributionManagement&gt;
    &lt;repository&gt;
      &lt;id&gt;repository.example.com&lt;/id&gt;
      &lt;name&gt;example.com repository&lt;/name&gt;
      &lt;url&gt;scp://www.example.com/maven2&lt;/url&gt;
    &lt;/repository&gt;
  &lt;/distributionManagement&gt;
  
  &lt;modules&gt;
    &lt;module&gt;child&lt;/module&gt;
  &lt;/modules&gt;

&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>\both\child\pom.xml</h5>
<p>
  artifactId、name 以外は inheritance のサンプルと全く同一。
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;

&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

  &lt;parent&gt;
    &lt;groupId&gt;com.example&lt;/groupId&gt;
    &lt;artifactId&gt;pom-both-sample&lt;/artifactId&gt;
    &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;/parent&gt;

  &lt;artifactId&gt;pom-both-sample-child&lt;/artifactId&gt;
  &lt;name&gt;pom both sample - child&lt;/name&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;

&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>\both で Maven2 による compile を実行した結果</h5>
<p>
  aggregation を使用しているので、\both\pom.xml を使用してコンパイルを実行すると \both\child\pom.xml も同時に処理されている。
  また、inheritance も使用しているので、\both\pom.xml の設定項目が \both\child\pom.xml に継承されている。
  <blockquote>
<pre>

both&gt;mvn compile
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   pom both sample
[INFO]   <font color="red">pom both sample - child</font>
[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom both sample
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-both-sample:pom:1.0.0</font>
  groupId : com.example
  atrifactId : pom-both-sample
  version : 1.0.0
  name : pom both sample
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\both\pom.xml</font>
Basedir : D:\both
Repositories : [org.apache.maven.model.Repository@13059051[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@3945515[name=M
aven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=
default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@8530b8],
]
Modules : [child,]
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@1deeb40,]
<font color="red">Developers : [org.apache.maven.model.Developer@30633470[name=me,email=null,id=me
,organization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@25109548[name=example.com,url
=http://www.example.com/]</font>

[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom both sample - child
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to D:\both\child\target\classes
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-both-sample-child:jar:1.0.0</font>
  groupId : com.example
  atrifactId : pom-both-sample-child
  version : 1.0.0
  name : pom both sample - child
***********************************************************
<font color="red">Parent : org.apache.maven.project.MavenProject@f328409</font>
<font color="red">File : D:\both\child\pom.xml</font>
Basedir : D:\both\child
Repositories : [org.apache.maven.model.Repository@29857804[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@13594894[name=
Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout
=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1077fc9
],]
Modules : []
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.
maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-com
piler-plugin],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@a2220f,]
<font color="red">Developers : [org.apache.maven.model.Developer@1668655[name=me,email=null,id=me,
organization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@7388808[name=example.com,url=
http://www.example.com/]</font>

***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-both-sample:pom:1.0.0</font>
  groupId : com.example
  atrifactId : pom-both-sample
  version : 1.0.0
  name : pom both sample
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\both\pom.xml</font>
Basedir : D:\both
Repositories : [org.apache.maven.model.Repository@13059051[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@3945515[name=M
aven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=
default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@8530b8],
]
Modules : [child,]
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@1deeb40,]
<font color="red">Developers : [org.apache.maven.model.Developer@30633470[name=me,email=null,id=me
,organization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@25109548[name=example.com,url
=http://www.example.com/]</font>

[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] pom both sample ....................................... SUCCESS [0.969s]
[INFO] <font color="red">pom both sample - child ............................... SUCCESS [1.766s]</font>
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon May 14 00:14:11 JST 2007
[INFO] Final Memory: 4M/13M
[INFO] ------------------------------------------------------------------------

both&gt;
</pre>
  </blockquote>
</p>
<h5>\both\child で Maven2 による compile を実行した結果</h5>
<p>
  \both\child\pom.xml を使用してコンパイルを実行してみる。
  \both\pom.xml を継承しているので、\both\child\pom.xml がきちんと \both\pom.xml の内容を引き継いでいることが分かる。
  <blockquote>
<pre>

both\child&gt;mvn compile
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom both sample - child
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to D:\both\child\target\classes
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-both-sample-child:jar:1.0.0</font>
  groupId : com.example
  atrifactId : pom-both-sample-child
  version : 1.0.0
  name : pom both sample - child
***********************************************************
<font color="red">Parent : org.apache.maven.project.MavenProject@f328409</font>
<font color="red">File : D:\both\child\pom.xml</font>
Basedir : D:\both\child
Repositories : [org.apache.maven.model.Repository@33459432[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@13948523[name=
Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout
=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@149105b
],]
<font color="red">Modules : []</font>
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.
maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-com
piler-plugin],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@196f4b5,]
<font color="red">Developers : [org.apache.maven.model.Developer@33445663[name=me,email=null,id=me
,organization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@6326112[name=example.com,url=
http://www.example.com/]</font>

***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-both-sample:pom:1.0.0</font>
  groupId : com.example
  atrifactId : pom-both-sample
  version : 1.0.0
  name : pom both sample
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\both\pom.xml</font>
Basedir : D:\both
Repositories : [org.apache.maven.model.Repository@13301441[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@17708501[name=
Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout
=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1f03691
],]
<font color="red">Modules : [child,]</font>
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@1b03c1a,]
<font color="red">Developers : [org.apache.maven.model.Developer@5313146[name=me,email=null,id=me,
organization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@6888942[name=example.com,url=
http://www.example.com/]</font>

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Mon May 14 00:22:39 JST 2007
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------

both\child&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070514_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070513_01.htm">
		<title><![CDATA[Maven2 で POM の inheritance &amp; aggregation を整理してみる(2)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070513_01.htm</link>
		<description><![CDATA[aggregation の実験  aggregation 用のサンプルプロジェクトは下記の様な構成。  基本的には inheritance 用と全く同じ。  \aggregation\pom.xml は packageing=pom で aggregation を使用できるようにしてある。  \aggregation\child\pom.xml は inheritance の時とは異なり、継承を表す parent タグを外してある。  \aggregation　　├pom.xml　　└child　　　　├pom.xml　　　　└src　　　　　　└java　　　　　　　　└com　　　　　　　　　└example　　　　　　　　　　　└HelloWorld.java  \aggregation\pom.xml  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;project&gt;  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;  &lt;name&gt;pom aggregation sample&lt;/name&gt;  &lt;groupId&gt;com.example&lt;/groupId&gt;  &lt;artifactId&gt;pom-aggregation-sample&lt;/artifactId&gt;  &lt;version&gt;1.0.0&lt;/version&gt;  &lt;packaging&gt;pom&lt;/packaging&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;        &lt;version&gt;2.0.0&lt;/version&gt;        &lt;executions&gt;          &lt;execution&gt;            &lt;phase&gt;compile&lt;/phase&gt;            &lt;goals&gt;              &lt;goal&gt;dumpPom&lt;/goal&gt;            &lt;/goals&gt;          &lt;/execution&gt;        &lt;/executions&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;  &lt;reporting&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;        &lt;configuration&gt;          &lt;charset&gt;Shift_JIS&lt;/charset&gt;        &lt;/configuration&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/reporting&gt;  &lt;organization&gt;    &lt;name&gt;example.com&lt;/name&gt;    &lt;url&gt;http://www.example.com/&lt;/url&gt;  &lt;/organization&gt;  &lt;developers&gt;    &lt;developer&gt;      &lt;id&gt;me&lt;/id&gt;      &lt;name&gt;me&lt;/name&gt;    &lt;/developer&gt;  &lt;/developers&gt;  &lt;issueManagement&gt;    &lt;system&gt;Bugzilla&lt;/system&gt;    &lt;url&gt;http://www.example.com/bugzilla&lt;/url&gt;  &lt;/issueManagement&gt;  &lt;ciManagement&gt;    &lt;system&gt;continuum&lt;/system&gt;    &lt;url&gt;http://www.example.com/continuum&lt;/url&gt;  &lt;/ciManagement&gt;  &lt;mailingLists&gt;    &lt;mailingList&gt;      &lt;name&gt;Developer ML&lt;/name&gt;      &lt;subscribe&gt;subscribe@example.com&lt;/subscribe&gt;      &lt;unsubscribe&gt;unsubscribe@example.com&lt;/unsubscribe&gt;      &lt;post&gt;developer@example.com&lt;/post&gt;    &lt;/mailingList&gt;  &lt;/mailingLists&gt;  &lt;scm&gt;    &lt;connection&gt;scm:svn:http://www.example.com/svn/my-project&lt;/connection&gt;    &lt;developerConnection&gt;scm:svn:https://127.0.0.1/svn/my-project&lt;/developerConnection&gt;    &lt;tag&gt;HEAD&lt;/tag&gt;    &lt;url&gt;http://www.example.com/websvn/my-project&lt;/url&gt;  &lt;/scm&gt;  &lt;repositories&gt;    &lt;repository&gt;      &lt;id&gt;repository.example.com&lt;/id&gt;      &lt;name&gt;example.com repository&lt;/name&gt;      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;    &lt;/repository&gt;  &lt;/repositories&gt;    &lt;distributionManagement&gt;    &lt;repository&gt;      &lt;id&gt;repository.example.com&lt;/id&gt;      &lt;name&gt;example.com repository&lt;/name&gt;      &lt;url&gt;scp://www.example.com/maven2&lt;/url&gt;    &lt;/repository&gt;  &lt;/distributionManagement&gt;    &lt;modules&gt;    &lt;module&gt;child&lt;/module&gt;  &lt;/modules&gt;&lt;/project&gt;  \aggregation\child\pom.xml  今回は aggregation のみ使用することが目的なので、inheritance を表す parent タグは使用していない。  \aggregation\pom.xml との違いを明確にするために、わざとほとんどの設定を省略している。  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;project&gt;  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;  &lt;groupId&gt;com.example&lt;/groupId&gt;  &lt;artifactId&gt;pom-aggregation-sample-child&lt;/artifactId&gt;  &lt;version&gt;1.0.0&lt;/version&gt;  &lt;name&gt;pom aggregation sample - child&lt;/name&gt;  &lt;packaging&gt;jar&lt;/packaging&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;        &lt;version&gt;2.0.0&lt;/version&gt;        &lt;executions&gt;          &lt;execution&gt;            &lt;phase&gt;compile&lt;/phase&gt;            &lt;goals&gt;              &lt;goal&gt;dumpPom&lt;/goal&gt;            &lt;/goals&gt;          &lt;/execution&gt;        &lt;/executions&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;&lt;/project&gt;  \aggregation で Maven2 による compile を実行した結果  aggregation を使用しているので、\aggregation\pom.xml を使用してコンパイルを実行すると \aggregation\child\pom.xml も同時に処理されている。  今回は inheritance を使用していないので、\aggregation\child\pom.xml では \aggregation\pom.xml の内容は引き継がれていない。  例えば、Developer や Organization といった項目に注目してみると、\aggregation\child\pom.xml では空になっていることが分かる。  また、\aggregation\pom.xml では、Modules に child が設定されていることが分かる。  aggregation&gt;mvn compile[INFO] Scanning for projects...[INFO] Reactor build order:[INFO]   pom aggregation sample - child[INFO]   pom aggregation sample[INFO] ----------------------------------------------------------------------------[INFO] Building pom aggregation sample - child[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [resources:resources][INFO] Using default encoding to copy filtered resources.[INFO] [compiler:compile][INFO] Compiling 1 source file to D:\aggregation\child\target\classes[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-aggregation-sample-child:jar:1.0.0  groupId : com.example  atrifactId : pom-aggregation-sample-child  version : 1.0.0  name : pom aggregation sample - child***********************************************************Parent : nullFile : D:\aggregation\child\pom.xmlBasedir : D:\aggregation\childRepositories : [org.apache.maven.model.Repository@29345020[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@11db6bb],]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-compiler-plugin],]ReportPlugins : []Developers : []Organization : null[INFO] ----------------------------------------------------------------------------[INFO] Building pom aggregation sample[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-aggregation-sample:pom:1.0.0  groupId : com.example  atrifactId : pom-aggregation-sample  version : 1.0.0  name : pom aggregation sample***********************************************************Parent : nullFile : D:\aggregation\pom.xmlBasedir : D:\aggregationRepositories : [org.apache.maven.model.Repository@30311876[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@28326938[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@139e351],]Modules : [child,]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]ReportPlugins : [org.apache.maven.model.ReportPlugin@51127a,]Developers : [org.apache.maven.model.Developer@30167145[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@13594894[name=example.com,url=http://www.example.com/][INFO][INFO][INFO] ------------------------------------------------------------------------[INFO] Reactor Summary:[INFO] ------------------------------------------------------------------------[INFO] pom aggregation sample - child ........................ SUCCESS [2.640s][INFO] pom aggregation sample ................................ SUCCESS [0.047s][INFO] ------------------------------------------------------------------------[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 3 seconds[INFO] Finished at: Sun May 13 18:05:02 JST 2007[INFO] Final Memory: 4M/9M[INFO] ------------------------------------------------------------------------aggregation&gt;  \aggregation\child で Maven2 による compile を実行した結果  \aggregation\child\pom.xml を使用してコンパイルを実行してみる。  aggregation を使用していても、基本的には \aggregation\pom.xml との親子関係は無いので単体で問題なくコンパイルできる。  aggregation\child&gt;mvn compile[INFO] Scanning for projects...[INFO] ----------------------------------------------------------------------------[INFO] Building pom aggregation sample - child[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [resources:resources][INFO] Using default encoding to copy filtered resources.[INFO] [compiler:compile][INFO] Compiling 1 source file to D:\aggregation\child\target\classes[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-aggregation-sample-child:jar:1.0.0  groupId : com.example  atrifactId : pom-aggregation-sample-child  version : 1.0.0  name : pom aggregation sample - child***********************************************************Parent : nullFile : D:\aggregation\child\pom.xmlBasedir : D:\aggregation\childRepositories : [org.apache.maven.model.Repository@33459432[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@d4d66b],]Modules : []BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-compiler-plugin],]ReportPlugins : []Developers : []Organization : null[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 3 seconds[INFO] Finished at: Sun May 13 18:12:51 JST 2007[INFO] Final Memory: 4M/8M[INFO] ------------------------------------------------------------------------aggregation\child&gt;  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-13T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>aggregation の実験</h4>
<p>
  aggregation 用のサンプルプロジェクトは下記の様な構成。
  基本的には inheritance 用と全く同じ。
  \aggregation\pom.xml は packageing=pom で aggregation を使用できるようにしてある。
  \aggregation\child\pom.xml は inheritance の時とは異なり、継承を表す parent タグを外してある。
  <blockquote>
<pre>
\aggregation
　　├pom.xml
　　└child
　　　　├pom.xml
　　　　└src
　　　　　　└java
　　　　　　　　└com
　　　　　　　　　└example
　　　　　　　　　　　└HelloWorld.java
</pre>
  </blockquote>
</p>
<h5>\aggregation\pom.xml</h5>
<p>
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;

&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;name&gt;pom aggregation sample&lt;/name&gt;
  &lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;pom-aggregation-sample&lt;/artifactId&gt;
  &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;
        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;
        &lt;version&gt;2.0.0&lt;/version&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;phase&gt;compile&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;dumpPom&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

  &lt;reporting&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;charset&gt;Shift_JIS&lt;/charset&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/reporting&gt;

  &lt;organization&gt;
    &lt;name&gt;example.com&lt;/name&gt;
    &lt;url&gt;http://www.example.com/&lt;/url&gt;
  &lt;/organization&gt;

  &lt;developers&gt;
    &lt;developer&gt;
      &lt;id&gt;me&lt;/id&gt;
      &lt;name&gt;me&lt;/name&gt;
    &lt;/developer&gt;
  &lt;/developers&gt;

  &lt;issueManagement&gt;
    &lt;system&gt;Bugzilla&lt;/system&gt;
    &lt;url&gt;http://www.example.com/bugzilla&lt;/url&gt;
  &lt;/issueManagement&gt;

  &lt;ciManagement&gt;
    &lt;system&gt;continuum&lt;/system&gt;
    &lt;url&gt;http://www.example.com/continuum&lt;/url&gt;
  &lt;/ciManagement&gt;

  &lt;mailingLists&gt;
    &lt;mailingList&gt;
      &lt;name&gt;Developer ML&lt;/name&gt;
      &lt;subscribe&gt;subscribe@example.com&lt;/subscribe&gt;
      &lt;unsubscribe&gt;unsubscribe@example.com&lt;/unsubscribe&gt;
      &lt;post&gt;developer@example.com&lt;/post&gt;
    &lt;/mailingList&gt;
  &lt;/mailingLists&gt;

  &lt;scm&gt;
    &lt;connection&gt;scm:svn:http://www.example.com/svn/my-project&lt;/connection&gt;
    &lt;developerConnection&gt;scm:svn:https://127.0.0.1/svn/my-project&lt;/developerConnection&gt;
    &lt;tag&gt;HEAD&lt;/tag&gt;
    &lt;url&gt;http://www.example.com/websvn/my-project&lt;/url&gt;
  &lt;/scm&gt;

  &lt;repositories&gt;
    &lt;repository&gt;
      &lt;id&gt;repository.example.com&lt;/id&gt;
      &lt;name&gt;example.com repository&lt;/name&gt;
      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;
    &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;distributionManagement&gt;
    &lt;repository&gt;
      &lt;id&gt;repository.example.com&lt;/id&gt;
      &lt;name&gt;example.com repository&lt;/name&gt;
      &lt;url&gt;scp://www.example.com/maven2&lt;/url&gt;
    &lt;/repository&gt;
  &lt;/distributionManagement&gt;
  
  &lt;modules&gt;
    &lt;module&gt;child&lt;/module&gt;
  &lt;/modules&gt;

&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>\aggregation\child\pom.xml</h5>
<p>
  今回は aggregation のみ使用することが目的なので、inheritance を表す parent タグは使用していない。
  \aggregation\pom.xml との違いを明確にするために、わざとほとんどの設定を省略している。
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;

&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

  &lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;pom-aggregation-sample-child&lt;/artifactId&gt;
  &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;name&gt;pom aggregation sample - child&lt;/name&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;
        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;
        &lt;version&gt;2.0.0&lt;/version&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;phase&gt;compile&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;dumpPom&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>\aggregation で Maven2 による compile を実行した結果</h5>
<p>
  aggregation を使用しているので、\aggregation\pom.xml を使用してコンパイルを実行すると \aggregation\child\pom.xml も同時に処理されている。
  今回は inheritance を使用していないので、\aggregation\child\pom.xml では \aggregation\pom.xml の内容は引き継がれていない。
  例えば、Developer や Organization といった項目に注目してみると、\aggregation\child\pom.xml では空になっていることが分かる。
  また、\aggregation\pom.xml では、Modules に child が設定されていることが分かる。
  <blockquote>
<pre>

aggregation&gt;mvn compile
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   <font color="red">pom aggregation sample - child</font>
[INFO]   pom aggregation sample
[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom aggregation sample - child
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to D:\aggregation\child\tar
get\classes
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-aggregation-sample-child:jar:1.0.0</font>
  groupId : com.example
  atrifactId : pom-aggregation-sample-child
  version : 1.0.0
  name : pom aggregation sample - child
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\aggregation\child\pom.xml</font>
Basedir : D:\aggregation\child
Repositories : [org.apache.maven.model.Repository@29345020[name=Maven Repository
 Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,release
s=null,snapshots=org.apache.maven.model.RepositoryPolicy@11db6bb],]
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.
maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-com
piler-plugin],]
ReportPlugins : []
<font color="red">Developers : []</font>
<font color="red">Organization : null</font>

[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom aggregation sample
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-aggregation-sample:pom:1.0.0</font>
  groupId : com.example
  atrifactId : pom-aggregation-sample
  version : 1.0.0
  name : pom aggregation sample
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\aggregation\pom.xml</font>
Basedir : D:\aggregation
Repositories : [org.apache.maven.model.Repository@30311876[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@28326938[name=
Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout
=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@139e351
],]
<font color="red">Modules : [child,]</font>
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@51127a,]
<font color="red">Developers : [org.apache.maven.model.Developer@30167145[name=me,email=null,id=me
,organization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@13594894[name=example.com,url
=http://www.example.com/]</font>

[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] <font color="red">pom aggregation sample - child ........................ SUCCESS [2.640s]</font>
[INFO] pom aggregation sample ................................ SUCCESS [0.047s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sun May 13 18:05:02 JST 2007
[INFO] Final Memory: 4M/9M
[INFO] ------------------------------------------------------------------------

aggregation&gt;
</pre>
  </blockquote>
</p>
<h5>\aggregation\child で Maven2 による compile を実行した結果</h5>
<p>
  \aggregation\child\pom.xml を使用してコンパイルを実行してみる。
  aggregation を使用していても、基本的には \aggregation\pom.xml との親子関係は無いので単体で問題なくコンパイルできる。
  <blockquote>
<pre>
aggregation\child&gt;mvn compile
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom aggregation sample - child
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to D:\aggregation\child\target\classes
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-aggregation-sample-child:jar:1.0.0</font>
  groupId : com.example
  atrifactId : pom-aggregation-sample-child
  version : 1.0.0
  name : pom aggregation sample - child
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\aggregation\child\pom.xml</font>
Basedir : D:\aggregation\child
Repositories : [org.apache.maven.model.Repository@33459432[name=Maven Repository
 Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,release
s=null,snapshots=org.apache.maven.model.RepositoryPolicy@d4d66b],]
<font color="red">Modules : []</font>
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.
maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-com
piler-plugin],]
ReportPlugins : []
<font color="red">Developers : []</font>
<font color="red">Organization : null</font>

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sun May 13 18:12:51 JST 2007
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------

aggregation\child&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070513_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070512_01.htm">
		<title><![CDATA[Maven2 で POM の inheritance &amp; aggregation を整理してみる(1)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070512_01.htm</link>
		<description><![CDATA[POM の inheritance &amp; aggregation  普段何気なく使っている POM の inheritance や aggregation だけれど、  考えてみると極端に複雑なプロジェクトを構築したことが無いので常に両方を同時に使用することが多かった。  そこで、一度 inheritance と aggregation の違いとそれぞれの意味を整理してみた。inheritance の実験  下記の様な構成のプロジェクトをでっち上げてみた。  \inheritance\pom.xml は packageing=pom で親 POM になれるようにしてある(下記参照)。  \inheritance\child\pom.xml は \inheritance\pom.xml を継承するように設定してある。  \inheritance　　├pom.xml　　└child　　　　├pom.xml　　　　└src　　　　　　└java　　　　　　　　└com　　　　　　　　　└example　　　　　　　　　　　└HelloWorld.java  \inheritance\pom.xml  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;project&gt;  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;  &lt;name&gt;pom inheritance sample&lt;/name&gt;  &lt;groupId&gt;com.example&lt;/groupId&gt;  &lt;artifactId&gt;pom-inheritance-sample&lt;/artifactId&gt;  &lt;version&gt;1.0.0&lt;/version&gt;  &lt;packaging&gt;pom&lt;/packaging&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;        &lt;version&gt;2.0.0&lt;/version&gt;        &lt;executions&gt;          &lt;execution&gt;            &lt;phase&gt;compile&lt;/phase&gt;            &lt;goals&gt;              &lt;goal&gt;dumpPom&lt;/goal&gt;            &lt;/goals&gt;          &lt;/execution&gt;        &lt;/executions&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;  &lt;reporting&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;        &lt;configuration&gt;          &lt;charset&gt;Shift_JIS&lt;/charset&gt;        &lt;/configuration&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/reporting&gt;  &lt;organization&gt;    &lt;name&gt;example.com&lt;/name&gt;    &lt;url&gt;http://www.example.com/&lt;/url&gt;  &lt;/organization&gt;  &lt;developers&gt;    &lt;developer&gt;      &lt;id&gt;me&lt;/id&gt;      &lt;name&gt;me&lt;/name&gt;    &lt;/developer&gt;  &lt;/developers&gt;  &lt;repositories&gt;    &lt;repository&gt;      &lt;id&gt;repository.example.com&lt;/id&gt;      &lt;name&gt;example.com repository&lt;/name&gt;      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;    &lt;/repository&gt;  &lt;/repositories&gt;&lt;/project&gt;  \inheritance\child\pom.xml  今回は inheritance のみ使用することが目的なので、aggregation を表す modules タグは使用していない。  ただ、parent タグで親の POM を指定しているため、記述量が圧倒的に減少していることがすぐに分かる。  ちなみに、POM の内容は簡単な自作の Maven Plugin で出力している。  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;project&gt;  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;  &lt;parent&gt;    &lt;groupId&gt;com.example&lt;/groupId&gt;    &lt;artifactId&gt;pom-inheritance-sample&lt;/artifactId&gt;    &lt;version&gt;1.0.0&lt;/version&gt;  &lt;/parent&gt;  &lt;artifactId&gt;pom-inheritance-sample-child&lt;/artifactId&gt;  &lt;name&gt;pom inheritance sample - child&lt;/name&gt;  &lt;packaging&gt;jar&lt;/packaging&gt;&lt;/project&gt;  \inheritance で Maven2 による compile を実行した結果  aggregation を使用していないので、\inheritance\pom.xml が表しているプロジェクトのみがコンパイルされている。  \inheritance\child\pom.xml は全く無視されていることに注目。  inheritance&gt;mvn compile[INFO] Scanning for projects...[INFO] ----------------------------------------------------------------------------[INFO] Building pom inheritance sample[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [resources:resources][INFO] Using default encoding to copy filtered resources.[INFO] [compiler:compile][INFO] Compiling 1 source file to D:\inheritance\target\classes[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-inheritance-sample:pom:1.0.0  groupId : com.example  atrifactId : pom-inheritance-sample  version : 1.0.0  name : pom inheritance sample***********************************************************Parent : nullFile : D:\inheritance\pom.xmlBasedir : D:\inheritanceRepositories : [org.apache.maven.model.Repository@33459432[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@13948523[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@149105b],]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-compiler-plugin],]ReportPlugins : [org.apache.maven.model.ReportPlugin@196f4b5,]Developers : [org.apache.maven.model.Developer@17427094[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@14069849[name=example.com,url=http://www.example.com/][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 3 seconds[INFO] Finished at: Sun May 13 16:40:33 JST 2007[INFO] Final Memory: 4M/9M[INFO] ------------------------------------------------------------------------inheritance&gt;  \inheritance\child で Maven2 による compile を実行した結果  \inheritance\child\pom.xml を使用してコンパイルを実行してみる。  こちらもこちらで自分自身のプロジェクトのみを処理対象としている。  但し、POM の内容は \inheritance\pom.xml の内容を継承しているため、  \interitance\child\pom.xml では設定をしていない項目もきちんと設定が受け継がれていることが分かる。  例えば、Developer や Organization といった項目を見ると良く分かる。  inheritance&gt;cd childinheritance\child&gt;mvn compile[INFO] Scanning for projects...[INFO] ----------------------------------------------------------------------------[INFO] Building pom inheritance sample - child[INFO]    task-segment: [compile][INFO] ----------------------------------------------------------------------------[INFO] [resources:resources][INFO] Using default encoding to copy filtered resources.[INFO] [compiler:compile][INFO] Compiling 1 source file to D:\inheritance\child\target\classes[INFO] [largo-support-pom:dumpPom {execution: default}]***** POM INFORMATION *************************************  id : com.example:pom-inheritance-sample-child:jar:1.0.0  groupId : com.example  atrifactId : pom-inheritance-sample-child  version : 1.0.0  name : pom inheritance sample - child***********************************************************Parent : org.apache.maven.project.MavenProject@a6be9458File : D:\inheritance\child\pom.xmlBasedir : D:\inheritance\childRepositories : [org.apache.maven.model.Repository@13948523[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@21565531[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1d0d45b],]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.ReportPlugins : [org.apache.maven.model.ReportPlugin@19ba640,]Developers : [org.apache.maven.model.Developer@539419[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@13878877[name=example.com,url=http://www.example.com/]***** POM INFORMATION *************************************  id : com.example:pom-inheritance-sample:pom:1.0.0  groupId : com.example  atrifactId : pom-inheritance-sample  version : 1.0.0  name : pom inheritance sample***********************************************************Parent : nullFile : D:\inheritance\pom.xmlBasedir : D:\inheritanceRepositories : [org.apache.maven.model.Repository@26117441[name=example.com repository,url=http://www.example.com/maven2,id=repository.example.com,layout=default,releases=null,snapshots=null],org.apache.maven.model.Repository@30311876[name=Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1b03c1a],]BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]ReportPlugins : [org.apache.maven.model.ReportPlugin@1578aab,]Developers : [org.apache.maven.model.Developer@19658898[name=me,email=null,id=me,organization=null,organizationUrl=null,roles=[]],]Organization : org.apache.maven.model.Organization@13594894[name=example.com,url=http://www.example.com/][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESSFUL[INFO] ------------------------------------------------------------------------[INFO] Total time: 3 seconds[INFO] Finished at: Sun May 13 17:28:32 JST 2007[INFO] Final Memory: 4M/8M[INFO] ------------------------------------------------------------------------inheritance\child&gt;  ]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-12T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>POM の inheritance &amp; aggregation</h4>
<p>
  普段何気なく使っている POM の inheritance や aggregation だけれど、
  考えてみると極端に複雑なプロジェクトを構築したことが無いので常に両方を同時に使用することが多かった。
  そこで、一度 inheritance と aggregation の違いとそれぞれの意味を整理してみた。
</p>
<h4>inheritance の実験</h4>
<p>
  下記の様な構成のプロジェクトをでっち上げてみた。
  \inheritance\pom.xml は packageing=pom で親 POM になれるようにしてある(下記参照)。
  \inheritance\child\pom.xml は \inheritance\pom.xml を継承するように設定してある。
  <blockquote>
<pre>
\inheritance
　　├pom.xml
　　└child
　　　　├pom.xml
　　　　└src
　　　　　　└java
　　　　　　　　└com
　　　　　　　　　└example
　　　　　　　　　　　└HelloWorld.java
</pre>
  </blockquote>
</p>
<h5>\inheritance\pom.xml</h5>
<p>
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;

&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;name&gt;pom inheritance sample&lt;/name&gt;
  &lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;pom-inheritance-sample&lt;/artifactId&gt;
  &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;jp.in-vitro.largo&lt;/groupId&gt;
        &lt;artifactId&gt;largo-support-pom&lt;/artifactId&gt;
        &lt;version&gt;2.0.0&lt;/version&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;phase&gt;compile&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;dumpPom&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

  &lt;reporting&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;charset&gt;Shift_JIS&lt;/charset&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/reporting&gt;

  &lt;organization&gt;
    &lt;name&gt;example.com&lt;/name&gt;
    &lt;url&gt;http://www.example.com/&lt;/url&gt;
  &lt;/organization&gt;

  &lt;developers&gt;
    &lt;developer&gt;
      &lt;id&gt;me&lt;/id&gt;
      &lt;name&gt;me&lt;/name&gt;
    &lt;/developer&gt;
  &lt;/developers&gt;

  &lt;repositories&gt;
    &lt;repository&gt;
      &lt;id&gt;repository.example.com&lt;/id&gt;
      &lt;name&gt;example.com repository&lt;/name&gt;
      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;
    &lt;/repository&gt;
  &lt;/repositories&gt;

&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>\inheritance\child\pom.xml</h5>
<p>
  今回は inheritance のみ使用することが目的なので、aggregation を表す modules タグは使用していない。
  ただ、parent タグで親の POM を指定しているため、記述量が圧倒的に減少していることがすぐに分かる。
  ちなみに、POM の内容は簡単な自作の Maven Plugin で出力している。
  <blockquote>
<pre>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;

&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

  &lt;parent&gt;
    &lt;groupId&gt;com.example&lt;/groupId&gt;
    &lt;artifactId&gt;pom-inheritance-sample&lt;/artifactId&gt;
    &lt;version&gt;1.0.0&lt;/version&gt;
  &lt;/parent&gt;

  &lt;artifactId&gt;pom-inheritance-sample-child&lt;/artifactId&gt;
  &lt;name&gt;pom inheritance sample - child&lt;/name&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;

&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>\inheritance で Maven2 による compile を実行した結果</h5>
<p>
  aggregation を使用していないので、\inheritance\pom.xml が表しているプロジェクトのみがコンパイルされている。
  \inheritance\child\pom.xml は全く無視されていることに注目。
  <blockquote>
<pre>
inheritance&gt;mvn compile
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom inheritance sample
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to D:\inheritance\target\classes
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-inheritance-sample:pom:1.0.0</font>
  groupId : com.example
  atrifactId : pom-inheritance-sample
  version : 1.0.0
  name : pom inheritance sample
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\inheritance\pom.xml</font>
Basedir : D:\inheritance
Repositories : [org.apache.maven.model.Repository@33459432[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@13948523[name=
Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout
=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@149105b
],]
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.
maven.plugins:maven-resources-plugin],Plugin [org.apache.maven.plugins:maven-com
piler-plugin],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@196f4b5,]
Developers : [org.apache.maven.model.Developer@17427094[name=me,email=null,id=me
,organization=null,organizationUrl=null,roles=[]],]
Organization : org.apache.maven.model.Organization@14069849[name=example.com,url
=http://www.example.com/]

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sun May 13 16:40:33 JST 2007
[INFO] Final Memory: 4M/9M
[INFO] ------------------------------------------------------------------------

inheritance&gt;
</pre>
  </blockquote>
</p>
<h5>\inheritance\child で Maven2 による compile を実行した結果</h5>
<p>
  \inheritance\child\pom.xml を使用してコンパイルを実行してみる。
  こちらもこちらで自分自身のプロジェクトのみを処理対象としている。
  但し、POM の内容は \inheritance\pom.xml の内容を継承しているため、
  \interitance\child\pom.xml では設定をしていない項目もきちんと設定が受け継がれていることが分かる。
  例えば、Developer や Organization といった項目を見ると良く分かる。
  <blockquote>
<pre>
inheritance&gt;cd child
inheritance\child&gt;mvn compile
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------------
---
[INFO] Building pom inheritance sample - child
[INFO]    task-segment: [compile]
[INFO] -------------------------------------------------------------------------
---
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to D:\inheritance\child\target\classes
[INFO] [largo-support-pom:dumpPom {execution: default}]
***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-inheritance-sample-child:jar:1.0.0</font>
  groupId : com.example
  atrifactId : pom-inheritance-sample-child
  version : 1.0.0
  name : pom inheritance sample - child
***********************************************************
<font color="red">Parent : org.apache.maven.project.MavenProject@a6be9458</font>
<font color="red">File : D:\inheritance\child\pom.xml</font>
Basedir : D:\inheritance\child
Repositories : [org.apache.maven.model.Repository@13948523[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@21565531[name=
Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout
=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1d0d45b
],]
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],Plugin [org.apache.
ReportPlugins : [org.apache.maven.model.ReportPlugin@19ba640,]
<font color="red">Developers : [org.apache.maven.model.Developer@539419[name=me,email=null,id=me,o
rganization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@13878877[name=example.com,url
=http://www.example.com/]</font>

***** POM INFORMATION *************************************
  id : <font color="red">com.example:pom-inheritance-sample:pom:1.0.0</font>
  groupId : com.example
  atrifactId : pom-inheritance-sample
  version : 1.0.0
  name : pom inheritance sample
***********************************************************
<font color="red">Parent : null</font>
<font color="red">File : D:\inheritance\pom.xml</font>
Basedir : D:\inheritance
Repositories : [org.apache.maven.model.Repository@26117441[name=example.com repo
sitory,url=http://www.example.com/maven2,id=repository.example.com,layout=defaul
t,releases=null,snapshots=null],org.apache.maven.model.Repository@30311876[name=
Maven Repository Switchboard,url=http://repo1.maven.org/maven2,id=central,layout
=default,releases=null,snapshots=org.apache.maven.model.RepositoryPolicy@1b03c1a
],]
BuildPlugins : [Plugin [jp.in-vitro.largo:largo-support-pom],]
ReportPlugins : [org.apache.maven.model.ReportPlugin@1578aab,]
<font color="red">Developers : [org.apache.maven.model.Developer@19658898[name=me,email=null,id=me
,organization=null,organizationUrl=null,roles=[]],]</font>
<font color="red">Organization : org.apache.maven.model.Organization@13594894[name=example.com,url
=http://www.example.com/]</font>

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sun May 13 17:28:32 JST 2007
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------

inheritance\child&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070512_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070509_01.htm">
		<title><![CDATA[Maven2 で AbstractMethodError]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070509_01.htm</link>
		<description><![CDATA[  まれに Maven2 実行時に AbstractMethodError が発生することがある。  [INFO] Velocimacro : initialization complete.[INFO] Velocity successfully started.[INFO] [site:site][INFO] ------------------------------------------------------------------------[ERROR] FATAL ERROR[INFO] ------------------------------------------------------------------------[INFO] null[INFO] ------------------------------------------------------------------------[INFO] Tracejava.lang.AbstractMethodError        at org.apache.maven.plugins.site.SiteMojo.filterReports(SiteMojo.java:407)        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:221)        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)        at java.lang.reflect.Method.invoke(Method.java:585)        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)[INFO] ------------------------------------------------------------------------[INFO] Total time: 1 minute 31 seconds[INFO] Finished at: Thu May 10 09:11:00 JST 2007[INFO] Final Memory: 15M/27M[INFO] ------------------------------------------------------------------------    例えば、mvn site 実行時に上記の様に発生する。  この場合、%USER_HOME%\.m2\repository\org を全部削除すれば良い。  Maven2 のバージョンアップを繰り返しているうちに plugin 関連の依存関係が実行時におかしくなることがあるようだ。]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-09T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  まれに Maven2 実行時に AbstractMethodError が発生することがある。
  <blockquote>
<pre>
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [site:site]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.AbstractMethodError
        at org.apache.maven.plugins.site.SiteMojo.filterReports(SiteMojo.java:40
7)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:221)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 31 seconds
[INFO] Finished at: Thu May 10 09:11:00 JST 2007
[INFO] Final Memory: 15M/27M
[INFO] ------------------------------------------------------------------------
</pre>
  </blockquote>
  例えば、mvn site 実行時に上記の様に発生する。
  この場合、%USER_HOME%\.m2\repository\org を全部削除すれば良い。
  Maven2 のバージョンアップを繰り返しているうちに plugin 関連の依存関係が実行時におかしくなることがあるようだ。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070509_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070508_01.htm">
		<title><![CDATA[プライベートなリモートリポジトリの設定変更]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070508_01.htm</link>
		<description><![CDATA[  Maven2 用のプライベートなリモートリポジトリを整理してみた。  今までは URL を一切公開していないので、特にアクセス制限はかけていなかったのだが、  とりあえず HTTPS + Basic 認証 くらいはかけておこうかと設定を変更してみた。Maven2 リモートリポジトリの Basic 認証  これは非常に簡単。  サーバ側で Basic 認証の設定をしておいて、pom.xml、settings.xml を編集するだけ。pom.xml  &lt;project&gt;  ...SNIP...  &lt;repositories&gt;    &lt;repository&gt;      &lt;id&gt;my-private-repository&lt;/id&gt;      &lt;name&gt;my private repository&lt;/name&gt;      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;    &lt;/repository&gt;  &lt;/repositories&gt;  ...SNIP...&lt;/project&gt;  settings.xml  &lt;settings&gt;  ...SNIP...  &lt;servers&gt;    &lt;server&gt;      &lt;id&gt;my-private-repository&lt;/id&gt;      &lt;username&gt;me&lt;/username&gt;      &lt;password&gt;mypassword&lt;/password&gt;    &lt;/server&gt;  &lt;/servers&gt;  ...SNIP...&lt;/settings&gt;  Maven2 リモートリポジトリの HTTPS アクセス  これは結局実現できなかった。  プライベートサーバなのでディジタル証明書を正規に購入するわけもなく、  オレオレ証明書で運用しているのだが、結局はそれがネックになってしまった。  JDK の cacerts にオレオレ証明書を登録してみたり、独自の keystore にオレオレ証明書を登録して   MAVEN_OPTS に "-Djavax.net.ssl.trustStore=keystore -Djavax.net.ssl.trustStorePassword=password"  を指定したりと色々試してみたのだが、結局動作しなかった。  自前のコードで HTTPS 接続を試してみたところ、証明書に問題がある可能性も出てきてこれ以上の調査は結構時間がかかりそうだったので断念。  いつの日か HTTPS + Basic 認証で Maven2 リモートリポジトリにアクセスしたいものだ。  ・・・ディジタル証明書を買う、というのが一番手っ取り早い解決方法なのだが。]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-08T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Maven2 用のプライベートなリモートリポジトリを整理してみた。
  今までは URL を一切公開していないので、特にアクセス制限はかけていなかったのだが、
  とりあえず HTTPS + Basic 認証 くらいはかけておこうかと設定を変更してみた。
</p>
<h4>Maven2 リモートリポジトリの Basic 認証</h4>
<p>
  これは非常に簡単。
  サーバ側で Basic 認証の設定をしておいて、pom.xml、settings.xml を編集するだけ。
</p>
<h5>pom.xml</h5>
<p>
  <blockquote>
<pre>
&lt;project&gt;
  ...SNIP...
  &lt;repositories&gt;
    &lt;repository&gt;
      &lt;id&gt;my-private-repository&lt;/id&gt;
      &lt;name&gt;my private repository&lt;/name&gt;
      &lt;url&gt;http://www.example.com/maven2&lt;/url&gt;
    &lt;/repository&gt;
  &lt;/repositories&gt;
  ...SNIP...
&lt;/project&gt;
</pre>
  </blockquote>
</p>
<h5>settings.xml</h5>
<p>
  <blockquote>
<pre>
&lt;settings&gt;
  ...SNIP...
  &lt;servers&gt;
    &lt;server&gt;
      &lt;id&gt;my-private-repository&lt;/id&gt;
      &lt;username&gt;me&lt;/username&gt;
      &lt;password&gt;mypassword&lt;/password&gt;
    &lt;/server&gt;
  &lt;/servers&gt;
  ...SNIP...
&lt;/settings&gt;
</pre>
  </blockquote>
</p>
<h4>Maven2 リモートリポジトリの HTTPS アクセス</h4>
<p>
  これは結局実現できなかった。
  プライベートサーバなのでディジタル証明書を正規に購入するわけもなく、
  オレオレ証明書で運用しているのだが、結局はそれがネックになってしまった。
  JDK の cacerts にオレオレ証明書を登録してみたり、独自の keystore にオレオレ証明書を登録して 
  MAVEN_OPTS に "-Djavax.net.ssl.trustStore=keystore -Djavax.net.ssl.trustStorePassword=password"
  を指定したりと色々試してみたのだが、結局動作しなかった。
</p>
<p>
  自前のコードで HTTPS 接続を試してみたところ、証明書に問題がある可能性も出てきてこれ以上の調査は結構時間がかかりそうだったので断念。
  いつの日か HTTPS + Basic 認証で Maven2 リモートリポジトリにアクセスしたいものだ。
  ・・・ディジタル証明書を買う、というのが一番手っ取り早い解決方法なのだが。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070508_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Linux/20070501_01.htm">
		<title><![CDATA[Debian Etch + Apache2.2 で ActiveDirectory 認証にチャレンジ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Linux/20070501_01.htm</link>
		<description><![CDATA[  Debian Etch で Apache2.2 から Windows 2003 Server の ActiveDirectory を使用してユーザ認証設定をした。  上手く行くまでに結構苦労したので、メモ。  今回は Subversion の認証を ActiveDirectory で行うことにした。  /etc/apache2/mods-available/dav_svn.conf を色々編集していたのだが、中々上手く行かなかった。  結局下記の様に設定することで正常にユーザ認証できるようになった。  &lt;Location /svn&gt;    ...SNIP...    AuthType Basic    AuthName "Subversion Repositoryr"    AuthBasicProvider ldap    AuthLDAPUrl "ldap://pdc.example.com:389/OU=employees,dc=example,dc=com?sAMAccountName?sub?(objectClass=*)"    AuthLDAPBindDN ldap@example.com    AuthLDAPBindPassword ldap-user-password    Require ldap-attribute objectClass=person&lt;/Location&gt;    AuthLDAPUrl、AuthLDAPBindDN、AuthLDAPBindPassword は色々なサイトに記述されている通りで問題は無かったのだが(強いて言えば、私の試した環境では AuthLDAPUrl に OU を指定しないと動作しなかった)、  Require ディレクティブの設定でかなり時間をかけてしまった。  Require ディレクティブに      Require valid-user    や      Require ldap-user    と記述すると、ActiveDirectory の認証は上手く行くのだが Apache が認証エラーを返してしまう。  その場合、Apache の error.log には何も表示されず原因が分かりづらい。  結局、mod_authnz_ldap のマニュアルに記述されていた Require ディレクティブの解説通りの設定をしたら正常に認証されるようになった。      Apache Module mod_authnz_ldap    http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html    require ldap-attribute    http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html#reqattribute  ]]></description>
		<dc:subject>Linux</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-05-01T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Debian Etch で Apache2.2 から Windows 2003 Server の ActiveDirectory を使用してユーザ認証設定をした。
  上手く行くまでに結構苦労したので、メモ。
</p>
<p>
  今回は Subversion の認証を ActiveDirectory で行うことにした。
  /etc/apache2/mods-available/dav_svn.conf を色々編集していたのだが、中々上手く行かなかった。
  結局下記の様に設定することで正常にユーザ認証できるようになった。
  <blockquote>
<pre>
&lt;Location /svn&gt;

    ...SNIP...

    AuthType Basic
    AuthName "Subversion Repositoryr"
    AuthBasicProvider ldap
    AuthLDAPUrl "ldap://pdc.example.com:389/OU=employees,dc=example,dc=com?sAMAccountName?sub?(objectClass=*)"
    AuthLDAPBindDN ldap@example.com
    AuthLDAPBindPassword ldap-user-password
    Require ldap-attribute objectClass=person

&lt;/Location&gt;
<pre>
  </blockquote>
</p>
<p>
  AuthLDAPUrl、AuthLDAPBindDN、AuthLDAPBindPassword は色々なサイトに記述されている通りで問題は無かったのだが(強いて言えば、私の試した環境では AuthLDAPUrl に OU を指定しないと動作しなかった)、
  Require ディレクティブの設定でかなり時間をかけてしまった。
</p>
<p>
  Require ディレクティブに
  <blockquote>
<pre>
    Require valid-user
</pre>
  </blockquote>
  や
  <blockquote>
<pre>
    Require ldap-user
</pre>
  </blockquote>
  と記述すると、ActiveDirectory の認証は上手く行くのだが Apache が認証エラーを返してしまう。
  その場合、Apache の error.log には何も表示されず原因が分かりづらい。
  結局、mod_authnz_ldap のマニュアルに記述されていた Require ディレクティブの解説通りの設定をしたら正常に認証されるようになった。
  <dl>
    <dt>Apache Module mod_authnz_ldap</dt>
    <dd><a href="http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html">http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html</a></dd>
    <dt>require ldap-attribute</dt>
    <dd><a href="http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html#reqattribute">http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html#reqattribute</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20070501_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Linux/20070427_01.htm">
		<title><![CDATA[巨大なデータの tar アーカイビングに苦戦]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Linux/20070427_01.htm</link>
		<description><![CDATA[  大量のデータを tar でアーカイビングしようとして苦戦。  最初は特に意識せず普通に  tar cvf /home/foo.tar ./foo    とやったのだが、  tar: Cannot write to /home/foo.tar: File too largetar: Error is not recoverable: exiting now    と怒られてしまった。  それなら、と  tar --use=bzip2 -cvf /home/foo.tar.bz2 ./foo    と bzip2 圧縮をかけたのだが、  bzip2: I/O or other error, bailing out.  Possible reason follows.bzip2: File too large        Input file = (stdin), output file = (stdout)Broken pipe    と、またツレナイ結果に。  結局仕方が無いので  #!/bin/shsrc=./foodest=/home/prefix=foo.suffix=.tar.bz2cd $srcfor i in * ; do  if [ -d $i ] ; then     echo "archiving $i... -> $dest/$prefix$i$suffix"    tar --use=bzip2 -cvf $dest/$prefix$i$suffix $i > /dev/null  fidone    とディレクトリ個別にアーカイビングするハメに。  もっと良い方法がある気がするのだが。  どうすれば良いのだろう??]]></description>
		<dc:subject>Linux</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-04-27T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  大量のデータを tar でアーカイビングしようとして苦戦。
  最初は特に意識せず普通に
  <blockquote>
<pre>
tar cvf /home/foo.tar ./foo
</pre>
  </blockquote>
  とやったのだが、
  <blockquote>
<pre>
tar: Cannot write to /home/foo.tar: File too large
tar: Error is not recoverable: exiting now
</pre>
  </blockquote>
  と怒られてしまった。
  それなら、と
  <blockquote>
<pre>
tar --use=bzip2 -cvf /home/foo.tar.bz2 ./foo
</pre>
  </blockquote>
  と bzip2 圧縮をかけたのだが、
  <blockquote>
<pre>
bzip2: I/O or other error, bailing out.  Possible reason follows.
bzip2: File too large
        Input file = (stdin), output file = (stdout)
Broken pipe
</pre>
  </blockquote>
  と、またツレナイ結果に。
  結局仕方が無いので
  <blockquote>
<pre>
#!/bin/sh

src=./foo
dest=/home/
prefix=foo.
suffix=.tar.bz2

cd $src
for i in * ; do
  if [ -d $i ] ; then 
    echo "archiving $i... -> $dest/$prefix$i$suffix"
    tar --use=bzip2 -cvf $dest/$prefix$i$suffix $i > /dev/null
  fi
done
</pre>
  </blockquote>
  とディレクトリ個別にアーカイビングするハメに。
  もっと良い方法がある気がするのだが。
  どうすれば良いのだろう??
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20070427_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Maven/20070426_01.htm">
		<title><![CDATA[Maven2 で JUnit4 を使用する。]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Maven/20070426_01.htm</link>
		<description><![CDATA[ようやく Maven2 で JUnit4 のテストが出来るようになった。ただ、2007/04/26 時点で最新の Maven2.0.6 でもデフォルトでは JUnit4 はサポートされていない。pom.xml で Surefire のバージョンを最新(?) のものに指定する必要がある。毎回設定するのも面倒なので、早くデフォルトで JUnit4 がサポートされないものか。pom.xml の設定方法(最小限)&lt;?xml version="1.0"?&gt;&lt;project&gt;  &lt;build&gt;    &lt;plugins&gt;      &lt;plugin&gt;        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;        &lt;configuration&gt;          &lt;source&gt;1.5&lt;/source&gt;          &lt;target&gt;1.5&lt;/target&gt;        &lt;/configuration&gt;      &lt;/plugin&gt;      &lt;plugin&gt;        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;        &lt;version&gt;2.3&lt;/version&gt;      &lt;/plugin&gt;    &lt;/plugins&gt;  &lt;/build&gt;  &lt;dependencies&gt;    &lt;dependency&gt;      &lt;groupId&gt;junit&lt;/groupId&gt;      &lt;artifactId&gt;junit&lt;/artifactId&gt;      &lt;version&gt;4.0&lt;/version&gt;      &lt;scope&gt;compile&lt;/scope&gt;    &lt;/dependency&gt;  &lt;/dependencies&gt;&lt;/project&gt;]]></description>
		<dc:subject>Maven</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-04-26T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
ようやく Maven2 で JUnit4 のテストが出来るようになった。
ただ、2007/04/26 時点で最新の Maven2.0.6 でもデフォルトでは JUnit4 はサポートされていない。
pom.xml で Surefire のバージョンを最新(?) のものに指定する必要がある。
毎回設定するのも面倒なので、早くデフォルトで JUnit4 がサポートされないものか。
</p>
<h5>pom.xml の設定方法(最小限)</h5>
<blockquote>
<pre>
&lt;?xml version="1.0"?&gt;
&lt;project&gt;
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
        &lt;configuration&gt;
          &lt;source&gt;1.5&lt;/source&gt;
          &lt;target&gt;1.5&lt;/target&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.3&lt;/version&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.0&lt;/version&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
&lt;/project&gt;
</pre>
</blockquote>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Maven/20070426_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Linux/20070419_01.htm">
		<title><![CDATA[Debian Etch で Apache2.2 + SSL]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Linux/20070419_01.htm</link>
		<description><![CDATA[  Debian Etch がリリースされたので、Sarge からアップグレードしてみた。  apt の dist-upgrade は少々不安だったので(^^;、クリーンインストールで。  特に何事もなく進んで喜んでいたのだが、Apache2.2 + SSL の設定で思わぬ苦戦をした。  ということで、最終的に上手くいった方法をメモ。openssl のインストール  example:/# apt-get install opensslReading package lists... DoneBuilding dependency tree... DoneSuggested packages:  ca-certificatesThe following NEW packages will be installed:  openssl0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.Need to get 1004kB of archives.After unpacking 2351kB of additional disk space will be used.Get:1 http://ftp.jp.debian.org etch/main openssl 0.9.8c-4 [1004kB]Fetched 1004kB in 8s (122kB/s)Selecting previously deselected package openssl.(Reading database ... 18787 files and directories currently installed.)Unpacking openssl (from .../openssl_0.9.8c-4_i386.deb) ...Creating directory /etc/sslSetting up openssl (0.9.8c-4) ...example:/#  openssl の設定  よしだメモ さんの [linux]Debian etchでSSL  に書いてあった通りに /etc/ssl/openssl.cnf を編集。      [usr_cert]セクションのnsCertType=serverのコメントアウトを外す    [v3_ca]セクションのnsCertType=sslCA,emailCAのコメントアウトを外す  証明書の作成  こちらもよしだメモさんのエントリ通りに作業。  example:/# cd /usr/lib/ssl/misc/example:/usr/lib/ssl/misc# ./CA.sh -newcaCA certificate filename (or enter to create)Making CA certificate ...Generating a 1024 bit RSA private key.............++++++..................................................................++++++writing new private key to './demoCA/private/./cakey.pem'Enter PEM pass phrase:Verifying - Enter PEM pass phrase:-----    ...SNIP...Certificate is to be certified until Apr 17 01:07:26 2010 GMT (1095 days)Write out database with 1 new entriesData Base Updatedexample:/usr/lib/ssl/misc# openssl rsa -in ./demoCA/private/cakey.pem -out ./demoCA/private/cakey.pemEnter pass phrase for ./demoCA/private/cakey.pem:writing RSA keyexample:/usr/lib/ssl/misc# openssl x509 -in ./demoCA/cacert.pem -out ./demoCA/cacert.crtexample:/usr/lib/ssl/misc# openssl x509 -inform pem -in ./demoCA/cacert.pem -outform der -out ./demoCA/ca.der  証明書を Apache に登録  example:/usr/lib/ssl/misc/demoCA# mkdir /etc/apache2/sslexample:/usr/lib/ssl/misc/demoCA# cp ./cacert.crt /etc/apache2/sslexample:/usr/lib/ssl/misc/demoCA# cd private/example:/usr/lib/ssl/misc/demoCA/private# mkdir /etc/apache2/ssl/privateexample:/usr/lib/ssl/misc/demoCA/private# cp ./cakey.pem /etc/apache2/ssl/private/example:/usr/lib/ssl/misc/demoCA/private# cd /etc/apache2/sites-availableexample:/etc/apache2/sites-available# cp /usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-ssl.conf.gz ./example:/etc/apache2/sites-available# gzip -d ./httpd-ssl.conf.gzexample:/etc/apache2/sites-available# ln -s /etc/apache2/sites-available/httpd-ssl.conf /etc/apache2/sites-enabled/httpd-ssl.confexample:/etc/apache2/sites-available# vi ./httpd-ssl.conf    で、/etc/apache2/ssl/cacert.crt と /etc/apache2/ssl/private/cakey.pem を httpd-ssl.conf に登録。  ついでに、ServerName やら何やらも設定しておく。Apache で ssl モジュール有効化  example:/etc/apache2/sites-available# a2enmod sslModule ssl installed; run /etc/init.d/apache2 force-reload to enable.  Apache 再起動  example:/etc/apache2/sites-available# apache2ctl -tSyntax OKexample:/etc/apache2/sites-available# /etc/init.d/apache2 restartForcing reload of web server (apache2)...httpd (no pid file) not running.  ローカルからの接続確認  example:~# openssl s_client -connect localhost:httpsCONNECTED(00000003)    ...SNIP...---GET / HTTP/1.0  ← これを入力して \n\nHTTP/1.1 200 OKDate: Thu, 19 Apr 2007 14:45:57 GMTServer: Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_ssl/2.2.3 OpenSSL/0.9.8cLast-Modified: Fri, 11 Nov 2005 08:09:59 GMTETag: "1508105-65-a5c6e3c0"Accept-Ranges: bytesContent-Length: 101Connection: closeContent-Type: text/html; charset=UTF-8&lt;html&gt;&lt;head&gt;  &lt;meta http-equiv="refresh" content="0; URL=./blog/"&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;closedexample:~#  リモートから Web ブラウザで確認  後はリモートから Web ブラウザで https の接続を確認して完了。  たったこれだけで 1 週間以上悩んだ・・・ orz  よしだメモ さんに大感謝!!]]></description>
		<dc:subject>Linux</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-04-19T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Debian Etch がリリースされたので、Sarge からアップグレードしてみた。
  apt の dist-upgrade は少々不安だったので(^^;、クリーンインストールで。
  特に何事もなく進んで喜んでいたのだが、Apache2.2 + SSL の設定で思わぬ苦戦をした。
  ということで、最終的に上手くいった方法をメモ。
</p>
<h5>openssl のインストール</h5>
<p>
  <blockquote>
<pre>
example:/# apt-get install openssl
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
  ca-certificates
The following NEW packages will be installed:
  openssl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1004kB of archives.
After unpacking 2351kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org etch/main openssl 0.9.8c-4 [1004kB]
Fetched 1004kB in 8s (122kB/s)
Selecting previously deselected package openssl.
(Reading database ... 18787 files and directories currently installed.)
Unpacking openssl (from .../openssl_0.9.8c-4_i386.deb) ...
Creating directory /etc/ssl
Setting up openssl (0.9.8c-4) ...

example:/#
</pre>
  </blockquote>
</p>
<h5>openssl の設定</h5>
<p>
  <a href="http://d.hatena.ne.jp/rudeboyjet/">よしだメモ</a> さんの <a href="http://d.hatena.ne.jp/rudeboyjet/20070124/p1">[linux]Debian etchでSSL</a>
  に書いてあった通りに /etc/ssl/openssl.cnf を編集。
  <blockquote>
    [usr_cert]セクションのnsCertType=serverのコメントアウトを外す<br>
    [v3_ca]セクションのnsCertType=sslCA,emailCAのコメントアウトを外す<br>
  </blockquote>
</p>
<h5>証明書の作成</h5>
<p>
  こちらも<a href="http://d.hatena.ne.jp/rudeboyjet/">よしだメモ</a>さんのエントリ通りに作業。
  <blockquote>
<pre>
example:/# cd /usr/lib/ssl/misc/
example:/usr/lib/ssl/misc# ./CA.sh -newca
CA certificate filename (or enter to create)

Making CA certificate ...
Generating a 1024 bit RSA private key
.............++++++
..................................................................++++++
writing new private key to './demoCA/private/./cakey.pem'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----

    ...SNIP...

Certificate is to be certified until Apr 17 01:07:26 2010 GMT (1095 days)

Write out database with 1 new entries
Data Base Updated
example:/usr/lib/ssl/misc# openssl rsa -in ./demoCA/private/cakey.pem -out ./demoCA/private/cakey.pem
Enter pass phrase for ./demoCA/private/cakey.pem:
writing RSA key
example:/usr/lib/ssl/misc# openssl x509 -in ./demoCA/cacert.pem -out ./demoCA/cacert.crt
example:/usr/lib/ssl/misc# openssl x509 -inform pem -in ./demoCA/cacert.pem -outform der -out ./demoCA/ca.der
</pre>
  </blockquote>
</p>
<h5>証明書を Apache に登録</h5>
<p>
  <blockquote>
<pre>
example:/usr/lib/ssl/misc/demoCA# mkdir /etc/apache2/ssl
example:/usr/lib/ssl/misc/demoCA# cp ./cacert.crt /etc/apache2/ssl
example:/usr/lib/ssl/misc/demoCA# cd private/
example:/usr/lib/ssl/misc/demoCA/private# mkdir /etc/apache2/ssl/private
example:/usr/lib/ssl/misc/demoCA/private# cp ./cakey.pem /etc/apache2/ssl/private/
example:/usr/lib/ssl/misc/demoCA/private# cd /etc/apache2/sites-available
example:/etc/apache2/sites-available# cp /usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-ssl.conf.gz ./
example:/etc/apache2/sites-available# gzip -d ./httpd-ssl.conf.gz
example:/etc/apache2/sites-available# ln -s /etc/apache2/sites-available/httpd-ssl.conf /etc/apache2/sites-enabled/httpd-ssl.conf
example:/etc/apache2/sites-available# vi ./httpd-ssl.conf
</pre>
  </blockquote>
  で、/etc/apache2/ssl/cacert.crt と /etc/apache2/ssl/private/cakey.pem を httpd-ssl.conf に登録。
  ついでに、ServerName やら何やらも設定しておく。
</p>
<h5>Apache で ssl モジュール有効化</h5>
  <blockquote>
<pre>
example:/etc/apache2/sites-available# a2enmod ssl
Module ssl installed; run /etc/init.d/apache2 force-reload to enable.
</pre>
  </blockquote>
</p>
<h5>Apache 再起動</h5>
  <blockquote>
<pre>
example:/etc/apache2/sites-available# apache2ctl -t
Syntax OK
example:/etc/apache2/sites-available# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...httpd (no pid file) not running
.
</pre>
  </blockquote>
</p>
<h5>ローカルからの接続確認</h5>
<p>
  <blockquote>
<pre>
example:~# openssl s_client -connect localhost:https
CONNECTED(00000003)

    ...SNIP...

---
<font color="red">GET / HTTP/1.0</font>  ← これを入力して \n\n

HTTP/1.1 200 OK
Date: Thu, 19 Apr 2007 14:45:57 GMT
Server: Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_ssl/2.2.3 OpenSSL/0.9.8c
Last-Modified: Fri, 11 Nov 2005 08:09:59 GMT
ETag: "1508105-65-a5c6e3c0"
Accept-Ranges: bytes
Content-Length: 101
Connection: close
Content-Type: text/html; charset=UTF-8

&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv="refresh" content="0; URL=./blog/"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;

closed
example:~#
</pre>
  </blockquote>
</p>
<h5>リモートから Web ブラウザで確認</h5>
<p>
  後はリモートから Web ブラウザで https の接続を確認して完了。
  たったこれだけで 1 週間以上悩んだ・・・ orz
  <a href="http://d.hatena.ne.jp/rudeboyjet/">よしだメモ</a> さんに大感謝!!
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Linux/20070419_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Trac/20070329_01.htm">
		<title><![CDATA[Trac のバージョンアップメモ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Trac/20070329_01.htm</link>
		<description><![CDATA[  Debian Sarge の Stable で提供されている Trac は未だに 0.8.x のまま。  残念なことに、最新は 0.10.x まで進化していて 0.8.x では動かないプラグインが山の様に存在する。  なかなか素敵なプラグインを発見したのに 0.8.x では動かないことが分かりガッカリ、という経験を繰り返したので Trac をバージョンアップすることに。Debian Sarge で Trac を 0.10.x にバージョンアップ  当然 Sarge の Stable では提供されていないので、tar ball を自分で取得してインストールする。  Trac のインストール方法に関しては やどりぎ@NET さんの trac + TracBurndownプラグインでスクラム開発のすすめ を参考にさせていただいた。多謝。Trac 0.10.x の取得 &amp; 解凍  2007/03/29 現在、0.10.3.1 が最新の様なのでそれを取得する。  取得したらついでに解凍しておく。  $ wget http://ftp.edgewall.com/pub/trac/trac-0.10.3.1.tar.gz--19:53:27--  http://ftp.edgewall.com/pub/trac/trac-0.10.3.1.tar.gz           => `trac-0.10.3.1.tar.gz'Resolving ftp.edgewall.com... 83.168.202.212Connecting to ftp.edgewall.com[83.168.202.212]:80... connected.HTTP request sent, awaiting response... 200 OKLength: 443,713 [application/octet-stream]100%[====================================>] 443,713      140.37K/s    ETA 00:0019:53:34 (139.99 KB/s) - `trac-0.10.3.1.tar.gz' saved [443713/443713]$ tar zxvf ./trac-0.10.3.1.tar.gz trac-0.10.3.1/trac-0.10.3.1/AUTHORStrac-0.10.3.1/cgi-bin/trac-0.10.3.1/cgi-bin/trac.cgi  (snip)/usr/lib/python2.3/traceback.pyo/usr/lib/python2.3/trace.pyo/usr/sbin/traceroute$  Trac のインストール  とりあえず Trac のインストーラを実行してみる。  $ cd trac-0.10.3.1# python ./setup.py install --forcerunning installerror: invalid Python installation: unable to open /usr/lib/python2.3/config/Makefile (No such file or directory)#    というわけで、どうやら Python の環境が足りないらしい。  これは python-dev というパッケージをインストールすれば良いらしい。  # apt-get install python-devReading Package Lists... 0%Reading Package Lists... 0%  (snip)The following extra packages will be installed:  python2.3-devThe following NEW packages will be installed:  python-dev python2.3-dev0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.Need to get 1488kB of archives.After unpacking 4678kB of additional disk space will be used.Do you want to continue? [Y/n] Y0% [Working]            Get:1 http://www.jp.debian.org sarge/main python2.3-dev 2.3.5-3sarge2 [1481kB]            0% [1 python2.3-dev 2288/1481kB 0%]                                   37% [1 python2.3-dev 564816/1481kB 38%]66% [1 python2.3-dev 990528/1481kB 66%]                                       99% [Waiting for headers]                         Get:2 http://www.jp.debian.org sarge/main python-dev 2.3.5-2 [6638B]                         100% [Working]              Fetched 1488kB in 1s (800kB/s)Selecting previously deselected package python2.3-dev.(Reading database ... 24304 files and directories currently installed.)Unpacking python2.3-dev (from .../python2.3-dev_2.3.5-3sarge2_i386.deb) ...Selecting previously deselected package python-dev.Unpacking python-dev (from .../python-dev_2.3.5-2_all.deb) ...Setting up python2.3-dev (2.3.5-3sarge2) ...Setting up python-dev (2.3.5-2) ...#    再度 Trac のインストーラを実行。  # python ./setup.py install --forcerunning installrunning buildrunning build_pycreating buildcreating build/libcreating build/lib/traccopying trac/__init__.py -> build/lib/traccopying trac/About.py -> build/lib/traccopying trac/attachment.py -> build/lib/traccopying trac/config.py -> build/lib/traccopying trac/core.py -> build/lib/trac  (snip)copying wiki-default/WikiProcessors -> /usr/share/trac/wiki-defaultcopying wiki-default/WikiRestructuredText -> /usr/share/trac/wiki-defaultcopying wiki-default/WikiRestructuredTextLinks -> /usr/share/trac/wiki-defaultcopying wiki-default/WikiStart -> /usr/share/trac/wiki-defaultcreating /usr/share/trac/wiki-macroscopying wiki-macros/HelloWorld.py -> /usr/share/trac/wiki-macroscopying wiki-macros/Timestamp.py -> /usr/share/trac/wiki-macroscopying wiki-macros/TracGuideToc.py -> /usr/share/trac/wiki-macrosThank you for choosing Trac 0.10.3.1. Enjoy your stay!#    今度は正常にインストールされた。Trac 0.10.x の動作確認  やどりぎ@NET さんの情報でそのままでは動作しないことは分かっていたのだが、  とりあえずアクセスしてみた。情報通り TracError が発生して動作しなかった。  エラーページに記載されていたコマンドをそのまま実行。  # trac-admin /tmp/trac/myprojects upgradePlease perform a "resync" after this upgrade.Upgrade done.#    今度は正常に動作した。  これで Trac 0.8.x → 0.10.x のバージョンアップはとりあえず完了(と思いたい)。]]></description>
		<dc:subject>Trac</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-03-29T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  Debian Sarge の Stable で提供されている Trac は未だに 0.8.x のまま。
  残念なことに、最新は 0.10.x まで進化していて 0.8.x では動かないプラグインが山の様に存在する。
  なかなか素敵なプラグインを発見したのに 0.8.x では動かないことが分かりガッカリ、という経験を繰り返したので Trac をバージョンアップすることに。
</p>
<h4>Debian Sarge で Trac を 0.10.x にバージョンアップ</h4>
<p>
  当然 Sarge の Stable では提供されていないので、tar ball を自分で取得してインストールする。
  Trac のインストール方法に関しては <a href="http://yadorigi.seesaa.net/">やどりぎ@NET</a> さんの <a href="http://yadorigi.seesaa.net/article/24123831.html">trac + TracBurndownプラグインでスクラム開発のすすめ</a> を参考にさせていただいた。多謝。
</p>
<h5>Trac 0.10.x の取得 &amp; 解凍</h5>
<p>
  2007/03/29 現在、0.10.3.1 が最新の様なのでそれを取得する。
  取得したらついでに解凍しておく。
  <blockquote>
<pre>
$ wget http://ftp.edgewall.com/pub/trac/trac-0.10.3.1.tar.gz
--19:53:27--  http://ftp.edgewall.com/pub/trac/trac-0.10.3.1.tar.gz
           => `trac-0.10.3.1.tar.gz'
Resolving ftp.edgewall.com... 83.168.202.212
Connecting to ftp.edgewall.com[83.168.202.212]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 443,713 [application/octet-stream]

100%[====================================>] 443,713      140.37K/s    ETA 00:00

19:53:34 (139.99 KB/s) - `trac-0.10.3.1.tar.gz' saved [443713/443713]

$ tar zxvf ./trac-0.10.3.1.tar.gz 
trac-0.10.3.1/
trac-0.10.3.1/AUTHORS
trac-0.10.3.1/cgi-bin/
trac-0.10.3.1/cgi-bin/trac.cgi

  (snip)

/usr/lib/python2.3/traceback.pyo
/usr/lib/python2.3/trace.pyo
/usr/sbin/traceroute
$
</pre>
  </blockquote>
</p>
<h4>Trac のインストール</h4>
<p>
  とりあえず Trac のインストーラを実行してみる。
  <blockquote>
<pre>
$ cd trac-0.10.3.1
# python ./setup.py install --force
running install
error: invalid Python installation: unable to open /usr/lib/python2.3/config/Makefile (No such file or directory)
#
</pre>
  </blockquote>
</p>
<p>
  というわけで、どうやら Python の環境が足りないらしい。
  これは python-dev というパッケージをインストールすれば良いらしい。
  <blockquote>
<pre>
# apt-get install python-dev

Reading Package Lists... 0%

Reading Package Lists... 0%

  (snip)

The following extra packages will be installed:
  python2.3-dev
The following NEW packages will be installed:
  python-dev python2.3-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1488kB of archives.
After unpacking 4678kB of additional disk space will be used.
Do you want to continue? [Y/n] Y


0% [Working]
            
Get:1 http://www.jp.debian.org sarge/main python2.3-dev 2.3.5-3sarge2 [1481kB]

            
0% [1 python2.3-dev 2288/1481kB 0%]
                                   
37% [1 python2.3-dev 564816/1481kB 38%]
66% [1 python2.3-dev 990528/1481kB 66%]
                                       
99% [Waiting for headers]
                         
Get:2 http://www.jp.debian.org sarge/main python-dev 2.3.5-2 [6638B]

                         
100% [Working]
              
Fetched 1488kB in 1s (800kB/s)
Selecting previously deselected package python2.3-dev.
(Reading database ... 24304 files and directories currently installed.)
Unpacking python2.3-dev (from .../python2.3-dev_2.3.5-3sarge2_i386.deb) ...
Selecting previously deselected package python-dev.
Unpacking python-dev (from .../python-dev_2.3.5-2_all.deb) ...
Setting up python2.3-dev (2.3.5-3sarge2) ...

Setting up python-dev (2.3.5-2) ...
#
</pre>
  </blockquote>
</p>
<p>
  再度 Trac のインストーラを実行。
  <blockquote>
<pre>
# python ./setup.py install --force
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/trac
copying trac/__init__.py -> build/lib/trac
copying trac/About.py -> build/lib/trac
copying trac/attachment.py -> build/lib/trac
copying trac/config.py -> build/lib/trac
copying trac/core.py -> build/lib/trac

  (snip)

copying wiki-default/WikiProcessors -> /usr/share/trac/wiki-default
copying wiki-default/WikiRestructuredText -> /usr/share/trac/wiki-default
copying wiki-default/WikiRestructuredTextLinks -> /usr/share/trac/wiki-default
copying wiki-default/WikiStart -> /usr/share/trac/wiki-default
creating /usr/share/trac/wiki-macros
copying wiki-macros/HelloWorld.py -> /usr/share/trac/wiki-macros
copying wiki-macros/Timestamp.py -> /usr/share/trac/wiki-macros
copying wiki-macros/TracGuideToc.py -> /usr/share/trac/wiki-macros

Thank you for choosing Trac 0.10.3.1. Enjoy your stay!
#
</pre>
  </blockquote>
  今度は正常にインストールされた。
</p>
<h4>Trac 0.10.x の動作確認</h4>
<p>
  <a href="http://yadorigi.seesaa.net/">やどりぎ@NET</a> さんの情報でそのままでは動作しないことは分かっていたのだが、
  とりあえずアクセスしてみた。情報通り TracError が発生して動作しなかった。
  エラーページに記載されていたコマンドをそのまま実行。
  <blockquote>
<pre>
# trac-admin /tmp/trac/myprojects upgrade
Please perform a "resync" after this upgrade.
Upgrade done.
#
</pre>
  </blockquote>
  今度は正常に動作した。
  これで Trac 0.8.x → 0.10.x のバージョンアップはとりあえず完了(と思いたい)。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Trac/20070329_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070225_01.htm">
		<title><![CDATA[Windows PowerShell にチャレンジ (6)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/dotNet/20070225_01.htm</link>
		<description><![CDATA[サンプルスクリプトの実行      List Basic Computer Information    http://www.microsoft.com/technet/scriptcenter/scripts/msh/hardware/basic/hwbams01.mspx    を試しに実行してみた。  ページに記述されているスクリプトを ListBasicComputerInformation.ps1 というファイルに貼り付けて Windows PowerShell のコンソールから実行してみる。  PS C:\&gt; .\ListBasicComputerInformation.ps1File C:\ListBasicComputerInformation.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.At line:1 char:34+ .\ListBasicComputerInformation.ps1 &lt;&lt;&lt;&lt;PS C:\&gt;    セキュリティポリシーに引っかかってしまった(^^;  PS C:\&gt; Get-ExecutionPolicyRestrictedPS C:\&gt; Set-ExecutionPolicy RemoteSignedPS C:\&gt;    でセキュリティポリシーをローカルのスクリプトファイルは署名無しで実行出来るように変更。  PS C:\&gt; .\ListBasicComputerInformation.ps1Administrator Password Status:  3Automatic Reset Boot Option:  TrueAutomatic Reset Capability:  TrueBoot Option On Limit:Boot Option On WatchDog:Boot ROM Supported:  TrueBootup State:  Normal boot　　　　　(略)WakeUp Type:  7Workgroup:PS C:\&gt;    ということで、PC の基本情報を取得することが出来た。]]></description>
		<dc:subject>dotNet</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-25T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>サンプルスクリプトの実行</h4>
<p>
  <dl>
    <dt>List Basic Computer Information</dt>
    <dd><a href="http://www.microsoft.com/technet/scriptcenter/scripts/msh/hardware/basic/hwbams01.mspx">http://www.microsoft.com/technet/scriptcenter/scripts/msh/hardware/basic/hwbams01.mspx</a></dd>
  </dl>
  を試しに実行してみた。
  ページに記述されているスクリプトを ListBasicComputerInformation.ps1 というファイルに貼り付けて Windows PowerShell のコンソールから実行してみる。
  <blockquote>
<pre>
PS C:\&gt; .\ListBasicComputerInformation.ps1
File C:\ListBasicComputerInformation.ps1 cannot be loaded because the execution
 of scripts is disabled on this system. Please see "get-help about_signing" for
 more details.
At line:1 char:34
+ .\ListBasicComputerInformation.ps1 &lt;&lt;&lt;&lt;
PS C:\&gt;
</pre>
  </blockquote>
  セキュリティポリシーに引っかかってしまった(^^;
  <blockquote>
<pre>
PS C:\&gt; Get-ExecutionPolicy
Restricted
PS C:\&gt; Set-ExecutionPolicy RemoteSigned
PS C:\&gt;
</pre>
  </blockquote>
  でセキュリティポリシーをローカルのスクリプトファイルは署名無しで実行出来るように変更。
  <blockquote>
<pre>
PS C:\&gt; .\ListBasicComputerInformation.ps1
Administrator Password Status:  3
Automatic Reset Boot Option:  True
Automatic Reset Capability:  True
Boot Option On Limit:
Boot Option On WatchDog:
Boot ROM Supported:  True
Bootup State:  Normal boot
　　　　　(略)
WakeUp Type:  7
Workgroup:

PS C:\&gt;
</pre>
  </blockquote>
  ということで、PC の基本情報を取得することが出来た。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070225_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070223_01.htm">
		<title><![CDATA[Windows PowerShell にチャレンジ (5)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/dotNet/20070223_01.htm</link>
		<description><![CDATA[  一通り基本的なところを眺め終わったので、スクリプトのサンプルを見てみることに。  Microsoft のサイトに Windows PowerShell のサンプルスクリプト用リポジトリが用意されている。  結構充実していて勉強にはもってこいな感じ。      Scripting with Windows PowerShell    http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx    The Script Center Script Repository: Sample Windows PowerShell Scripts    http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx  提供されているサンプルスクリプト  Active Directory - Sample scripts for managing Active Directory and Active Directory objects.          Domains - Sample scripts for managing Active Directory domains.                  List Domain Information                      Applications - Sample scripts for managing software and applications on servers and client computers.          Client Applications - Sample scripts for managing software on user computers, including scripts for installing, updating, and deleting software installed using Windows Installer.                  List Information About the Binary Files Used by an Application          List Installed Software          List Installed Software Features          List the Codec Files on a Computer                      Desktop Management - Sample scripts for managing such things as desktop settings, computer startup and shutdown, and System Restore.          Logon Sessions - Sample scripts for retrieving information about computer logon sessions, including identifying the user logged on to a remote computer.                  List Logon Session Information                    Startup and Shutdown - Sample scripts for managing Windows startup settings and for shutting down computers.                  List Computer Startup Commands          List Recovery Configuration Options          List the Boot Configuration Properties of a Computer                    Windows Activation - Sample scripts for managing Windows Activation, including scripts for activating Windows both online and offline.                  List Windows Product Activation Status                    Windows and Windows Explorer Settings - Sample scripts for configuring Windows and Windows Explorer settings.                  List Desktop Settings          List Environment Variables on a Computer          List Shortcuts on a Computer          List Start Menu Groups          List Start Menu Items          List Start Menu Program Groups                      Hardware - Sample scripts for managing and monitoring computer hardware.          Basic Hardware and Firmware - Sample scripts for retrieving information about the hardware and firmware installed on a computer.                  List Basic Computer Information          List Computer Baseboard Properties          List Computer Bus Properties          List Computer Chassis Information          List Computer Fan Information          List Infrared Device Information          List IRQ Settings          List Motherboard Device Information          List Onboard Devices          List Processor Information                    Batteries and Power Supplies - Sample scripts for retrieving information about batteries and power supplies installed in a computer.                  List Battery Information          List Portable Battery Information          List UPS Information                    Memory - Sample scripts for retrieving information about the physical memory installed in a computer.                  List Cache Memory Information          List Device Memory Addresses          List DMA Channel Information          List Memory Array Information          List Memory Devices          List Physical Memory Properties          List Physical Memory Array Properties                    Peripherals and Devices - Sample scripts for retrieving information about peripherals and other devices installed on a computer.                  List Keyboard Properties          List Modem Information          List Plug and Play Devices          List Plug and Play Signed Drivers          List Pointing Device Properties          List Sound Card Properties                    Ports and Slots - Sample scripts for retrieving information about ports and system slots installed in a computer.                  List 1394 Controller Settings          List Parallel Port Properties          List PCMCIA Controller Information          List Port Connector Properties          List Port Resource Information          List Serial Port Configuration Properties          List Serial Port Properties          List System Slot Properties                    Video and Display - Sample scripts for retrieving information about video controllers, display cards, and monitors installed on a computer.                  List Current Display Configuration Values          List Desktop Monitor Properties          List Display Controller Configuration Settings          List Video Controller Properties                      Logs - Sample scripts for managing event logs and plain-text log files.          Event Logs - Sample scripts for managing event logs (for example, backing up and clearing event logs), and for retrieving events from event logs.                  List Event Log Properties          List Events from the Event Logs                       Networking - Sample scripts for managing and monitoring network configurations and network applications.          Client-Side Management - Sample scripts for configuring TCP/IP settings (IP address, DNS Server, WINS Server, etc.) on client computers.                  Retrieving Network Configuration Information - Sample scripts for retrieving information about TCP/IP settings on client computers.                          List IP4 Route Table Information              List Network Adapter Configuration Properties              List Network Adapter Properties              List Network Client Information              List Network Login Profiles              List Proxy Server Information              List the Network Protocols on a Computer                                          Operating System - Sample scripts for managing and monitoring the Windows operating system.          COM and DCOM - Sample scripts for retrieving information about COM and DCOM settings and classes found on a computer.                  List Classic COM Class Settings          List Classic COM Classes          List Component Categories          List DCOM Application Settings          List DCOM Applications          List ProgIDs                    Dates and Times - Sample scripts for retrieving date and time information (including local time and time zone information) from computers.                  List the Local Time on a Computer          List Time Zone Information for a Computer                    Page Files - Sample scripts for retrieving information from and configuring page files.                  List Page File Properties          List Page File Settings          List Page File Use                    Processes - Sample scripts for managing and monitoring the processes running on a computer.                  Processes and Threads - Sample scripts for managing processes and threads, including scripts for creating new processes and terminating existing processes.                          List Information about the Threads Active on a Computer              List the Processes Running on a Computer                                         Registry - Sample scripts from retrieving information from and writing information to the Windows registry.                  List Registry Properties                   Services - Sample scripts for managing Windows services and for listing and/or modifying the properties of those services.                  List Service Load Order Groups          List Service Properties                    Task Scheduling - Sample scripts for creating, modifying, and deleting scheduled jobs on a computer.                  List Scheduled Tasks                    Version Information - Sample scripts for retrieving information about the version of Windows installed on a computer.                  List Operating System Properties                    Other Directory Services - Sample scripts for managing directory services other than Active Directory.          Local Accounts and Windows NT 4.0 Accounts - Sample scripts for managing user and group accounts on local computers and in Windows NT 4.0 domains.                  Groups - Sample scripts for managing security groups on local computers and/or in Windows NT 4.0 domains.                          List Group Information                               User Accounts - Sample scripts for managing user accounts on local computers and/or in Windows NT 4.0 domains.                          List User Account Information                                           Printing - Sample scripts for managing printers, print jobs, print servers, and other parts of the Windows printing infrastructure.          Print Servers, Print Queues, and Print Jobs - Sample scripts for managing print servers, print queues, and individual print jobs.                  List Print Job Information          List Printer Capabilities          List Printer Information                    Printer Ports and Printer Drivers - Sample scripts for retrieving information about and for configuring printer ports and printer drivers on a computer.                  List Printer Drivers          List Printer Port Properties                        Scripting Techniques - Sample scripts demonstrating a wide variety of scripting tips, tricks, and techniques useful to script writers.          Dates and Times - Sample scripts for manipulating dates and times, particularly the UTC times used by WMI.                  List the UTC Time on a Computer                   WMI - Sample scripts for retrieving information about objects that can be used in WMI scripts.                  List WMI Setting Information                     Service Packs and Hot Fixes - Sample scripts for retrieving information about service packs and hot fixes installed on a computer.          List Installed Hot Fixes       Storage - Sample scripts for managing files, folders, file systems, and storage devices.          Disk Drives and Volumes      Disk Quotas      Folders      Shared Folders        Terminal Server - Sample scripts for managing Windows Terminal Server.          Retrieving Terminal Server Properties - Sample scripts for retrieving information about Terminal Server configuration settings.                  List Terminal Service Service Properties          List Terminal Services Accounts          List Terminal Services Client Settings          List Terminal Services Environment Settings          List Terminal Services General Settings          List Terminal Services Logon Settings          List Terminal Services Network Adapter List Settings          List Terminal Services Network Adapter Settings          List Terminal Services Permission Settings          List Terminal Services Remote Control Settings          List Terminal Services Session Directory Settings          List Terminal Services Session Settings          List Terminal Services Terminal Settings          List Terminal Services Terminals                    ]]></description>
		<dc:subject>dotNet</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-23T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  一通り基本的なところを眺め終わったので、スクリプトのサンプルを見てみることに。
  Microsoft のサイトに Windows PowerShell のサンプルスクリプト用リポジトリが用意されている。
  結構充実していて勉強にはもってこいな感じ。
  <dl>
    <dt>Scripting with Windows PowerShell</dt>
    <dd><a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx">http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx</a></dd>
    <dt>The Script Center Script Repository: Sample Windows PowerShell Scripts</dt>
    <dd><a href="http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx">http://www.microsoft.com/technet/scriptcenter/scripts/msh/default.mspx</a></dd>
  </dl>
</p>
<h4>提供されているサンプルスクリプト</h4>
<p>
<ul>
  <li>Active Directory - Sample scripts for managing Active Directory and Active Directory objects.<br>
    <ul>
      <li>Domains - Sample scripts for managing Active Directory domains.<br>
        <ul>
          <li>List Domain Information</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Applications - Sample scripts for managing software and applications on servers and client computers.<br>
    <ul>
      <li>Client Applications - Sample scripts for managing software on user computers, including scripts for installing, updating, and deleting software installed using Windows Installer.<br>
        <ul>
          <li>List Information About the Binary Files Used by an Application</li>
          <li>List Installed Software</li>
          <li>List Installed Software Features</li>
          <li>List the Codec Files on a Computer</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Desktop Management - Sample scripts for managing such things as desktop settings, computer startup and shutdown, and System Restore.<br>
    <ul>
      <li>Logon Sessions - Sample scripts for retrieving information about computer logon sessions, including identifying the user logged on to a remote computer.<br>
        <ul>
          <li>List Logon Session Information</li>
        </ul>
      </li>
      <li>Startup and Shutdown - Sample scripts for managing Windows startup settings and for shutting down computers.<br>
        <ul>
          <li>List Computer Startup Commands</li>
          <li>List Recovery Configuration Options</li>
          <li>List the Boot Configuration Properties of a Computer</li>
        </ul>
      </li>
      <li>Windows Activation - Sample scripts for managing Windows Activation, including scripts for activating Windows both online and offline.<br>
        <ul>
          <li>List Windows Product Activation Status</li>
        </ul>
      </li>
      <li>Windows and Windows Explorer Settings - Sample scripts for configuring Windows and Windows Explorer settings.<br>
        <ul>
          <li>List Desktop Settings</li>
          <li>List Environment Variables on a Computer</li>
          <li>List Shortcuts on a Computer</li>
          <li>List Start Menu Groups</li>
          <li>List Start Menu Items</li>
          <li>List Start Menu Program Groups</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Hardware - Sample scripts for managing and monitoring computer hardware.<br>
    <ul>
      <li>Basic Hardware and Firmware - Sample scripts for retrieving information about the hardware and firmware installed on a computer.<br>
        <ul>
          <li>List Basic Computer Information</li>
          <li>List Computer Baseboard Properties</li>
          <li>List Computer Bus Properties</li>
          <li>List Computer Chassis Information</li>
          <li>List Computer Fan Information</li>
          <li>List Infrared Device Information</li>
          <li>List IRQ Settings</li>
          <li>List Motherboard Device Information</li>
          <li>List Onboard Devices</li>
          <li>List Processor Information</li>
        </ul>
      </li>
      <li>Batteries and Power Supplies - Sample scripts for retrieving information about batteries and power supplies installed in a computer.<br>
        <ul>
          <li>List Battery Information</li>
          <li>List Portable Battery Information</li>
          <li>List UPS Information</li>
        </ul>
      </li>
      <li>Memory - Sample scripts for retrieving information about the physical memory installed in a computer.<br>
        <ul>
          <li>List Cache Memory Information</li>
          <li>List Device Memory Addresses</li>
          <li>List DMA Channel Information</li>
          <li>List Memory Array Information</li>
          <li>List Memory Devices</li>
          <li>List Physical Memory Properties</li>
          <li>List Physical Memory Array Properties</li>
        </ul>
      </li>
      <li>Peripherals and Devices - Sample scripts for retrieving information about peripherals and other devices installed on a computer.<br>
        <ul>
          <li>List Keyboard Properties</li>
          <li>List Modem Information</li>
          <li>List Plug and Play Devices</li>
          <li>List Plug and Play Signed Drivers</li>
          <li>List Pointing Device Properties</li>
          <li>List Sound Card Properties</li>
        </ul>
      </li>
      <li>Ports and Slots - Sample scripts for retrieving information about ports and system slots installed in a computer.<br>
        <ul>
          <li>List 1394 Controller Settings</li>
          <li>List Parallel Port Properties</li>
          <li>List PCMCIA Controller Information</li>
          <li>List Port Connector Properties</li>
          <li>List Port Resource Information</li>
          <li>List Serial Port Configuration Properties</li>
          <li>List Serial Port Properties</li>
          <li>List System Slot Properties</li>
        </ul>
      </li>
      <li>Video and Display - Sample scripts for retrieving information about video controllers, display cards, and monitors installed on a computer.<br>
        <ul>
          <li>List Current Display Configuration Values</li>
          <li>List Desktop Monitor Properties</li>
          <li>List Display Controller Configuration Settings</li>
          <li>List Video Controller Properties</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Logs - Sample scripts for managing event logs and plain-text log files.<br>
    <ul>
      <li>Event Logs - Sample scripts for managing event logs (for example, backing up and clearing event logs), and for retrieving events from event logs.<br>
        <ul>
          <li>List Event Log Properties</li>
          <li>List Events from the Event Logs</li>
         </ul>
      </li>
    </ul>
  </li>
  <li>Networking - Sample scripts for managing and monitoring network configurations and network applications.<br>
    <ul>
      <li>Client-Side Management - Sample scripts for configuring TCP/IP settings (IP address, DNS Server, WINS Server, etc.) on client computers.<br>
        <ul>
          <li>Retrieving Network Configuration Information - Sample scripts for retrieving information about TCP/IP settings on client computers.<br>
            <ul>
              <li>List IP4 Route Table Information</li>
              <li>List Network Adapter Configuration Properties</li>
              <li>List Network Adapter Properties</li>
              <li>List Network Client Information</li>
              <li>List Network Login Profiles</li>
              <li>List Proxy Server Information</li>
              <li>List the Network Protocols on a Computer</li>
            </ul>
         </li>
       </ul>
      </li>
    </ul>
  </li>
  <li>Operating System - Sample scripts for managing and monitoring the Windows operating system.<br>
    <ul>
      <li>COM and DCOM - Sample scripts for retrieving information about COM and DCOM settings and classes found on a computer.<br>
        <ul>
          <li>List Classic COM Class Settings</li>
          <li>List Classic COM Classes</li>
          <li>List Component Categories</li>
          <li>List DCOM Application Settings</li>
          <li>List DCOM Applications</li>
          <li>List ProgIDs</li>
        </ul>
      </li>
      <li>Dates and Times - Sample scripts for retrieving date and time information (including local time and time zone information) from computers.<br>
        <ul>
          <li>List the Local Time on a Computer</li>
          <li>List Time Zone Information for a Computer</li>
        </ul>
      </li>
      <li>Page Files - Sample scripts for retrieving information from and configuring page files.<br>
        <ul>
          <li>List Page File Properties</li>
          <li>List Page File Settings</li>
          <li>List Page File Use</li>
        </ul>
      </li>
      <li>Processes - Sample scripts for managing and monitoring the processes running on a computer.<br>
        <ul>
          <li>Processes and Threads - Sample scripts for managing processes and threads, including scripts for creating new processes and terminating existing processes.<br>
            <ul>
              <li>List Information about the Threads Active on a Computer</li>
              <li>List the Processes Running on a Computer</li>
           </ul>
          </li>
        </ul>
      </li>
      <li>Registry - Sample scripts from retrieving information from and writing information to the Windows registry.<br>
        <ul>
          <li>List Registry Properties</li>
       </ul>
      </li>
      <li>Services - Sample scripts for managing Windows services and for listing and/or modifying the properties of those services.<br>
        <ul>
          <li>List Service Load Order Groups</li>
          <li>List Service Properties</li>
        </ul>
      </li>
      <li>Task Scheduling - Sample scripts for creating, modifying, and deleting scheduled jobs on a computer.<br>
        <ul>
          <li>List Scheduled Tasks</li>
        </ul>
      </li>
      <li>Version Information - Sample scripts for retrieving information about the version of Windows installed on a computer.<br>
        <ul>
          <li>List Operating System Properties</li>
      </ul>
      </li>
    </ul>
  </li>
  <li>Other Directory Services - Sample scripts for managing directory services other than Active Directory.<br>
    <ul>
      <li>Local Accounts and Windows NT 4.0 Accounts - Sample scripts for managing user and group accounts on local computers and in Windows NT 4.0 domains.<br>
        <ul>
          <li>Groups - Sample scripts for managing security groups on local computers and/or in Windows NT 4.0 domains.<br>
            <ul>
              <li>List Group Information</li>
           </ul>
          </li>
          <li>User Accounts - Sample scripts for managing user accounts on local computers and/or in Windows NT 4.0 domains.<br>
            <ul>
              <li>List User Account Information</li>
           </ul>
          </li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Printing - Sample scripts for managing printers, print jobs, print servers, and other parts of the Windows printing infrastructure.<br>
    <ul>
      <li>Print Servers, Print Queues, and Print Jobs - Sample scripts for managing print servers, print queues, and individual print jobs.<br>
        <ul>
          <li>List Print Job Information</li>
          <li>List Printer Capabilities</li>
          <li>List Printer Information</li>
        </ul>
      </li>
      <li>Printer Ports and Printer Drivers - Sample scripts for retrieving information about and for configuring printer ports and printer drivers on a computer.<br>
        <ul>
          <li>List Printer Drivers</li>
          <li>List Printer Port Properties</li>
        </ul>
       </li>
     </ul>
  </li>
  <li>Scripting Techniques - Sample scripts demonstrating a wide variety of scripting tips, tricks, and techniques useful to script writers.<br>
    <ul>
      <li>Dates and Times - Sample scripts for manipulating dates and times, particularly the UTC times used by WMI.<br>
        <ul>
          <li>List the UTC Time on a Computer</li>
       </ul>
      </li>
      <li>WMI - Sample scripts for retrieving information about objects that can be used in WMI scripts.<br>
        <ul>
          <li>List WMI Setting Information</li>
       </ul>
      </li>
    </ul>
  </li>
  <li>Service Packs and Hot Fixes - Sample scripts for retrieving information about service packs and hot fixes installed on a computer.<br>
    <ul>
      <li>List Installed Hot Fixes</li>
   </ul>
  </li>
  <li>Storage - Sample scripts for managing files, folders, file systems, and storage devices.<br>
    <ul>
      <li>Disk Drives and Volumes</li>
      <li>Disk Quotas</li>
      <li>Folders</li>
      <li>Shared Folders</li>
    </ul>
  </li>
  <li>Terminal Server - Sample scripts for managing Windows Terminal Server.<br>
    <ul>
      <li>Retrieving Terminal Server Properties - Sample scripts for retrieving information about Terminal Server configuration settings.<br>
        <ul>
          <li>List Terminal Service Service Properties</li>
          <li>List Terminal Services Accounts</li>
          <li>List Terminal Services Client Settings</li>
          <li>List Terminal Services Environment Settings</li>
          <li>List Terminal Services General Settings</li>
          <li>List Terminal Services Logon Settings</li>
          <li>List Terminal Services Network Adapter List Settings</li>
          <li>List Terminal Services Network Adapter Settings</li>
          <li>List Terminal Services Permission Settings</li>
          <li>List Terminal Services Remote Control Settings</li>
          <li>List Terminal Services Session Directory Settings</li>
          <li>List Terminal Services Session Settings</li>
          <li>List Terminal Services Terminal Settings</li>
          <li>List Terminal Services Terminals</li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070223_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070222_01.htm">
		<title><![CDATA[Windows PowerShell にチャレンジ (4)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/dotNet/20070222_01.htm</link>
		<description><![CDATA[Windows PowerShell のリファレンス  Windows PowerShell の演算子や変数の取り扱い、制御文などの詳細を知りたい場合はドキュメントパックをダウンロードする。  下のリンク先のページにある "Files in This Download" の "WindowsPowerShell_Localized_DocumentationPack.zip" をダウンロードすると日本語のドキュメントを入手できる。      Windows PowerShell 1.0 Documentation Pack    http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F  リファレンスの内容  ドキュメントパックでは以下のファイルが提供されている。      gettingStarted.rtf ・・・ Windows PowerShell ファースト ステップ ガイド    quadfold.rtf ・・・ Windows PowerShell ランゲージ クイック リファレンス    releaseNotes.rtf ・・・ Windows PowerShell V1.0 (.NET Framework 2.0 RTM 用) Release Notes    userGuide.rtf ・・・ Windows PowerShell 入門    とりあえず、演算子や制御文などはクイックリファレンスを見ると手っ取り早い。  もう少し細かくオブジェクトのことを知りたい場合は入門を参照。    とりあえず foreach が使えることが分かったので、Get-Command で試してみた。  PS C:\&gt; foreach($command in Get-Command){if($command.Name.contains("Get-")){$command}}CommandType     Name                            Definition-----------     ----                            ----------Cmdlet          Get-Acl                         Get-Acl [[-Path] &lt;String[]&gt;]...Cmdlet          Get-Alias                       Get-Alias [[-Name] &lt;String[]...Cmdlet          Get-AuthenticodeSignature       Get-AuthenticodeSignature [-...Cmdlet          Get-ChildItem                   Get-ChildItem [[-Path] &lt;Stri...Cmdlet          Get-Command                     Get-Command [[-ArgumentList]...Cmdlet          Get-Content                     Get-Content [-Path] &lt;String[...Cmdlet          Get-Credential                  Get-Credential [-Credential]...Cmdlet          Get-Culture                     Get-Culture [-Verbose] [-Deb...Cmdlet          Get-Date                        Get-Date [[-Date] &lt;DateTime&gt;...Cmdlet          Get-EventLog                    Get-EventLog [-LogName] &lt;Str...Cmdlet          Get-ExecutionPolicy             Get-ExecutionPolicy [-Verbos...Cmdlet          Get-Help                        Get-Help [[-Name] &lt;String&gt;] ...Cmdlet          Get-History                     Get-History [[-Id] &lt;Int64[]&gt;...Cmdlet          Get-Host                        Get-Host [-Verbose] [-Debug]...Cmdlet          Get-Item                        Get-Item [-Path] &lt;String[]&gt; ...Cmdlet          Get-ItemProperty                Get-ItemProperty [-Path] &lt;St...Cmdlet          Get-Location                    Get-Location [-PSProvider &lt;S...Cmdlet          Get-Member                      Get-Member [[-Name] &lt;String[...Cmdlet          Get-PfxCertificate              Get-PfxCertificate [-FilePat...Cmdlet          Get-Process                     Get-Process [[-Name] &lt;String...Cmdlet          Get-PSDrive                     Get-PSDrive [[-Name] &lt;String...Cmdlet          Get-PSProvider                  Get-PSProvider [[-PSProvider...Cmdlet          Get-PSSnapin                    Get-PSSnapin [[-Name] &lt;Strin...Cmdlet          Get-Service                     Get-Service [[-Name] &lt;String...Cmdlet          Get-TraceSource                 Get-TraceSource [[-Name] &lt;St...Cmdlet          Get-UICulture                   Get-UICulture [-Verbose] [-D...Cmdlet          Get-Unique                      Get-Unique [-InputObject &lt;PS...Cmdlet          Get-Variable                    Get-Variable [[-Name] &lt;Strin...Cmdlet          Get-WmiObject                   Get-WmiObject [-Class] &lt;Stri...PS C:\&gt;  ]]></description>
		<dc:subject>dotNet</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-22T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Windows PowerShell のリファレンス</h4>
<p>
  Windows PowerShell の演算子や変数の取り扱い、制御文などの詳細を知りたい場合はドキュメントパックをダウンロードする。
  下のリンク先のページにある "Files in This Download" の "WindowsPowerShell_Localized_DocumentationPack.zip" をダウンロードすると日本語のドキュメントを入手できる。
  <dl>
    <dt>Windows PowerShell 1.0 Documentation Pack</dt>
    <dd><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F">http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F</a></dd>
  </dl>
</p>
<h4>リファレンスの内容</h4>
<p>
  ドキュメントパックでは以下のファイルが提供されている。
  <ul>
    <li>gettingStarted.rtf ・・・ Windows PowerShell ファースト ステップ ガイド</li>
    <li>quadfold.rtf ・・・ Windows PowerShell ランゲージ クイック リファレンス</li>
    <li>releaseNotes.rtf ・・・ Windows PowerShell V1.0 (.NET Framework 2.0 RTM 用) Release Notes</li>
    <li>userGuide.rtf ・・・ Windows PowerShell 入門</li>
  </ul>
  とりあえず、演算子や制御文などはクイックリファレンスを見ると手っ取り早い。
  もう少し細かくオブジェクトのことを知りたい場合は入門を参照。<br>
  <br>
  とりあえず foreach が使えることが分かったので、Get-Command で試してみた。
  <blockquote>
<pre>
PS C:\&gt; foreach($command in Get-Command){if($command.Name.contains("Get-")){$co
mmand}}

CommandType     Name                            Definition
-----------     ----                            ----------
Cmdlet          Get-Acl                         Get-Acl [[-Path] &lt;String[]&gt;]...
Cmdlet          Get-Alias                       Get-Alias [[-Name] &lt;String[]...
Cmdlet          Get-AuthenticodeSignature       Get-AuthenticodeSignature [-...
Cmdlet          Get-ChildItem                   Get-ChildItem [[-Path] &lt;Stri...
Cmdlet          Get-Command                     Get-Command [[-ArgumentList]...
Cmdlet          Get-Content                     Get-Content [-Path] &lt;String[...
Cmdlet          Get-Credential                  Get-Credential [-Credential]...
Cmdlet          Get-Culture                     Get-Culture [-Verbose] [-Deb...
Cmdlet          Get-Date                        Get-Date [[-Date] &lt;DateTime&gt;...
Cmdlet          Get-EventLog                    Get-EventLog [-LogName] &lt;Str...
Cmdlet          Get-ExecutionPolicy             Get-ExecutionPolicy [-Verbos...
Cmdlet          Get-Help                        Get-Help [[-Name] &lt;String&gt;] ...
Cmdlet          Get-History                     Get-History [[-Id] &lt;Int64[]&gt;...
Cmdlet          Get-Host                        Get-Host [-Verbose] [-Debug]...
Cmdlet          Get-Item                        Get-Item [-Path] &lt;String[]&gt; ...
Cmdlet          Get-ItemProperty                Get-ItemProperty [-Path] &lt;St...
Cmdlet          Get-Location                    Get-Location [-PSProvider &lt;S...
Cmdlet          Get-Member                      Get-Member [[-Name] &lt;String[...
Cmdlet          Get-PfxCertificate              Get-PfxCertificate [-FilePat...
Cmdlet          Get-Process                     Get-Process [[-Name] &lt;String...
Cmdlet          Get-PSDrive                     Get-PSDrive [[-Name] &lt;String...
Cmdlet          Get-PSProvider                  Get-PSProvider [[-PSProvider...
Cmdlet          Get-PSSnapin                    Get-PSSnapin [[-Name] &lt;Strin...
Cmdlet          Get-Service                     Get-Service [[-Name] &lt;String...
Cmdlet          Get-TraceSource                 Get-TraceSource [[-Name] &lt;St...
Cmdlet          Get-UICulture                   Get-UICulture [-Verbose] [-D...
Cmdlet          Get-Unique                      Get-Unique [-InputObject &lt;PS...
Cmdlet          Get-Variable                    Get-Variable [[-Name] &lt;Strin...
Cmdlet          Get-WmiObject                   Get-WmiObject [-Class] &lt;Stri...


PS C:\&gt;
</pre>
  </blockquote>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070222_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070221_01.htm">
		<title><![CDATA[Windows PowerShell にチャレンジ (3)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/dotNet/20070221_01.htm</link>
		<description><![CDATA[Windows PowerShell のヘルプ機能  コマンドの使用方法が良く分からないものも多数あるので、ヘルプを表示してみる。  PS C:\&gt; Help Get-DateNAME    Get-DateSYNOPSIS    Gets the current date and time.SYNTAX    Get-Date [[-date] &lt;DateTime&gt;] [-displayHint {&lt;Date&gt; | &lt;Time&gt; | &lt;DateTime&gt;}]     [-format &lt;string&gt;] [-year &lt;int&gt;] [-month &lt;int&gt;] [-day &lt;int&gt;] [-hour &lt;int&gt;]     [-minute &lt;int&gt;] [-second &lt;int&gt;] [&lt;CommonParameters&gt;]    Get-Date [[-date] &lt;DateTime&gt;] [-displayHint {&lt;Date&gt; | &lt;Time&gt; | &lt;DateTime&gt;}]     [-uFormat &lt;string&gt;] [-year &lt;int&gt;] [-month &lt;int&gt;] [-day &lt;int&gt;] [-hour &lt;int&gt;    ] [-minute &lt;int&gt;] [-second &lt;int&gt;] [&lt;CommonParameters&gt;]DETAILED DESCRIPTION    Gets the current date and time.RELATED LINKS    Set-Date    New-TimeSpanREMARKS    For more information, type: "get-help Get-Date -detailed".    For technical information, type: "get-help Get-Date -full".PS C:\&gt;    ということで、Get-Date の使用方法が分かったので、ちょっと使ってみる。  PS C:\&gt; Get-Date -format yyyy2007PS C:\&gt; Get-Date -format yyyyMMdd20070129PS C:\&gt; Get-Date -format yyyyMMddHHmmss20070129013010PS C:\&gt;    ちなみに、UNIX 風に問い合わせてみると、  PS C:\&gt; man dateName                       Category                   Synopsis----                       --------                   --------Get-Date                   Cmdlet                     Gets the current date ...Set-Date                   Cmdlet                     Changes the system tim...    となった。やはり "Get-Help Get-Date" で問い合わせてくれ、ということなのだろう。]]></description>
		<dc:subject>dotNet</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-21T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Windows PowerShell のヘルプ機能</h4>
<p>
  コマンドの使用方法が良く分からないものも多数あるので、ヘルプを表示してみる。
  <blockquote>
<pre>
PS C:\&gt; Help Get-Date

NAME
    Get-Date

SYNOPSIS
    Gets the current date and time.


SYNTAX
    Get-Date [[-date] &lt;DateTime&gt;] [-displayHint {&lt;Date&gt; | &lt;Time&gt; | &lt;DateTime&gt;}]
     [-format &lt;string&gt;] [-year &lt;int&gt;] [-month &lt;int&gt;] [-day &lt;int&gt;] [-hour &lt;int&gt;]
     [-minute &lt;int&gt;] [-second &lt;int&gt;] [&lt;CommonParameters&gt;]

    Get-Date [[-date] &lt;DateTime&gt;] [-displayHint {&lt;Date&gt; | &lt;Time&gt; | &lt;DateTime&gt;}]
     [-uFormat &lt;string&gt;] [-year &lt;int&gt;] [-month &lt;int&gt;] [-day &lt;int&gt;] [-hour &lt;int&gt;
    ] [-minute &lt;int&gt;] [-second &lt;int&gt;] [&lt;CommonParameters&gt;]


DETAILED DESCRIPTION
    Gets the current date and time.


RELATED LINKS
    Set-Date
    New-TimeSpan

REMARKS
    For more information, type: "get-help Get-Date -detailed".
    For technical information, type: "get-help Get-Date -full".

PS C:\&gt;
</pre>
  </blockquote>
  ということで、Get-Date の使用方法が分かったので、ちょっと使ってみる。
  <blockquote>
<pre>
PS C:\&gt; Get-Date -format yyyy
2007
PS C:\&gt; Get-Date -format yyyyMMdd
20070129
PS C:\&gt; Get-Date -format yyyyMMddHHmmss
20070129013010
PS C:\&gt;
</pre>
  </blockquote>
  ちなみに、UNIX 風に問い合わせてみると、
  <blockquote>
<pre>
PS C:\&gt; man date

Name                       Category                   Synopsis
----                       --------                   --------
Get-Date                   Cmdlet                     Gets the current date ...
Set-Date                   Cmdlet                     Changes the system tim...
</pre>
  </blockquote>
  となった。やはり "Get-Help Get-Date" で問い合わせてくれ、ということなのだろう。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070221_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070218_01.htm">
		<title><![CDATA[Windows PowerShell にチャレンジ (2)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/dotNet/20070218_01.htm</link>
		<description><![CDATA[Windows PowerShell のコマンド一覧  Get-Command でコマンド一覧を表示できる。  .Net を使ったことがないので馴染みの無いコマンドばかり。  機能を類推し易い命名になっているので有り難い。  PS C:\&gt; Get-Command | sortCommandType     Name                            Definition-----------     ----                            ----------Cmdlet          Add-Content                     Add-Content [-Path] &lt;String[...Cmdlet          Add-History                     Add-History [[-InputObject] ...Cmdlet          Add-Member                      Add-Member [-MemberType] &lt;PS...Cmdlet          Add-PSSnapin                    Add-PSSnapin [-Name] &lt;String...Cmdlet          Clear-Content                   Clear-Content [-Path] &lt;Strin...Cmdlet          Clear-Item                      Clear-Item [-Path] &lt;String[]...Cmdlet          Clear-ItemProperty              Clear-ItemProperty [-Path] &lt;...Cmdlet          Clear-Variable                  Clear-Variable [-Name] &lt;Stri...Cmdlet          Compare-Object                  Compare-Object [-ReferenceOb...Cmdlet          ConvertFrom-SecureString        ConvertFrom-SecureString [-S...Cmdlet          Convert-Path                    Convert-Path [-Path] &lt;String...Cmdlet          ConvertTo-Html                  ConvertTo-Html [[-Property] ...Cmdlet          ConvertTo-SecureString          ConvertTo-SecureString [-Str...Cmdlet          Copy-Item                       Copy-Item [-Path] &lt;String[]&gt;...Cmdlet          Copy-ItemProperty               Copy-ItemProperty [-Path] &lt;S...Cmdlet          Export-Alias                    Export-Alias [-Path] &lt;String...Cmdlet          Export-Clixml                   Export-Clixml [-Path] &lt;Strin...Cmdlet          Export-Console                  Export-Console [[-Path] &lt;Str...Cmdlet          Export-Csv                      Export-Csv [-Path] &lt;String&gt; ...Cmdlet          ForEach-Object                  ForEach-Object [-Process] &lt;S...Cmdlet          Format-Custom                   Format-Custom [[-Property] &lt;...Cmdlet          Format-List                     Format-List [[-Property] &lt;Ob...Cmdlet          Format-Table                    Format-Table [[-Property] &lt;O...Cmdlet          Format-Wide                     Format-Wide [[-Property] &lt;Ob...Cmdlet          Get-Acl                         Get-Acl [[-Path] &lt;String[]&gt;]...Cmdlet          Get-Alias                       Get-Alias [[-Name] &lt;String[]...Cmdlet          Get-AuthenticodeSignature       Get-AuthenticodeSignature [-...Cmdlet          Get-ChildItem                   Get-ChildItem [[-Path] &lt;Stri...Cmdlet          Get-Command                     Get-Command [[-ArgumentList]...Cmdlet          Get-Content                     Get-Content [-Path] &lt;String[...Cmdlet          Get-Credential                  Get-Credential [-Credential]...Cmdlet          Get-Culture                     Get-Culture [-Verbose] [-Deb...Cmdlet          Get-Date                        Get-Date [[-Date] &lt;DateTime&gt;...Cmdlet          Get-EventLog                    Get-EventLog [-LogName] &lt;Str...Cmdlet          Get-ExecutionPolicy             Get-ExecutionPolicy [-Verbos...Cmdlet          Get-Help                        Get-Help [[-Name] &lt;String&gt;] ...Cmdlet          Get-History                     Get-History [[-Id] &lt;Int64[]&gt;...Cmdlet          Get-Host                        Get-Host [-Verbose] [-Debug]...Cmdlet          Get-Item                        Get-Item [-Path] &lt;String[]&gt; ...Cmdlet          Get-ItemProperty                Get-ItemProperty [-Path] &lt;St...Cmdlet          Get-Location                    Get-Location [-PSProvider &lt;S...Cmdlet          Get-Member                      Get-Member [[-Name] &lt;String[...Cmdlet          Get-PfxCertificate              Get-PfxCertificate [-FilePat...Cmdlet          Get-Process                     Get-Process [[-Name] &lt;String...Cmdlet          Get-PSDrive                     Get-PSDrive [[-Name] &lt;String...Cmdlet          Get-PSProvider                  Get-PSProvider [[-PSProvider...Cmdlet          Get-PSSnapin                    Get-PSSnapin [[-Name] &lt;Strin...Cmdlet          Get-Service                     Get-Service [[-Name] &lt;String...Cmdlet          Get-TraceSource                 Get-TraceSource [[-Name] &lt;St...Cmdlet          Get-UICulture                   Get-UICulture [-Verbose] [-D...Cmdlet          Get-Unique                      Get-Unique [-InputObject &lt;PS...Cmdlet          Get-Variable                    Get-Variable [[-Name] &lt;Strin...Cmdlet          Get-WmiObject                   Get-WmiObject [-Class] &lt;Stri...Cmdlet          Group-Object                    Group-Object [[-Property] &lt;O...Cmdlet          Import-Alias                    Import-Alias [-Path] &lt;String...Cmdlet          Import-Clixml                   Import-Clixml [-Path] &lt;Strin...Cmdlet          Import-Csv                      Import-Csv [-Path] &lt;String[]...Cmdlet          Invoke-Expression               Invoke-Expression [-Command]...Cmdlet          Invoke-History                  Invoke-History [[-Id] &lt;Strin...Cmdlet          Invoke-Item                     Invoke-Item [-Path] &lt;String[...Cmdlet          Join-Path                       Join-Path [-Path] &lt;String[]&gt;...Cmdlet          Measure-Command                 Measure-Command [-Expression...Cmdlet          Measure-Object                  Measure-Object [[-Property] ...Cmdlet          Move-Item                       Move-Item [-Path] &lt;String[]&gt;...Cmdlet          Move-ItemProperty               Move-ItemProperty [-Path] &lt;S...Cmdlet          New-Alias                       New-Alias [-Name] &lt;String&gt; [...Cmdlet          New-Item                        New-Item [-Path] &lt;String[]&gt; ...Cmdlet          New-ItemProperty                New-ItemProperty [-Path] &lt;St...Cmdlet          New-Object                      New-Object [-TypeName] &lt;Stri...Cmdlet          New-PSDrive                     New-PSDrive [-Name] &lt;String&gt;...Cmdlet          New-Service                     New-Service [-Name] &lt;String&gt;...Cmdlet          New-TimeSpan                    New-TimeSpan [[-Start] &lt;Date...Cmdlet          New-Variable                    New-Variable [-Name] &lt;String...Cmdlet          Out-Default                     Out-Default [-InputObject &lt;P...Cmdlet          Out-File                        Out-File [-FilePath] &lt;String...Cmdlet          Out-Host                        Out-Host [-Paging] [-InputOb...Cmdlet          Out-Null                        Out-Null [-InputObject &lt;PSOb...Cmdlet          Out-Printer                     Out-Printer [[-Name] &lt;String...Cmdlet          Out-String                      Out-String [-Stream] [-Width...Cmdlet          Pop-Location                    Pop-Location [-PassThru] [-S...Cmdlet          Push-Location                   Push-Location [[-Path] &lt;Stri...Cmdlet          Read-Host                       Read-Host [[-Prompt] &lt;Object...Cmdlet          Remove-Item                     Remove-Item [-Path] &lt;String[...Cmdlet          Remove-ItemProperty             Remove-ItemProperty [-Path] ...Cmdlet          Remove-PSDrive                  Remove-PSDrive [-Name] &lt;Stri...Cmdlet          Remove-PSSnapin                 Remove-PSSnapin [-Name] &lt;Str...Cmdlet          Remove-Variable                 Remove-Variable [-Name] &lt;Str...Cmdlet          Rename-Item                     Rename-Item [-Path] &lt;String&gt;...Cmdlet          Rename-ItemProperty             Rename-ItemProperty [-Path] ...Cmdlet          Resolve-Path                    Resolve-Path [-Path] &lt;String...Cmdlet          Restart-Service                 Restart-Service [-Name] &lt;Str...Cmdlet          Resume-Service                  Resume-Service [-Name] &lt;Stri...Cmdlet          Select-Object                   Select-Object [[-Property] &lt;...Cmdlet          Select-String                   Select-String [-Pattern] &lt;St...Cmdlet          Set-Acl                         Set-Acl [-Path] &lt;String[]&gt; [...Cmdlet          Set-Alias                       Set-Alias [-Name] &lt;String&gt; [...Cmdlet          Set-AuthenticodeSignature       Set-AuthenticodeSignature [-...Cmdlet          Set-Content                     Set-Content [-Path] &lt;String[...Cmdlet          Set-Date                        Set-Date [-Date] &lt;DateTime&gt; ...Cmdlet          Set-ExecutionPolicy             Set-ExecutionPolicy [-Execut...Cmdlet          Set-Item                        Set-Item [-Path] &lt;String[]&gt; ...Cmdlet          Set-ItemProperty                Set-ItemProperty [-Path] &lt;St...Cmdlet          Set-Location                    Set-Location [[-Path] &lt;Strin...Cmdlet          Set-PSDebug                     Set-PSDebug [-Trace &lt;Int32&gt;]...Cmdlet          Set-Service                     Set-Service [-Name] &lt;String&gt;...Cmdlet          Set-TraceSource                 Set-TraceSource [-Name] &lt;Str...Cmdlet          Set-Variable                    Set-Variable [-Name] &lt;String...Cmdlet          Sort-Object                     Sort-Object [[-Property] &lt;Ob...Cmdlet          Split-Path                      Split-Path [-Path] &lt;String[]...Cmdlet          Start-Service                   Start-Service [-Name] &lt;Strin...Cmdlet          Start-Sleep                     Start-Sleep [-Seconds] &lt;Int3...Cmdlet          Start-Transcript                Start-Transcript [[-Path] &lt;S...Cmdlet          Stop-Process                    Stop-Process [-Id] &lt;Int32[]&gt;...Cmdlet          Stop-Service                    Stop-Service [-Name] &lt;String...Cmdlet          Stop-Transcript                 Stop-Transcript [-Verbose] [...Cmdlet          Suspend-Service                 Suspend-Service [-Name] &lt;Str...Cmdlet          Tee-Object                      Tee-Object [-FilePath] &lt;Stri...Cmdlet          Test-Path                       Test-Path [-Path] &lt;String[]&gt;...Cmdlet          Trace-Command                   Trace-Command [-Name] &lt;Strin...Cmdlet          Update-FormatData               Update-FormatData [[-AppendP...Cmdlet          Update-TypeData                 Update-TypeData [[-AppendPat...Cmdlet          Where-Object                    Where-Object [-FilterScript]...Cmdlet          Write-Debug                     Write-Debug [-Message] &lt;Stri...Cmdlet          Write-Error                     Write-Error [-Message] &lt;Stri...Cmdlet          Write-Host                      Write-Host [[-Object] &lt;Objec...Cmdlet          Write-Output                    Write-Output [-InputObject] ...Cmdlet          Write-Progress                  Write-Progress [-Activity] &lt;...Cmdlet          Write-Verbose                   Write-Verbose [-Message] &lt;St...Cmdlet          Write-Warning                   Write-Warning [-Message] &lt;St...PS C:\&gt;  Windows PowerShell のエイリアス一覧  Get-Alias でコマンドに割り当てられたエイリアスを一覧表示できる。  UNIX 系コマンドをかなり意識したエイリアスがデフォルトで用意されているので、UNIX に慣れていればエイリアスが便利そう。  PS C:\&gt; Get-Alias | sortCommandType     Name                            Definition-----------     ----                            ----------Alias           %                               ForEach-ObjectAlias           ?                               Where-ObjectAlias           ac                              Add-ContentAlias           asnp                            Add-PSSnapinAlias           cat                             Get-ContentAlias           cd                              Set-LocationAlias           chdir                           Set-LocationAlias           clc                             Clear-ContentAlias           clear                           Clear-HostAlias           cli                             Clear-ItemAlias           clp                             Clear-ItemPropertyAlias           cls                             Clear-HostAlias           clv                             Clear-VariableAlias           copy                            Copy-ItemAlias           cp                              Copy-ItemAlias           cpi                             Copy-ItemAlias           cpp                             Copy-ItemPropertyAlias           cvpa                            Convert-PathAlias           del                             Remove-ItemAlias           diff                            Compare-ObjectAlias           dir                             Get-ChildItemAlias           echo                            Write-OutputAlias           epal                            Export-AliasAlias           epcsv                           Export-CsvAlias           erase                           Remove-ItemAlias           fc                              Format-CustomAlias           fl                              Format-ListAlias           foreach                         ForEach-ObjectAlias           ft                              Format-TableAlias           fw                              Format-WideAlias           gal                             Get-AliasAlias           gc                              Get-ContentAlias           gci                             Get-ChildItemAlias           gcm                             Get-CommandAlias           gdr                             Get-PSDriveAlias           ghy                             Get-HistoryAlias           gi                              Get-ItemAlias           gl                              Get-LocationAlias           gm                              Get-MemberAlias           gp                              Get-ItemPropertyAlias           gps                             Get-ProcessAlias           group                           Group-ObjectAlias           gsnp                            Get-PSSnapinAlias           gsv                             Get-ServiceAlias           gu                              Get-UniqueAlias           gv                              Get-VariableAlias           gwmi                            Get-WmiObjectAlias           h                               Get-HistoryAlias           history                         Get-HistoryAlias           iex                             Invoke-ExpressionAlias           ihy                             Invoke-HistoryAlias           ii                              Invoke-ItemAlias           ipal                            Import-AliasAlias           ipcsv                           Import-CsvAlias           kill                            Stop-ProcessAlias           lp                              Out-PrinterAlias           ls                              Get-ChildItemAlias           mi                              Move-ItemAlias           mount                           New-PSDriveAlias           move                            Move-ItemAlias           mp                              Move-ItemPropertyAlias           mv                              Move-ItemAlias           nal                             New-AliasAlias           ndr                             New-PSDriveAlias           ni                              New-ItemAlias           nv                              New-VariableAlias           oh                              Out-HostAlias           popd                            Pop-LocationAlias           ps                              Get-ProcessAlias           pushd                           Push-LocationAlias           pwd                             Get-LocationAlias           r                               Invoke-HistoryAlias           rd                              Remove-ItemAlias           rdr                             Remove-PSDriveAlias           ren                             Rename-ItemAlias           ri                              Remove-ItemAlias           rm                              Remove-ItemAlias           rmdir                           Remove-ItemAlias           rni                             Rename-ItemAlias           rnp                             Rename-ItemPropertyAlias           rp                              Remove-ItemPropertyAlias           rsnp                            Remove-PSSnapinAlias           rv                              Remove-VariableAlias           rvpa                            Resolve-PathAlias           sal                             Set-AliasAlias           sasv                            Start-ServiceAlias           sc                              Set-ContentAlias           select                          Select-ObjectAlias           set                             Set-VariableAlias           si                              Set-ItemAlias           sl                              Set-LocationAlias           sleep                           Start-SleepAlias           sort                            Sort-ObjectAlias           sp                              Set-ItemPropertyAlias           spps                            Stop-ProcessAlias           spsv                            Stop-ServiceAlias           sv                              Set-VariableAlias           tee                             Tee-ObjectAlias           type                            Get-ContentAlias           where                           Where-ObjectAlias           write                           Write-OutputPS C:\&gt;  Windows PowerShell のコマンドを試してみる  試しに Get-Service を実行してサービスの一覧を表示してみた。  PS C:\&gt; Get-ServiceStatus   Name               DisplayName------   ----               -----------Stopped  Alerter            AlerterRunning  ALG                Application Layer Gateway ServiceStopped  AppMgmt            Application ManagementStopped  aspnet_state       ASP.NET State ServiceRunning  AudioSrv           Windows Audio　　　　(略)Running  wscsvc             Security CenterRunning  wuauserv           Automatic UpdatesStopped  WZCSVC             Wireless Zero ConfigurationStopped  xmlprov            Network Provisioning ServicePS C:\&gt;    きちんとサービスがリストアップされた(当たり前か)。  サービスの開始や停止も試してみることに。  PS C:\&gt; Start-Service ThemesPS C:\&gt; Get-Service ThemesStatus   Name               DisplayName------   ----               -----------Running  Themes             ThemesPS C:\&gt; Stop-Service ThemesPS C:\&gt; Get-Service ThemesStatus   Name               DisplayName------   ----               -----------Stopped  Themes             ThemesPS C:\&gt;    非常に簡単にサービスの開始や停止ができた。  便利。]]></description>
		<dc:subject>dotNet</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-18T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Windows PowerShell のコマンド一覧</h4>
<p>
  Get-Command でコマンド一覧を表示できる。
  .Net を使ったことがないので馴染みの無いコマンドばかり。
  機能を類推し易い命名になっているので有り難い。
  <blockquote>
<pre>
PS C:\&gt; Get-Command | sort

CommandType     Name                            Definition
-----------     ----                            ----------
Cmdlet          Add-Content                     Add-Content [-Path] &lt;String[...
Cmdlet          Add-History                     Add-History [[-InputObject] ...
Cmdlet          Add-Member                      Add-Member [-MemberType] &lt;PS...
Cmdlet          Add-PSSnapin                    Add-PSSnapin [-Name] &lt;String...
Cmdlet          Clear-Content                   Clear-Content [-Path] &lt;Strin...
Cmdlet          Clear-Item                      Clear-Item [-Path] &lt;String[]...
Cmdlet          Clear-ItemProperty              Clear-ItemProperty [-Path] &lt;...
Cmdlet          Clear-Variable                  Clear-Variable [-Name] &lt;Stri...
Cmdlet          Compare-Object                  Compare-Object [-ReferenceOb...
Cmdlet          ConvertFrom-SecureString        ConvertFrom-SecureString [-S...
Cmdlet          Convert-Path                    Convert-Path [-Path] &lt;String...
Cmdlet          ConvertTo-Html                  ConvertTo-Html [[-Property] ...
Cmdlet          ConvertTo-SecureString          ConvertTo-SecureString [-Str...
Cmdlet          Copy-Item                       Copy-Item [-Path] &lt;String[]&gt;...
Cmdlet          Copy-ItemProperty               Copy-ItemProperty [-Path] &lt;S...
Cmdlet          Export-Alias                    Export-Alias [-Path] &lt;String...
Cmdlet          Export-Clixml                   Export-Clixml [-Path] &lt;Strin...
Cmdlet          Export-Console                  Export-Console [[-Path] &lt;Str...
Cmdlet          Export-Csv                      Export-Csv [-Path] &lt;String&gt; ...
Cmdlet          ForEach-Object                  ForEach-Object [-Process] &lt;S...
Cmdlet          Format-Custom                   Format-Custom [[-Property] &lt;...
Cmdlet          Format-List                     Format-List [[-Property] &lt;Ob...
Cmdlet          Format-Table                    Format-Table [[-Property] &lt;O...
Cmdlet          Format-Wide                     Format-Wide [[-Property] &lt;Ob...
Cmdlet          Get-Acl                         Get-Acl [[-Path] &lt;String[]&gt;]...
Cmdlet          Get-Alias                       Get-Alias [[-Name] &lt;String[]...
Cmdlet          Get-AuthenticodeSignature       Get-AuthenticodeSignature [-...
Cmdlet          Get-ChildItem                   Get-ChildItem [[-Path] &lt;Stri...
Cmdlet          Get-Command                     Get-Command [[-ArgumentList]...
Cmdlet          Get-Content                     Get-Content [-Path] &lt;String[...
Cmdlet          Get-Credential                  Get-Credential [-Credential]...
Cmdlet          Get-Culture                     Get-Culture [-Verbose] [-Deb...
Cmdlet          Get-Date                        Get-Date [[-Date] &lt;DateTime&gt;...
Cmdlet          Get-EventLog                    Get-EventLog [-LogName] &lt;Str...
Cmdlet          Get-ExecutionPolicy             Get-ExecutionPolicy [-Verbos...
Cmdlet          Get-Help                        Get-Help [[-Name] &lt;String&gt;] ...
Cmdlet          Get-History                     Get-History [[-Id] &lt;Int64[]&gt;...
Cmdlet          Get-Host                        Get-Host [-Verbose] [-Debug]...
Cmdlet          Get-Item                        Get-Item [-Path] &lt;String[]&gt; ...
Cmdlet          Get-ItemProperty                Get-ItemProperty [-Path] &lt;St...
Cmdlet          Get-Location                    Get-Location [-PSProvider &lt;S...
Cmdlet          Get-Member                      Get-Member [[-Name] &lt;String[...
Cmdlet          Get-PfxCertificate              Get-PfxCertificate [-FilePat...
Cmdlet          Get-Process                     Get-Process [[-Name] &lt;String...
Cmdlet          Get-PSDrive                     Get-PSDrive [[-Name] &lt;String...
Cmdlet          Get-PSProvider                  Get-PSProvider [[-PSProvider...
Cmdlet          Get-PSSnapin                    Get-PSSnapin [[-Name] &lt;Strin...
Cmdlet          Get-Service                     Get-Service [[-Name] &lt;String...
Cmdlet          Get-TraceSource                 Get-TraceSource [[-Name] &lt;St...
Cmdlet          Get-UICulture                   Get-UICulture [-Verbose] [-D...
Cmdlet          Get-Unique                      Get-Unique [-InputObject &lt;PS...
Cmdlet          Get-Variable                    Get-Variable [[-Name] &lt;Strin...
Cmdlet          Get-WmiObject                   Get-WmiObject [-Class] &lt;Stri...
Cmdlet          Group-Object                    Group-Object [[-Property] &lt;O...
Cmdlet          Import-Alias                    Import-Alias [-Path] &lt;String...
Cmdlet          Import-Clixml                   Import-Clixml [-Path] &lt;Strin...
Cmdlet          Import-Csv                      Import-Csv [-Path] &lt;String[]...
Cmdlet          Invoke-Expression               Invoke-Expression [-Command]...
Cmdlet          Invoke-History                  Invoke-History [[-Id] &lt;Strin...
Cmdlet          Invoke-Item                     Invoke-Item [-Path] &lt;String[...
Cmdlet          Join-Path                       Join-Path [-Path] &lt;String[]&gt;...
Cmdlet          Measure-Command                 Measure-Command [-Expression...
Cmdlet          Measure-Object                  Measure-Object [[-Property] ...
Cmdlet          Move-Item                       Move-Item [-Path] &lt;String[]&gt;...
Cmdlet          Move-ItemProperty               Move-ItemProperty [-Path] &lt;S...
Cmdlet          New-Alias                       New-Alias [-Name] &lt;String&gt; [...
Cmdlet          New-Item                        New-Item [-Path] &lt;String[]&gt; ...
Cmdlet          New-ItemProperty                New-ItemProperty [-Path] &lt;St...
Cmdlet          New-Object                      New-Object [-TypeName] &lt;Stri...
Cmdlet          New-PSDrive                     New-PSDrive [-Name] &lt;String&gt;...
Cmdlet          New-Service                     New-Service [-Name] &lt;String&gt;...
Cmdlet          New-TimeSpan                    New-TimeSpan [[-Start] &lt;Date...
Cmdlet          New-Variable                    New-Variable [-Name] &lt;String...
Cmdlet          Out-Default                     Out-Default [-InputObject &lt;P...
Cmdlet          Out-File                        Out-File [-FilePath] &lt;String...
Cmdlet          Out-Host                        Out-Host [-Paging] [-InputOb...
Cmdlet          Out-Null                        Out-Null [-InputObject &lt;PSOb...
Cmdlet          Out-Printer                     Out-Printer [[-Name] &lt;String...
Cmdlet          Out-String                      Out-String [-Stream] [-Width...
Cmdlet          Pop-Location                    Pop-Location [-PassThru] [-S...
Cmdlet          Push-Location                   Push-Location [[-Path] &lt;Stri...
Cmdlet          Read-Host                       Read-Host [[-Prompt] &lt;Object...
Cmdlet          Remove-Item                     Remove-Item [-Path] &lt;String[...
Cmdlet          Remove-ItemProperty             Remove-ItemProperty [-Path] ...
Cmdlet          Remove-PSDrive                  Remove-PSDrive [-Name] &lt;Stri...
Cmdlet          Remove-PSSnapin                 Remove-PSSnapin [-Name] &lt;Str...
Cmdlet          Remove-Variable                 Remove-Variable [-Name] &lt;Str...
Cmdlet          Rename-Item                     Rename-Item [-Path] &lt;String&gt;...
Cmdlet          Rename-ItemProperty             Rename-ItemProperty [-Path] ...
Cmdlet          Resolve-Path                    Resolve-Path [-Path] &lt;String...
Cmdlet          Restart-Service                 Restart-Service [-Name] &lt;Str...
Cmdlet          Resume-Service                  Resume-Service [-Name] &lt;Stri...
Cmdlet          Select-Object                   Select-Object [[-Property] &lt;...
Cmdlet          Select-String                   Select-String [-Pattern] &lt;St...
Cmdlet          Set-Acl                         Set-Acl [-Path] &lt;String[]&gt; [...
Cmdlet          Set-Alias                       Set-Alias [-Name] &lt;String&gt; [...
Cmdlet          Set-AuthenticodeSignature       Set-AuthenticodeSignature [-...
Cmdlet          Set-Content                     Set-Content [-Path] &lt;String[...
Cmdlet          Set-Date                        Set-Date [-Date] &lt;DateTime&gt; ...
Cmdlet          Set-ExecutionPolicy             Set-ExecutionPolicy [-Execut...
Cmdlet          Set-Item                        Set-Item [-Path] &lt;String[]&gt; ...
Cmdlet          Set-ItemProperty                Set-ItemProperty [-Path] &lt;St...
Cmdlet          Set-Location                    Set-Location [[-Path] &lt;Strin...
Cmdlet          Set-PSDebug                     Set-PSDebug [-Trace &lt;Int32&gt;]...
Cmdlet          Set-Service                     Set-Service [-Name] &lt;String&gt;...
Cmdlet          Set-TraceSource                 Set-TraceSource [-Name] &lt;Str...
Cmdlet          Set-Variable                    Set-Variable [-Name] &lt;String...
Cmdlet          Sort-Object                     Sort-Object [[-Property] &lt;Ob...
Cmdlet          Split-Path                      Split-Path [-Path] &lt;String[]...
Cmdlet          Start-Service                   Start-Service [-Name] &lt;Strin...
Cmdlet          Start-Sleep                     Start-Sleep [-Seconds] &lt;Int3...
Cmdlet          Start-Transcript                Start-Transcript [[-Path] &lt;S...
Cmdlet          Stop-Process                    Stop-Process [-Id] &lt;Int32[]&gt;...
Cmdlet          Stop-Service                    Stop-Service [-Name] &lt;String...
Cmdlet          Stop-Transcript                 Stop-Transcript [-Verbose] [...
Cmdlet          Suspend-Service                 Suspend-Service [-Name] &lt;Str...
Cmdlet          Tee-Object                      Tee-Object [-FilePath] &lt;Stri...
Cmdlet          Test-Path                       Test-Path [-Path] &lt;String[]&gt;...
Cmdlet          Trace-Command                   Trace-Command [-Name] &lt;Strin...
Cmdlet          Update-FormatData               Update-FormatData [[-AppendP...
Cmdlet          Update-TypeData                 Update-TypeData [[-AppendPat...
Cmdlet          Where-Object                    Where-Object [-FilterScript]...
Cmdlet          Write-Debug                     Write-Debug [-Message] &lt;Stri...
Cmdlet          Write-Error                     Write-Error [-Message] &lt;Stri...
Cmdlet          Write-Host                      Write-Host [[-Object] &lt;Objec...
Cmdlet          Write-Output                    Write-Output [-InputObject] ...
Cmdlet          Write-Progress                  Write-Progress [-Activity] &lt;...
Cmdlet          Write-Verbose                   Write-Verbose [-Message] &lt;St...
Cmdlet          Write-Warning                   Write-Warning [-Message] &lt;St...


PS C:\&gt;
</pre>
  </blockquote>
</p>
<h4>Windows PowerShell のエイリアス一覧</h4>
<p>
  Get-Alias でコマンドに割り当てられたエイリアスを一覧表示できる。
  UNIX 系コマンドをかなり意識したエイリアスがデフォルトで用意されているので、UNIX に慣れていればエイリアスが便利そう。
  <blockquote>
<pre>
PS C:\&gt; Get-Alias | sort

CommandType     Name                            Definition
-----------     ----                            ----------
Alias           %                               ForEach-Object
Alias           ?                               Where-Object
Alias           ac                              Add-Content
Alias           asnp                            Add-PSSnapin
Alias           cat                             Get-Content
Alias           cd                              Set-Location
Alias           chdir                           Set-Location
Alias           clc                             Clear-Content
Alias           clear                           Clear-Host
Alias           cli                             Clear-Item
Alias           clp                             Clear-ItemProperty
Alias           cls                             Clear-Host
Alias           clv                             Clear-Variable
Alias           copy                            Copy-Item
Alias           cp                              Copy-Item
Alias           cpi                             Copy-Item
Alias           cpp                             Copy-ItemProperty
Alias           cvpa                            Convert-Path
Alias           del                             Remove-Item
Alias           diff                            Compare-Object
Alias           dir                             Get-ChildItem
Alias           echo                            Write-Output
Alias           epal                            Export-Alias
Alias           epcsv                           Export-Csv
Alias           erase                           Remove-Item
Alias           fc                              Format-Custom
Alias           fl                              Format-List
Alias           foreach                         ForEach-Object
Alias           ft                              Format-Table
Alias           fw                              Format-Wide
Alias           gal                             Get-Alias
Alias           gc                              Get-Content
Alias           gci                             Get-ChildItem
Alias           gcm                             Get-Command
Alias           gdr                             Get-PSDrive
Alias           ghy                             Get-History
Alias           gi                              Get-Item
Alias           gl                              Get-Location
Alias           gm                              Get-Member
Alias           gp                              Get-ItemProperty
Alias           gps                             Get-Process
Alias           group                           Group-Object
Alias           gsnp                            Get-PSSnapin
Alias           gsv                             Get-Service
Alias           gu                              Get-Unique
Alias           gv                              Get-Variable
Alias           gwmi                            Get-WmiObject
Alias           h                               Get-History
Alias           history                         Get-History
Alias           iex                             Invoke-Expression
Alias           ihy                             Invoke-History
Alias           ii                              Invoke-Item
Alias           ipal                            Import-Alias
Alias           ipcsv                           Import-Csv
Alias           kill                            Stop-Process
Alias           lp                              Out-Printer
Alias           ls                              Get-ChildItem
Alias           mi                              Move-Item
Alias           mount                           New-PSDrive
Alias           move                            Move-Item
Alias           mp                              Move-ItemProperty
Alias           mv                              Move-Item
Alias           nal                             New-Alias
Alias           ndr                             New-PSDrive
Alias           ni                              New-Item
Alias           nv                              New-Variable
Alias           oh                              Out-Host
Alias           popd                            Pop-Location
Alias           ps                              Get-Process
Alias           pushd                           Push-Location
Alias           pwd                             Get-Location
Alias           r                               Invoke-History
Alias           rd                              Remove-Item
Alias           rdr                             Remove-PSDrive
Alias           ren                             Rename-Item
Alias           ri                              Remove-Item
Alias           rm                              Remove-Item
Alias           rmdir                           Remove-Item
Alias           rni                             Rename-Item
Alias           rnp                             Rename-ItemProperty
Alias           rp                              Remove-ItemProperty
Alias           rsnp                            Remove-PSSnapin
Alias           rv                              Remove-Variable
Alias           rvpa                            Resolve-Path
Alias           sal                             Set-Alias
Alias           sasv                            Start-Service
Alias           sc                              Set-Content
Alias           select                          Select-Object
Alias           set                             Set-Variable
Alias           si                              Set-Item
Alias           sl                              Set-Location
Alias           sleep                           Start-Sleep
Alias           sort                            Sort-Object
Alias           sp                              Set-ItemProperty
Alias           spps                            Stop-Process
Alias           spsv                            Stop-Service
Alias           sv                              Set-Variable
Alias           tee                             Tee-Object
Alias           type                            Get-Content
Alias           where                           Where-Object
Alias           write                           Write-Output


PS C:\&gt;
</pre>
  </blockquote>
</p>
<h4>Windows PowerShell のコマンドを試してみる</h4>
<p>
  試しに Get-Service を実行してサービスの一覧を表示してみた。
  <blockquote>
<pre>
PS C:\&gt; Get-Service

Status   Name               DisplayName
------   ----               -----------
Stopped  Alerter            Alerter
Running  ALG                Application Layer Gateway Service
Stopped  AppMgmt            Application Management
Stopped  aspnet_state       ASP.NET State Service
Running  AudioSrv           Windows Audio
　　　　(略)
Running  wscsvc             Security Center
Running  wuauserv           Automatic Updates
Stopped  WZCSVC             Wireless Zero Configuration
Stopped  xmlprov            Network Provisioning Service


PS C:\&gt;
</pre>
  </blockquote>
  きちんとサービスがリストアップされた(当たり前か)。
  サービスの開始や停止も試してみることに。
  <blockquote>
<pre>
PS C:\&gt; Start-Service Themes
PS C:\&gt; Get-Service Themes

Status   Name               DisplayName
------   ----               -----------
Running  Themes             Themes


PS C:\&gt; Stop-Service Themes
PS C:\&gt; Get-Service Themes

Status   Name               DisplayName
------   ----               -----------
Stopped  Themes             Themes


PS C:\&gt;
</pre>
  </blockquote>
  非常に簡単にサービスの開始や停止ができた。
  便利。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070218_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070216_01.htm">
		<title><![CDATA[Windows PowerShell にチャレンジ (1)]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/dotNet/20070216_01.htm</link>
		<description><![CDATA[Windows PowerShell とは  Windows PowerShell は、Windows のコマンドライン機能を強化したものらしい。  要するに、cmd.exe の機能強化版ということだろう。  Windows PowerShell の公式サイトによると、  Microsoft Windows PowerShell command line shell and scripting language helps IT Professionals achieve greater productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT Professionals to more easily control system administration and accelerate automation.     というものだそうだ。  未だにバッチファイルで何とか凌いでいた(何ともならない場合は Linux (^^;) ので、Windows PowerShell を少し勉強してみることに。      Windows PowerShell Web Site    http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx    Windows PowerShell Blog    http://blogs.msdn.com/powershell/    Knowledge Base Article    http://support.microsoft.com/kb/926139    Windows PowerShell SDK    http://msdn2.microsoft.com/en-us/library/aa830112.aspx    @IT - 次世代Windowsシェル「Windows PowerShell」を試す    http://www.atmarkit.co.jp/fdotnet/special/powershell01/powershell01_01.html  Windows PowerShell のインストール  Windows PowerShell は最近 1.0 がリリースされたばかりの様だが、Windows Vista だけでなく Windows XP 版も用意されている。  素晴らしい。  とりあえず Windows Vista 環境が無いので、Windows XP Professional 環境に Windows PowerShell をインストールしてみた。  インストール手順は以下の通り。      .Net Framework 2.0 をインストール。Microsoft .NET Framework Version 2.0 Redistributable Package (x86)からアーカイブをダウンロードしてインストール。    Windows PowerShell 1.0 をインストール。Windows PowerShell 1.0 English-Language Installation Package for Windows XP (KB926139)からアーカイブをダウンロードする。              Windows PowerShell のダウンロードをするためには Genuine Check をする必要がある。指示に従い GenuineCheck.exe をダウンロードして実行する。        GenuineCheck で表示されるコードをダウンロードサイトに入力すると Windows PowerShell のアーカイブ WindowsXP-KB926139-x86-ENU.exe がダウンロードできる。        WindowsXP-KB926139-x86-ENU.exe を実行し、後はインストーラの指示に従い Windows PowerShell をインストールする。                        Windows PowerShell の実行  Windows PowerShell のインストーラがスタートメニューにも登録してくれるが、一々面倒なので「ファイル名を指定して実行」から "powershell.exe" を実行しても良い。  一見 cmd.exe と変わらないウィンドウが表示されるが、コマンドプロンプトの前に "PS" が付いているので Windows PowerShell が実行されていることが分かる。          とりあえず使用できるコマンド一覧を表示してみる。  PS C:\&gt; Get-Command | sortCommandType     Name                            Definition-----------     ----                            ----------Cmdlet          Add-Content                     Add-Content [-Path] &lt;String[...Cmdlet          Add-History                     Add-History [[-InputObject] ...Cmdlet          Add-Member                      Add-Member [-MemberType] &lt;PS...Cmdlet          Add-PSSnapin                    Add-PSSnapin [-Name] &lt;String...Cmdlet          Clear-Content                   Clear-Content [-Path] &lt;Strin...Cmdlet          Clear-Item                      Clear-Item [-Path] &lt;String[]...Cmdlet          Clear-ItemProperty              Clear-ItemProperty [-Path] &lt;...Cmdlet          Clear-Variable                  Clear-Variable [-Name] &lt;Stri...Cmdlet          Compare-Object                  Compare-Object [-ReferenceOb...Cmdlet          ConvertFrom-SecureString        ConvertFrom-SecureString [-S...Cmdlet          Convert-Path                    Convert-Path [-Path] &lt;String...Cmdlet          ConvertTo-Html                  ConvertTo-Html [[-Property] ...Cmdlet          ConvertTo-SecureString          ConvertTo-SecureString [-Str...Cmdlet          Copy-Item                       Copy-Item [-Path] &lt;String[]&gt;...Cmdlet          Copy-ItemProperty               Copy-ItemProperty [-Path] &lt;S...Cmdlet          Export-Alias                    Export-Alias [-Path] &lt;String...         (略)    ということで、.Net Framework が提供してくれる機能をかなり利用できることが分かる。]]></description>
		<dc:subject>dotNet</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-16T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Windows PowerShell とは</h4>
<p>
  Windows PowerShell は、Windows のコマンドライン機能を強化したものらしい。
  要するに、cmd.exe の機能強化版ということだろう。
  Windows PowerShell の公式サイトによると、
  <blockquote>
Microsoft Windows PowerShell command line shell and scripting language helps IT Professionals achieve greater productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT Professionals to more easily control system administration and accelerate automation. 
  </blockquote>
  というものだそうだ。
  未だにバッチファイルで何とか凌いでいた(何ともならない場合は Linux (^^;) ので、Windows PowerShell を少し勉強してみることに。
  <dl>
    <dt>Windows PowerShell Web Site</dt>
    <dd><a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx</a></dd>
    <dt>Windows PowerShell Blog</dt>
    <dd><a href="http://blogs.msdn.com/powershell/">http://blogs.msdn.com/powershell/</a></dd>
    <dt>Knowledge Base Article</dt>
    <dd><a href="http://support.microsoft.com/kb/926139">http://support.microsoft.com/kb/926139</a></dd>
    <dt>Windows PowerShell SDK</dt>
    <dd><a href="http://msdn2.microsoft.com/en-us/library/aa830112.aspx">http://msdn2.microsoft.com/en-us/library/aa830112.aspx</a></dd>
    <dt>@IT - 次世代Windowsシェル「Windows PowerShell」を試す</dt>
    <dd><a href="http://www.atmarkit.co.jp/fdotnet/special/powershell01/powershell01_01.html">http://www.atmarkit.co.jp/fdotnet/special/powershell01/powershell01_01.html</a></dd>
  </dl>
</p>
<h4>Windows PowerShell のインストール</h4>
<p>
  Windows PowerShell は最近 1.0 がリリースされたばかりの様だが、Windows Vista だけでなく Windows XP 版も用意されている。
  素晴らしい。
  とりあえず Windows Vista 環境が無いので、Windows XP Professional 環境に Windows PowerShell をインストールしてみた。
  インストール手順は以下の通り。
  <ol>
    <li>.Net Framework 2.0 をインストール。<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5">Microsoft .NET Framework Version 2.0 Redistributable Package (x86)</a>からアーカイブをダウンロードしてインストール。</li>
    <li>Windows PowerShell 1.0 をインストール。<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6ccb7e0d-8f1d-4b97-a397-47bcc8ba3806">Windows PowerShell 1.0 English-Language Installation Package for Windows XP (KB926139)</a>からアーカイブをダウンロードする。<br>
      <ol>
        <li>Windows PowerShell のダウンロードをするためには Genuine Check をする必要がある。指示に従い GenuineCheck.exe をダウンロードして実行する。</li>
        <li>GenuineCheck で表示されるコードをダウンロードサイトに入力すると Windows PowerShell のアーカイブ WindowsXP-KB926139-x86-ENU.exe がダウンロードできる。</li>
        <li>WindowsXP-KB926139-x86-ENU.exe を実行し、後はインストーラの指示に従い Windows PowerShell をインストールする。</li>
      </ol>
    </li>
  </ol>
   <a href="/blog/entries/dotNet/20070216_01/install_01.png" title="インストール画面(1)" rel="imagebox"><img src="/blog/entries/dotNet/20070216_01/install_01.png" alt="[インストール画面(1)]" width="200"/></a>
   <a href="/blog/entries/dotNet/20070216_01/install_02.png" title="インストール画面(2)" rel="imagebox"><img src="/blog/entries/dotNet/20070216_01/install_02.png" alt="[インストール画面(2)]" width="200"/></a>
   <a href="/blog/entries/dotNet/20070216_01/install_03.png" title="インストール画面(3)" rel="imagebox"><img src="/blog/entries/dotNet/20070216_01/install_03.png" alt="[インストール画面(3)]" width="200"/></a>
   <a href="/blog/entries/dotNet/20070216_01/install_04.png" title="インストール画面(4)" rel="imagebox"><img src="/blog/entries/dotNet/20070216_01/install_04.png" alt="[インストール画面(4)]" width="200"/></a>
</p>
<h4>Windows PowerShell の実行</h4>
<p>
  Windows PowerShell のインストーラがスタートメニューにも登録してくれるが、一々面倒なので「ファイル名を指定して実行」から "powershell.exe" を実行しても良い。
  一見 cmd.exe と変わらないウィンドウが表示されるが、コマンドプロンプトの前に "PS" が付いているので Windows PowerShell が実行されていることが分かる。<br>
   <a href="/blog/entries/dotNet/20070216_01/run.png" title="Windows PowerShell 実行" rel="imagebox"><img src="/blog/entries/dotNet/20070216_01/run.png" alt="[Windows PowerShell 実行]" width="250"/></a>
   <a href="/blog/entries/dotNet/20070216_01/window.png" title="Windows PowerShell ウィンドウ" rel="imagebox"><img src="/blog/entries/dotNet/20070216_01/window.png" alt="[Windows PowerShell ウィンドウ]" width="200"/></a>
  <br>
  とりあえず使用できるコマンド一覧を表示してみる。
  <blockquote>
<pre>
PS C:\&gt; Get-Command | sort

CommandType     Name                            Definition
-----------     ----                            ----------
Cmdlet          Add-Content                     Add-Content [-Path] &lt;String[...
Cmdlet          Add-History                     Add-History [[-InputObject] ...
Cmdlet          Add-Member                      Add-Member [-MemberType] &lt;PS...
Cmdlet          Add-PSSnapin                    Add-PSSnapin [-Name] &lt;String...
Cmdlet          Clear-Content                   Clear-Content [-Path] &lt;Strin...
Cmdlet          Clear-Item                      Clear-Item [-Path] &lt;String[]...
Cmdlet          Clear-ItemProperty              Clear-ItemProperty [-Path] &lt;...
Cmdlet          Clear-Variable                  Clear-Variable [-Name] &lt;Stri...
Cmdlet          Compare-Object                  Compare-Object [-ReferenceOb...
Cmdlet          ConvertFrom-SecureString        ConvertFrom-SecureString [-S...
Cmdlet          Convert-Path                    Convert-Path [-Path] &lt;String...
Cmdlet          ConvertTo-Html                  ConvertTo-Html [[-Property] ...
Cmdlet          ConvertTo-SecureString          ConvertTo-SecureString [-Str...
Cmdlet          Copy-Item                       Copy-Item [-Path] &lt;String[]&gt;...
Cmdlet          Copy-ItemProperty               Copy-ItemProperty [-Path] &lt;S...
Cmdlet          Export-Alias                    Export-Alias [-Path] &lt;String...
         (略)
</pre>
  </blockquote>
  ということで、.Net Framework が提供してくれる機能をかなり利用できることが分かる。
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/dotNet/20070216_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070212_01.htm">
		<title><![CDATA[米国総合宅配サービス OPAS]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070212_01.htm</link>
		<description><![CDATA[  OPAS というサービスを見つけた。  米国内に住所を持てるというサービスらしい。  宅配の転送なども請け負ってくれるそうなので、Amazon.com のマーケットプレイスで米国内のみ配達可能な商品の購入もできそう。  洋書の技術書を古本で大量購入するのに使えるかも。  ただ、コスト的に折り合うかどうか・・・。  何人かで共同利用すれば元は取れるかな??      OPAS    http://www.opasexpress.com/tanomail.htm    FAQ    http://www.opasexpress.com/tanomail_faq.htm    料金    http://www.opasexpress.com/tanomail_rates.htm  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-12T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  OPAS というサービスを見つけた。
  米国内に住所を持てるというサービスらしい。
  宅配の転送なども請け負ってくれるそうなので、Amazon.com のマーケットプレイスで米国内のみ配達可能な商品の購入もできそう。
  洋書の技術書を古本で大量購入するのに使えるかも。
  ただ、コスト的に折り合うかどうか・・・。
  何人かで共同利用すれば元は取れるかな??
  <dl>
    <dt>OPAS</dt>
    <dd><a href="http://www.opasexpress.com/tanomail.htm">http://www.opasexpress.com/tanomail.htm</a></dd>
    <dt>FAQ</dt>
    <dd><a href="http://www.opasexpress.com/tanomail_faq.htm">http://www.opasexpress.com/tanomail_faq.htm</a></dd>
    <dt>料金</dt>
    <dd><a href="http://www.opasexpress.com/tanomail_rates.htm">http://www.opasexpress.com/tanomail_rates.htm</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070212_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070211_01.htm">
		<title><![CDATA[Callisto ]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070211_01.htm</link>
		<description><![CDATA[Callisto とは  Callisto は Eclipse のサブプロジェクトで、EMF、GEF、WTP、TPTP   といったプラグインを同期してリリースすることを目的としているらしい。    Callisto プロジェクトのサイトによると      Callisto is about improving the productivity of the developers working    on top of Eclipse frameworks by providing a more transparent and    predictable development cycle. By releasing 10 projects at the same    time, the goal is to eliminate uncertainty about version compatibility    and make it easier to incorporate multiple projects into your    environment.        While Callisto is about the simultaneous release of ten projects, it    is not a unification of the projects - each project remains a separate    open source project operating with its own project leadership, its own    committers, and its own project plan.      ということだそうだ。  Callisto が現在対応してくれているのは、      Business Intelligence and Reporting Tools (BIRT) Project    C/C++ IDE (CDT)    Data Tools Platform (DTP)    Eclipse Modeling Framework (EMF)    Graphical Editing Framework (GEF)    Graphical Modeling Framework (GMF)    Eclipse Project    Eclipse Test and Performance Tools Platform Project (TPTP)    Eclipse Web Tools Platform Project (WTP)    Visual Editor (VE)    で、Java EE 開発で必要なプラグインはほとんど Callisto から取得できるのが分かる。  EMF、GEF、GMF、WTP、VE を一括で管理してくれるのは嬉しい限り。  とはいえ、プラグインのダウンロードに時間がかかるのは今まで通りなのだろうな・・・。  Callisto のリポジトリをそのまま適当な非公開サーバに構築出来ると非常に便利なのだけれど。      Eclipse Callisto Project    http://www.eclipse.org/callisto/    Callisto Update Site    http://download.eclipse.org/callisto/releases/    Eclipse V3.2 Callisto では何がホットなのか    http://www-06.ibm.com/jp/developerworks/opensource/library/os-ecl-callisto/index.shtml  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-11T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<h4>Callisto とは</h4>
<p>
  Callisto は Eclipse のサブプロジェクトで、EMF、GEF、WTP、TPTP 
  といったプラグインを同期してリリースすることを目的としているらしい。
  <br>
  Callisto プロジェクトのサイトによると
  <blockquote>
    Callisto is about improving the productivity of the developers working
    on top of Eclipse frameworks by providing a more transparent and
    predictable development cycle. By releasing 10 projects at the same
    time, the goal is to eliminate uncertainty about version compatibility
    and make it easier to incorporate multiple projects into your
    environment.<br>
    <br>
    While Callisto is about the simultaneous release of ten projects, it
    is not a unification of the projects - each project remains a separate
    open source project operating with its own project leadership, its own
    committers, and its own project plan.
  </blockquote>
  <br>
  ということだそうだ。
</p>
<p>
  Callisto が現在対応してくれているのは、
  <ul>
    <li>Business Intelligence and Reporting Tools (BIRT) Project</li>
    <li>C/C++ IDE (CDT)</li>
    <li>Data Tools Platform (DTP)</li>
    <li>Eclipse Modeling Framework (EMF)</li>
    <li>Graphical Editing Framework (GEF)</li>
    <li>Graphical Modeling Framework (GMF)</li>
    <li>Eclipse Project</li>
    <li>Eclipse Test and Performance Tools Platform Project (TPTP)</li>
    <li>Eclipse Web Tools Platform Project (WTP)</li>
    <li>Visual Editor (VE)</li>
  </ul>
  で、Java EE 開発で必要なプラグインはほとんど Callisto から取得できるのが分かる。
  EMF、GEF、GMF、WTP、VE を一括で管理してくれるのは嬉しい限り。
  とはいえ、プラグインのダウンロードに時間がかかるのは今まで通りなのだろうな・・・。
  Callisto のリポジトリをそのまま適当な非公開サーバに構築出来ると非常に便利なのだけれど。
</p>
<p>
  <dl>
    <dt>Eclipse Callisto Project</dt>
    <dd><a href="http://www.eclipse.org/callisto/">http://www.eclipse.org/callisto/</a></dd>
    <dt>Callisto Update Site</dt>
    <dd><a href="http://download.eclipse.org/callisto/releases/">http://download.eclipse.org/callisto/releases/</a></dd>
    <dt>Eclipse V3.2 Callisto では何がホットなのか</dt>
    <dd><a href="http://www-06.ibm.com/jp/developerworks/opensource/library/os-ecl-callisto/index.shtml">http://www-06.ibm.com/jp/developerworks/opensource/library/os-ecl-callisto/index.shtml</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070211_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070209_01.htm">
		<title><![CDATA[Apache Struts Platform Requirements]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070209_01.htm</link>
		<description><![CDATA[  Apache Struts の動作環境をまとめてみた。  まとまった資料が見つからなかったので。    Servlet  JSP  J2SE(Java SE)  Apache Struts 2.0.x  2.4 ～  2.0 ～  5.0 ～  Apache Struts 1.3.x  2.3 ～  1.2 ～  1.4 ～  Apache Struts 1.2.x  2.2 ～  1.1 ～  1.3 ～  Apache Struts 1.1.x  2.2 ～  1.1 ～  1.3 ～  Apache Struts 1.0.x  2.2 ～  1.1 ～  1.2 ～]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-09T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  <a href="http://struts.apache.org/">Apache Struts</a> の動作環境をまとめてみた。
  まとまった資料が見つからなかったので。
</p>
<table border="1">
<tr>
  <td></td>
  <td>Servlet</td>
  <td>JSP</td>
  <td>J2SE(Java SE)</td>
</tr>
<tr>
  <td>Apache Struts 2.0.x</td>
  <td>2.4 ～</td>
  <td>2.0 ～</td>
  <td>5.0 ～</td>
</tr>
<tr>
  <td>Apache Struts 1.3.x</td>
  <td>2.3 ～</td>
  <td>1.2 ～</td>
  <td>1.4 ～</td>
</tr>
<tr>
  <td>Apache Struts 1.2.x</td>
  <td>2.2 ～</td>
  <td>1.1 ～</td>
  <td>1.3 ～</td>
</tr>
<tr>
  <td>Apache Struts 1.1.x</td>
  <td>2.2 ～</td>
  <td>1.1 ～</td>
  <td>1.3 ～</td>
</tr>
<tr>
  <td>Apache Struts 1.0.x</td>
  <td>2.2 ～</td>
  <td>1.1 ～</td>
  <td>1.2 ～</td>
</tr>
</table>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070209_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070208_01.htm">
		<title><![CDATA[Apache Struts Release Notes]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070208_01.htm</link>
		<description><![CDATA[  Apache Struts のリリースノートは結構仕事で参照するのだけれど、  場所が分かりづらくていつも右往左往する。というわけで、とりあえずメモ。・・・と言っても、新しいバージョンがリリースされたらまた URL が変わるのだろうな、この感じだと orz2.0.x  2.0.5  http://struts.apache.org/2.0.5/docs/release-notes-205.html  2.0.4  http://struts.apache.org/2.0.5/docs/release-notes-204.html  2.0.3  http://struts.apache.org/2.0.5/docs/release-notes-203.html  2.0.2  http://struts.apache.org/2.0.5/docs/release-notes-202.html  2.0.1  http://struts.apache.org/2.0.5/docs/release-notes-201.html  2.0.0  http://struts.apache.org/2.0.5/docs/release-notes-200.html1.3.x  1.3.5  http://struts.apache.org/1.3.5/userGuide/release-notes.html  1.3.3  http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_3.html  1.3.2  http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_2.html  1.3.1  http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_1.html1.2.x  1.2.9  http://struts.apache.org/1.2.9/userGuide/release-notes.html  1.2.8  http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.8.html  1.2.7  http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.7.html  1.2.4  http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.4.html1.1.x  1.1  http://struts.apache.org/1.1/userGuide/release-notes-1.1.html  1.1 RC2  http://struts.apache.org/1.1/userGuide/release-notes-1.1-rc2.html  1.1 RC1  http://struts.apache.org/1.1/userGuide/release-notes-1.1-rc1.html  1.1 b2  http://struts.apache.org/1.1/userGuide/release-notes-1.1-b2.html1.0.x  1.0.2  http://struts.apache.org/1.0.2/release-notes-1.0.2.html  1.0.1  http://struts.apache.org/1.0.2/release-notes-1.0.1.html  1.0  http://struts.apache.org/1.0.2/release-notes-1.0.html  1.0 b3  http://struts.apache.org/1.0.2/release-notes-1.0-b3.html  1.0 b2  http://struts.apache.org/1.0.2/release-notes-1.0-b2.html  1.0 b1  http://struts.apache.org/1.0.2/release-notes-1.0-b1.html]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-08T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  <a href="http://struts.apache.org/">Apache Struts</a> のリリースノートは結構仕事で参照するのだけれど、
  場所が分かりづらくていつも右往左往する。というわけで、とりあえずメモ。・・・と言っても、新しいバージョンがリリースされたらまた URL が変わるのだろうな、この感じだと orz
</p>
<h4>2.0.x</h4>
<dl>
  <dt>2.0.5</dt>
  <dd><a href="http://struts.apache.org/2.0.5/docs/release-notes-205.html">http://struts.apache.org/2.0.5/docs/release-notes-205.html</a></dd>
  <dt>2.0.4</dt>
  <dd><a href="http://struts.apache.org/2.0.5/docs/release-notes-204.html">http://struts.apache.org/2.0.5/docs/release-notes-204.html</a></dd>
  <dt>2.0.3</dt>
  <dd><a href="http://struts.apache.org/2.0.5/docs/release-notes-203.html">http://struts.apache.org/2.0.5/docs/release-notes-203.html</a></dd>
  <dt>2.0.2</dt>
  <dd><a href="http://struts.apache.org/2.0.5/docs/release-notes-202.html">http://struts.apache.org/2.0.5/docs/release-notes-202.html</a></dd>
  <dt>2.0.1</dt>
  <dd><a href="http://struts.apache.org/2.0.5/docs/release-notes-201.html">http://struts.apache.org/2.0.5/docs/release-notes-201.html</a></dd>
  <dt>2.0.0</dt>
  <dd><a href="http://struts.apache.org/2.0.5/docs/release-notes-200.html">http://struts.apache.org/2.0.5/docs/release-notes-200.html</a></dd>
</dl>

<h4>1.3.x</h4>
<dl>
  <dt>1.3.5</dt>
  <dd><a href="http://struts.apache.org/1.3.5/userGuide/release-notes.html">http://struts.apache.org/1.3.5/userGuide/release-notes.html</a></dd>
  <dt>1.3.3</dt>
  <dd><a href="http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_3.html">http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_3.html</a></dd>
  <dt>1.3.2</dt>
  <dd><a href="http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_2.html">http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_2.html</a></dd>
  <dt>1.3.1</dt>
  <dd><a href="http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_1.html">http://struts.apache.org/1.3.5/userGuide/release-notes-1_3_1.html</a></dd>
</dl>

<h4>1.2.x</h4>
<dl>
  <dt>1.2.9</dt>
  <dd><a href="http://struts.apache.org/1.2.9/userGuide/release-notes.html">http://struts.apache.org/1.2.9/userGuide/release-notes.html</a></dd>
  <dt>1.2.8</dt>
  <dd><a href="http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.8.html">http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.8.html</a></dd>
  <dt>1.2.7</dt>
  <dd><a href="http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.7.html">http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.7.html</a></dd>
  <dt>1.2.4</dt>
  <dd><a href="http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.4.html">http://struts.apache.org/1.2.9/userGuide/release-notes-1.2.4.html</a></dd>
</dl>

<h4>1.1.x</h4>
<dl>
  <dt>1.1</dt>
  <dd><a href="http://struts.apache.org/1.1/userGuide/release-notes-1.1.html">http://struts.apache.org/1.1/userGuide/release-notes-1.1.html</a></dd>
  <dt>1.1 RC2</dt>
  <dd><a href="http://struts.apache.org/1.1/userGuide/release-notes-1.1-rc2.html">http://struts.apache.org/1.1/userGuide/release-notes-1.1-rc2.html</a></dd>
  <dt>1.1 RC1</dt>
  <dd><a href="http://struts.apache.org/1.1/userGuide/release-notes-1.1-rc1.html">http://struts.apache.org/1.1/userGuide/release-notes-1.1-rc1.html</a></dd>
  <dt>1.1 b2</dt>
  <dd><a href="http://struts.apache.org/1.1/userGuide/release-notes-1.1-b2.html">http://struts.apache.org/1.1/userGuide/release-notes-1.1-b2.html</a></dd>
</dl>

<h4>1.0.x</h4>
<dl>
  <dt>1.0.2</dt>
  <dd><a href="http://struts.apache.org/1.0.2/release-notes-1.0.2.html">http://struts.apache.org/1.0.2/release-notes-1.0.2.html</a></dd>
  <dt>1.0.1</dt>
  <dd><a href="http://struts.apache.org/1.0.2/release-notes-1.0.1.html">http://struts.apache.org/1.0.2/release-notes-1.0.1.html</a></dd>
  <dt>1.0</dt>
  <dd><a href="http://struts.apache.org/1.0.2/release-notes-1.0.html">http://struts.apache.org/1.0.2/release-notes-1.0.html</a></dd>
  <dt>1.0 b3</dt>
  <dd><a href="http://struts.apache.org/1.0.2/release-notes-1.0-b3.html">http://struts.apache.org/1.0.2/release-notes-1.0-b3.html</a></dd>
  <dt>1.0 b2</dt>
  <dd><a href="http://struts.apache.org/1.0.2/release-notes-1.0-b2.html">http://struts.apache.org/1.0.2/release-notes-1.0-b2.html</a></dd>
  <dt>1.0 b1</dt>
  <dd><a href="http://struts.apache.org/1.0.2/release-notes-1.0-b1.html">http://struts.apache.org/1.0.2/release-notes-1.0-b1.html</a></dd>
</dl>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070208_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070206_01.htm">
		<title><![CDATA[J2EE (Java EE) を構成する仕様一覧]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070206_01.htm</link>
		<description><![CDATA[  J2EE (Java EE) は複数の仕様で構成されているが、Java EE 5 まで来ると仕様が多すぎる && 仕様のバージョンアップが入り乱れているといった理由で非常に憶えづらい。  というわけで、一度整理してみた。  Java EE 5 Technologies  http://java.sun.com/javaee/technologies/  J2EE 1.4 Document  http://java.sun.com/j2ee/1.4/docs/index.html  J2EE 1.3_01 Release Notes  http://java.sun.com/j2ee/sdk_1.3/1.3_01/techdocs/release/ReleaseNotes.html  J2EE 1.2.1 Release Notes  http://java.sun.com/j2ee/sdk_1.2.1/techdocs/release/ReleaseNotes.htmlJ2EE (Java EE) を構成する仕様一覧Java EE 5  Web Services Technologies          Implementing Enterprise Web Services (JSR 109)      Java API for XML-Based Web Services (JAX-WS) 2.0 (JSR 224)      Java API for XML-Based RPC (JAX-RPC) 1.1 (JSR 101)      Java Architecture for XML Binding (JAXB) 2.0 (JSR 222)      SOAP with Attachments API for Java (SAAJ) (JSR 67)      Streaming API for XML (JSR 173)      Web Service Metadata for the Java Platform (JSR 181)        Web Application Technologies          Java Servlet 2.5 (JSR 154)      JavaServer Faces 1.2 (JSR 252)      JavaServer Pages 2.1 (JSR 245)      JavaServer Pages Standard Tag Library (JSR 52)        Enterprise Application Technologies          Enterprise JavaBeans 3.0 (JSR 220)      J2EE Connector Architecture 1.5 (JSR 112)      Common Annotations for the Java Platform (JSR 250)      Java Message Service API (JSR 914)      Java Persistence API (JSR 220)      Java Transaction API (JTA) (JSR 907)      JavaBeans Activation Framework (JAF) 1.1 (JSR 925)      JavaMail (JSR 919)        Management and Security Technologies          J2EE Application Deployment (JSR 88)      J2EE Management (JSR 77)      Java Authorization Contract for Containers (JSR 115)      J2EE 1.4  J2EE Connector Specification 1.5  J2EE Deployment API Specification 1.1  J2EE Management Specification 1.0  Enterprise JavaBeans Specification 2.1  Enterprise JavaBeans to CORBA Mapping 1.1  Java API for XML Processing Specification 1.2  Java API for XML Registries Specification 1.0  Java API for XML-based RPC Specification 1.1  Java Authorization Contract for Containers 1.0  Java IDL API  Java Naming and Directory Interface Specification 1.2.1  Java Message Service Specification 1.1  Java Servlet Specification 2.4  Java Transaction API Specification 1.0.1B  Java Transaction Service Specification 1.0  JDBC Specifications, 3.0, 2.1, and Optional Package API (2.0)  JavaBeans Activation Framework Specification 1.0.2  JavaMail API Specification 1.3  JavaServer Pages Specification 2.0  RMI over IIOP  SOAP with Attachments API for Java Specification 1.2 J2EE 1.3_01  HTTP and HTTPS  COS naming   Enterprise JavaBeansTM (EJB) 2.0   JavaTM Servlets 2.3  JavaServer PagesTM (JSP) 1.2  JavaTM Messaging Service (JMS) 1.0.2  J2EETM Connector 1.0  JDBCTM Standard Extension 2.0  JavaTM Transaction API (JTA) 1.0  JavaMailTM 1.2  JavaTM API for XML Parsing (JAXP) 1.1J2EE 1.2.1  Enterprise JavaBeansTM API, v. 1.1  JavaTM Servlets, v. 2.2  JavaServer PagesTM technology, v. 1.1  JDBCTM Standard Extension, v. 2.0  Java Naming and Directory InterfaceTM API, v. 1.2 (CosNaming SPI)  RMI/IIOP  JavaTM Transaction API, v. 1.0  JavaMailTM API, v. 1.1  JavaTM Messaging Service, v. 1.0 (API only, no implementation)]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-06T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  J2EE (Java EE) は複数の仕様で構成されているが、Java EE 5 まで来ると仕様が多すぎる && 仕様のバージョンアップが入り乱れているといった理由で非常に憶えづらい。
  というわけで、一度整理してみた。
</p>
<dl>
  <dt>Java EE 5 Technologies</dt>
  <dd><a href="http://java.sun.com/javaee/technologies/">http://java.sun.com/javaee/technologies/</a></dd>
  <dt>J2EE 1.4 Document</dt>
  <dd><a href="http://java.sun.com/j2ee/1.4/docs/index.html">http://java.sun.com/j2ee/1.4/docs/index.html</a></dd>
  <dt>J2EE 1.3_01 Release Notes</dt>
  <dd><a href="http://java.sun.com/j2ee/sdk_1.3/1.3_01/techdocs/release/ReleaseNotes.html">http://java.sun.com/j2ee/sdk_1.3/1.3_01/techdocs/release/ReleaseNotes.html</a></dd>
  <dt>J2EE 1.2.1 Release Notes</dt>
  <dd><a href="http://java.sun.com/j2ee/sdk_1.2.1/techdocs/release/ReleaseNotes.html">http://java.sun.com/j2ee/sdk_1.2.1/techdocs/release/ReleaseNotes.html</a></dd>
</dl>
<h4>J2EE (Java EE) を構成する仕様一覧</h4>
<h5>Java EE 5</h5>
<ul>
  <li>Web Services Technologies<br>
    <ul>
      <li>Implementing Enterprise Web Services (JSR 109)</li>
      <li>Java API for XML-Based Web Services (JAX-WS) 2.0 (JSR 224)</li>
      <li>Java API for XML-Based RPC (JAX-RPC) 1.1 (JSR 101)</li>
      <li>Java Architecture for XML Binding (JAXB) 2.0 (JSR 222)</li>
      <li>SOAP with Attachments API for Java (SAAJ) (JSR 67)</li>
      <li>Streaming API for XML (JSR 173)</li>
      <li>Web Service Metadata for the Java Platform (JSR 181)</li>
    </ul>
  </li>
  <li>Web Application Technologies<br>
    <ul>
      <li>Java Servlet 2.5 (JSR 154)</li>
      <li>JavaServer Faces 1.2 (JSR 252)</li>
      <li>JavaServer Pages 2.1 (JSR 245)</li>
      <li>JavaServer Pages Standard Tag Library (JSR 52)</li>
    </ul>
  </li>
  <li>Enterprise Application Technologies<br>
    <ul>
      <li>Enterprise JavaBeans 3.0 (JSR 220)</li>
      <li>J2EE Connector Architecture 1.5 (JSR 112)</li>
      <li>Common Annotations for the Java Platform (JSR 250)</li>
      <li>Java Message Service API (JSR 914)</li>
      <li>Java Persistence API (JSR 220)</li>
      <li>Java Transaction API (JTA) (JSR 907)</li>
      <li>JavaBeans Activation Framework (JAF) 1.1 (JSR 925)</li>
      <li>JavaMail (JSR 919)</li>
    </ul>
  </li>
  <li>Management and Security Technologies<br>
    <ul>
      <li>J2EE Application Deployment (JSR 88)</li>
      <li>J2EE Management (JSR 77)</li>
      <li>Java Authorization Contract for Containers (JSR 115)</li>
    </ul>
  </li>
</ul>
<h5>J2EE 1.4</h5>
<ul>
  <li>J2EE Connector Specification 1.5</li>
  <li>J2EE Deployment API Specification 1.1</li>
  <li>J2EE Management Specification 1.0</li>
  <li>Enterprise JavaBeans Specification 2.1</li>
  <li>Enterprise JavaBeans to CORBA Mapping 1.1</li>
  <li>Java API for XML Processing Specification 1.2</li>
  <li>Java API for XML Registries Specification 1.0</li>
  <li>Java API for XML-based RPC Specification 1.1</li>
  <li>Java Authorization Contract for Containers 1.0</li>
  <li>Java IDL API</li>
  <li>Java Naming and Directory Interface Specification 1.2.1</li>
  <li>Java Message Service Specification 1.1</li>
  <li>Java Servlet Specification 2.4</li>
  <li>Java Transaction API Specification 1.0.1B</li>
  <li>Java Transaction Service Specification 1.0</li>
  <li>JDBC Specifications, 3.0, 2.1, and Optional Package API (2.0)</li>
  <li>JavaBeans Activation Framework Specification 1.0.2</li>
  <li>JavaMail API Specification 1.3</li>
  <li>JavaServer Pages Specification 2.0</li>
  <li>RMI over IIOP</li>
  <li>SOAP with Attachments API for Java Specification 1.2 </li>
</ul>
<h5>J2EE 1.3_01</h5>
<ul>
  <li>HTTP and HTTPS</li>
  <li>COS naming </li>
  <li>Enterprise JavaBeansTM (EJB) 2.0 </li>
  <li>JavaTM Servlets 2.3</li>
  <li>JavaServer PagesTM (JSP) 1.2</li>
  <li>JavaTM Messaging Service (JMS) 1.0.2</li>
  <li>J2EETM Connector 1.0</li>
  <li>JDBCTM Standard Extension 2.0</li>
  <li>JavaTM Transaction API (JTA) 1.0</li>
  <li>JavaMailTM 1.2</li>
  <li>JavaTM API for XML Parsing (JAXP) 1.1</li>
</ul>
<h5>J2EE 1.2.1</h5>
<ul>
  <li>Enterprise JavaBeansTM API, v. 1.1</li>
  <li>JavaTM Servlets, v. 2.2</li>
  <li>JavaServer PagesTM technology, v. 1.1</li>
  <li>JDBCTM Standard Extension, v. 2.0</li>
  <li>Java Naming and Directory InterfaceTM API, v. 1.2 (CosNaming SPI)</li>
  <li>RMI/IIOP</li>
  <li>JavaTM Transaction API, v. 1.0</li>
  <li>JavaMailTM API, v. 1.1</li>
  <li>JavaTM Messaging Service, v. 1.0 (API only, no implementation)</li>
</ul>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070206_01.trackback"/>
	</item>
	<item rdf:about="http://www.in-vitro.jp/blog/index.cgi/Misc/20070201_01.htm">
		<title><![CDATA[Google Mini がやってきた]]></title>
		<link>http://www.in-vitro.jp/blog/index.cgi/Misc/20070201_01.htm</link>
		<description><![CDATA[  と言っても自宅にではなくて会社に。当然か。  以前プロジェクトで導入したいと思ったことがあったのだけれど、そのときは未だ日本法人で取り扱っていなくて断念。    先日ふと会社のマシンルームに入ってみると、見慣れない筐体が。  しかも、Google と書いてある。                 早速担当の人に声をかけて少し遊ばせてもらった。  まだ国内では導入実績が少ないのか色々問題含みではあるようだが、なかなか面白い。  小規模検索なら、コストパフォーマンスも性能も良いので、一つの選択肢にはなるだろう。           後、オマケで Google Mini T シャツが付いてきたのも結構嬉しい。                  Google Mini    http://www.google.co.jp/enterprise/mini/  ]]></description>
		<dc:subject>Misc</dc:subject>
		<dc:creator>in-vitro (mailto:)</dc:creator>
		<dc:date>2007-02-01T00:00+09:00</dc:date>
		<content:encoded><![CDATA[
<p>
  と言っても自宅にではなくて会社に。当然か。
  以前プロジェクトで導入したいと思ったことがあったのだけれど、そのときは未だ日本法人で取り扱っていなくて断念。
  <br>
  先日ふと会社のマシンルームに入ってみると、見慣れない筐体が。
  しかも、Google と書いてある。
  <br>
   <a href="/blog/entries/Misc/20070201_01/googlemini_01.png" title="Google Mini" rel="imagebox"><img src="/blog/entries/Misc/20070201_01/googlemini_01.png" alt="[Google Mini]" width="250"/></a>
   <a href="/blog/entries/Misc/20070201_01/googlemini_02.png" title="Google Mini" rel="imagebox"><img src="/blog/entries/Misc/20070201_01/googlemini_02.png" alt="[Google Mini]" width="250"/></a>
   <a href="/blog/entries/Misc/20070201_01/googlemini_03.png" title="Google Mini" rel="imagebox"><img src="/blog/entries/Misc/20070201_01/googlemini_03.png" alt="[Google Mini]" width="250"/></a>
  <br>
  <br>
  早速担当の人に声をかけて少し遊ばせてもらった。
  まだ国内では導入実績が少ないのか色々問題含みではあるようだが、なかなか面白い。
  小規模検索なら、コストパフォーマンスも性能も良いので、一つの選択肢にはなるだろう。
  <br>
   <a href="/blog/entries/Misc/20070201_01/googlemini_04.png" title="Google Mini" rel="imagebox"><img src="/blog/entries/Misc/20070201_01/googlemini_04.png" alt="[Google Mini]" width="250"/></a>
  <br>
  <br>
  後、オマケで Google Mini T シャツが付いてきたのも結構嬉しい。
  <br>
   <a href="/blog/entries/Misc/20070201_01/googlemini_05.png" title="Google Mini" rel="imagebox"><img src="/blog/entries/Misc/20070201_01/googlemini_05.png" alt="[Google Mini]" width="150"/></a>
   <a href="/blog/entries/Misc/20070201_01/googlemini_06.png" title="Google Mini" rel="imagebox"><img src="/blog/entries/Misc/20070201_01/googlemini_06.png" alt="[Google Mini]" width="150"/></a>
  <br>
  <br>
  <dl>
    <dt>Google Mini</dt>
    <dd><a href="http://www.google.co.jp/enterprise/mini/">http://www.google.co.jp/enterprise/mini/</a></dd>
  </dl>
</p>]]></content:encoded>
		<trackback:ping rdf:resource="http://www.in-vitro.jp/blog/index.cgi/Misc/20070201_01.trackback"/>
	</item>
</rdf:RDF>

