<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>あり &#187; maven</title>
	<atom:link href="http://blog.4sure.jp/yokoshima/tag/maven/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.4sure.jp/yokoshima</link>
	<description>日常を語る普通の人のブログ</description>
	<lastBuildDate>Tue, 24 Aug 2010 11:49:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.4sure.jp/yokoshima/tag/maven/feed/" />
		<item>
		<title>Mavenのローカルリポジトリの場所変更</title>
		<link>http://blog.4sure.jp/yokoshima/2009/08/27/maven%e3%81%ae%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%81%ae%e5%a0%b4%e6%89%80%e5%a4%89%e6%9b%b4/</link>
		<comments>http://blog.4sure.jp/yokoshima/2009/08/27/maven%e3%81%ae%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%81%ae%e5%a0%b4%e6%89%80%e5%a4%89%e6%9b%b4/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 13:09:51 +0000</pubDate>
		<dc:creator>yokoshima</dc:creator>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[localRepository]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://blog.4sure.jp/yokoshima/?p=815</guid>
		<description><![CDATA[現在使っているPCのCドライブの使用量が多くて逼迫してます。
基本的にはアプリケーションはCドライブ以外にインストールするようにしてるのですが、MicorosoftやAdobeやAppleの製品は共有ファイルとかいってCドライブに何かしらを配置してくれます。
Cドライブの使用量を減らしたいので、思いついたところから別ドライブに移して行こうと思うのですが、Mavenのローカルリポジトリ（デフォルト~/.m2/repository、つまりWindows VistaならC:\Users\ユーザ名\.m2）が、8GB位取っていたのでDドライブに移動したいと思います。

C:\Windows\system32&#62;mvn -version
Maven version: 2.0.9
Java version: 1.6.0_14
OS name: &#34;windows vista&#34; version: &#34;6.0&#34; arch: &#34;x86&#34; Family: &#34;windows&#34;

ローカルリポジトリの設定は、%MAVEN_HOME%\conf\settings.xmlに記載があるので、
そこの「localRepository」の設定を記載します。（D:\Work\MavenRepositoryにしてみます。）

&#60;localRepository&#62;D:\Work\MavenRepository&#60;/localRepository&#62;

これでMavenを使用するにはOKなはずですが、ちゃんとローカルリポジトリが作られているかを確認するためにお試しProjectを作成してみます。

mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

上記で指定したディレクトリに色々ダウンロードされているのを確認して、Cドライブで使用していたリポジトリを削除します。みたら、3つくらいあったので、「.m2」「.m2index」「.m2indexcache」を削除しました。はあスッキリ。
Maven2 &#8211; pluto の日記を参考。




]]></description>
			<content:encoded><![CDATA[<p>現在使っているPCのCドライブの使用量が多くて逼迫してます。<br />
基本的にはアプリケーションはCドライブ以外にインストールするようにしてるのですが、MicorosoftやAdobeやAppleの製品は共有ファイルとかいってCドライブに何かしらを配置してくれます。</p>
<p>Cドライブの使用量を減らしたいので、思いついたところから別ドライブに移して行こうと思うのですが、Mavenのローカルリポジトリ（デフォルト~/.m2/repository、つまりWindows VistaならC:\Users\ユーザ名\.m2）が、8GB位取っていたのでDドライブに移動したいと思います。</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">C:\Windows\system32&gt;mvn -version
Maven version: 2.0.9
Java version: 1.6.0_14
OS name: &quot;windows vista&quot; version: &quot;<span style="color: #cc66cc;">6.0</span>&quot; arch: &quot;x86&quot; Family: &quot;windows&quot;</pre></div></div>

<p>ローカルリポジトリの設定は、%MAVEN_HOME%\conf\settings.xmlに記載があるので、<br />
そこの「localRepository」の設定を記載します。（D:\Work\MavenRepositoryにしてみます。）</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;localRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>D:\Work\MavenRepository<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/localRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>これでMavenを使用するにはOKなはずですが、ちゃんとローカルリポジトリが作られているかを確認するためにお試しProjectを作成してみます。</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app</pre></div></div>

<p>上記で指定したディレクトリに色々ダウンロードされているのを確認して、Cドライブで使用していたリポジトリを削除します。みたら、3つくらいあったので、「.m2」「.m2index」「.m2indexcache」を削除しました。はあスッキリ。</p>
<p><a href="http://slashdot.jp/~pluto/journal/328571">Maven2 &#8211; pluto の日記</a>を参考。</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3467153506120319";
/* 468x60, 作成済み 09/05/08 */
google_ad_slot = "8443402396";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4sure.jp/yokoshima/2009/08/27/maven%e3%81%ae%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%81%ae%e5%a0%b4%e6%89%80%e5%a4%89%e6%9b%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.4sure.jp/yokoshima/2009/08/27/maven%e3%81%ae%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%81%ae%e5%a0%b4%e6%89%80%e5%a4%89%e6%9b%b4/" />
	</item>
		<item>
		<title>Mavenのインストール</title>
		<link>http://blog.4sure.jp/yokoshima/2009/06/16/maven%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/</link>
		<comments>http://blog.4sure.jp/yokoshima/2009/06/16/maven%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 14:15:49 +0000</pubDate>
		<dc:creator>yokoshima</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[サーバー管理]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://blog.4sure.jp/yokoshima/?p=342</guid>
		<description><![CDATA[似たようなタイトルのばかり書いているような気がするが、
環境は以下の通り。
http://d.hatena.ne.jp/yokococon/20070206参考

# cat /etc/redhat-release
CentOS release 5.3 &#40;Final&#41;

JavaのバージョンはOpenJDKのインストールで設定した通り。

# java -version
java version &#34;1.6.0&#34;
OpenJDK  Runtime Environment &#40;build 1.6.0-b09&#41;
OpenJDK Client VM &#40;build 1.6.0-b09, mixed mode&#41;

MavenのインストールはInstall and test Maven on CentOS 5.2を参考にさせていただいた。
http://maven.apache.org/download.htmlからMavenの持ってくる。現在は2.1.0が最新なのでそれをダウンロードして解凍する。（ああ、wgetが面倒臭い・・・。）

# wget http://ftp.kddilabs.jp/infosystems/apache/maven/binaries/apache-maven-2.1.0-bin.tar.gz
# tar -zxvf apache-maven-2.1.0-bin.tar.gz
apache-maven-2.1.0/conf/
apache-maven-2.1.0/boot/classworlds-1.1.jar
apache-maven-2.1.0/LICENSE.txt
apache-maven-2.1.0/NOTICE.txt
apache-maven-2.1.0/README.txt
apache-maven-2.1.0/bin/m2.conf
apache-maven-2.1.0/bin/mvn.bat
apache-maven-2.1.0/bin/mvnDebug.bat
apache-maven-2.1.0/bin/mvn
apache-maven-2.1.0/bin/mvnDebug
apache-maven-2.1.0/conf/settings.xml
apache-maven-2.1.0/lib/maven-2.1.0-uber.jar

シンボリックリンクを張る。

# ln -s apache-maven-2.1.0 maven

rootの環境変数に以下を追加して読み込み。OpenJDKを入れた時にJAVA_HOMEを設定していなかったのでここで指定してみる。

export JAVA_HOME=/usr/lib/jvm/java
export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}

バージョンを確認。

# mvn --version
Apache Maven 2.1.0 &#40;r755702; 2009-03-19 04:10:27+0900&#41;
Java version: 1.6.0
Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
Default locale: ja_JP, platform encoding: UTF-8
OS [...]]]></description>
			<content:encoded><![CDATA[<p>似たようなタイトルのばかり書いているような気がするが、<br />
環境は以下の通り。</p>
<p><a href="http://d.hatena.ne.jp/yokococon/20070206">http://d.hatena.ne.jp/yokococon/20070206</a>参考</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cat /etc/redhat-release</span>
CentOS release <span style="color: #000000;">5.3</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Final<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Javaのバージョンは<a href="http://blog.4sure.jp/yokoshima/2009/06/16/openjdk%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/">OpenJDKのインストール</a>で設定した通り。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># java -version</span>
java version <span style="color: #ff0000;">&quot;1.6.0&quot;</span>
OpenJDK  Runtime Environment <span style="color: #7a0874; font-weight: bold;">&#40;</span>build 1.6.0-b09<span style="color: #7a0874; font-weight: bold;">&#41;</span>
OpenJDK Client VM <span style="color: #7a0874; font-weight: bold;">&#40;</span>build 1.6.0-b09, mixed mode<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Mavenのインストールは<a href="http://pwong-tipsandtricks.blogspot.com/2009/02/install-and-test-maven-on-centos-52.html">Install and test Maven on CentOS 5.2</a>を参考にさせていただいた。</p>
<p><a href="http://maven.apache.org/download.html">http://maven.apache.org/download.html</a>からMavenの持ってくる。現在は2.1.0が最新なのでそれをダウンロードして解凍する。（ああ、wgetが面倒臭い・・・。）</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># wget http://ftp.kddilabs.jp/infosystems/apache/maven/binaries/apache-maven-2.1.0-bin.tar.gz</span>
<span style="color: #666666; font-style: italic;"># tar -zxvf apache-maven-2.1.0-bin.tar.gz</span>
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>classworlds-1.1.jar
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>LICENSE.txt
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>NOTICE.txt
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>README.txt
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>m2.conf
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mvn.bat
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mvnDebug.bat
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mvn
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mvnDebug
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>settings.xml
apache-maven-2.1.0<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>maven-2.1.0-uber.jar</pre></div></div>

<p>シンボリックリンクを張る。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ln -s apache-maven-2.1.0 maven</span></pre></div></div>

<p>rootの環境変数に以下を追加して読み込み。OpenJDKを入れた時にJAVA_HOMEを設定していなかったのでここで指定してみる。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">JAVA_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">M2_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>maven
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #800000;">${M2_HOME}</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #800000;">${PATH}</span></pre></div></div>

<p>バージョンを確認。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mvn --version</span>
Apache Maven 2.1.0 <span style="color: #7a0874; font-weight: bold;">&#40;</span>r755702; <span style="color: #000000;">2009</span>-03-<span style="color: #000000;">19</span> 04:<span style="color: #000000;">10</span>:<span style="color: #000000;">27</span>+0900<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Java version: 1.6.0
Java home: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java-1.6.0-openjdk-1.6.0.0<span style="color: #000000; font-weight: bold;">/</span>jre
Default locale: ja_JP, platform encoding: UTF-<span style="color: #000000;">8</span>
OS name: <span style="color: #ff0000;">&quot;linux&quot;</span> version: <span style="color: #ff0000;">&quot;2.6.29.1&quot;</span> <span style="color: #c20cb9; font-weight: bold;">arch</span>: <span style="color: #ff0000;">&quot;i386&quot;</span> Family: <span style="color: #ff0000;">&quot;unix&quot;</span></pre></div></div>

<p>インストールはこれで終了。次はHudosonの設定だ。
<p><script type="text/javascript"><!--
google_ad_client = "pub-3467153506120319";
/* 468x60, 作成済み 09/05/08 */
google_ad_slot = "8443402396";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4sure.jp/yokoshima/2009/06/16/maven%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.4sure.jp/yokoshima/2009/06/16/maven%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/" />
	</item>
		<item>
		<title>サラでGalileoその２</title>
		<link>http://blog.4sure.jp/yokoshima/2009/06/12/%e3%82%b5%e3%83%a9%e3%81%a7galileo%e3%81%9d%e3%81%ae%ef%bc%92/</link>
		<comments>http://blog.4sure.jp/yokoshima/2009/06/12/%e3%82%b5%e3%83%a9%e3%81%a7galileo%e3%81%9d%e3%81%ae%ef%bc%92/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 15:48:49 +0000</pubDate>
		<dc:creator>yokoshima</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[I AM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://blog.4sure.jp/yokoshima/?p=299</guid>
		<description><![CDATA[eclipse35galileoを入れたの続きです。
SVN Connectorがない件は、Subversiveプラグインを一度アンインストールして、
http://www.polarion.com/products/svn/subversive.phpからコネクタ毎入れてみたらなぜか正常にインストール出来た。
（原因がちょっとわからないが・・・）
そしてもともと作成しておいたサンプルプロジェクトをチェックアウトしたら、q4eがないのでMavenが使えない。
じゃあq4e入れるかと思い、q4eのサイトを見たら
Q4E is now Eclipse IAM
と書いてある。
そのリンクに飛んでみたらEclipse本体のプラグインになってる。I AMというのだそうだ。
更新サイトに
http://q4e.googlecode.com/svn/trunk/updatesite-iam/
を指定してインストールしてみる。
Toolingの子に
Eclipse IAM Dependency Viewer
Eclipse IAM Editors
とあり、ああ、あのER図みたいに依存関係を表示してくれるやつとエディタだな、と思い、必要だと思ったので選択して「インストール」したら。
Cannot complete the install because one or more required items could not be found.
  Software being installed: org.eclipse.iam.feature.dependencyviewer.feature.group 0.9.0.200905051159
  Missing requirement: org.eclipse.iam.feature.dependencyviewer.feature.group 0.9.0.200905051159 requires &#8216;com.ibm.icu [3.6.0,4.0.0)&#8217; but it could not be found
なんか前にもq4eでこんなエラーを見たような・・・。com.ibm.icuがないと言ってると思うのだが・・・。前も解決できなかったと思ったけど調べてみるしかない。
Toolingを選択しなければ他は問題なくインストール出来たが、やはり「view dependencies」や、pom.xmlのエディタが入ってない。




]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.4sure.jp/yokoshima/2009/06/11/eclipse35galileoを入れた/">eclipse35galileoを入れた</a>の続きです。</p>
<p>SVN Connectorがない件は、Subversiveプラグインを一度アンインストールして、<br />
<a href="http://www.polarion.com/products/svn/subversive.php">http://www.polarion.com/products/svn/subversive.php</a>からコネクタ毎入れてみたらなぜか正常にインストール出来た。<br />
（原因がちょっとわからないが・・・）</p>
<p>そしてもともと作成しておいたサンプルプロジェクトをチェックアウトしたら、<a href="http://blog.4sure.jp/yokoshima/2009/04/11/q4e/">q4e</a>がないのでMavenが使えない。</p>
<p>じゃあq4e入れるかと思い、<a href="http://code.google.com/p/q4e/wiki/Installation">q4eのサイト</a>を見たら</p>
<blockquote><p>Q4E is now Eclipse IAM</p></blockquote>
<p>と書いてある。<br />
その<a href="http://www.eclipse.org/iam/">リンクに飛んで</a>みたらEclipse本体のプラグインになってる。I AMというのだそうだ。</p>
<p>更新サイトに<br />
http://q4e.googlecode.com/svn/trunk/updatesite-iam/<br />
を指定してインストールしてみる。</p>
<p>Toolingの子に</p>
<blockquote><p>Eclipse IAM Dependency Viewer<br />
Eclipse IAM Editors</p></blockquote>
<p>とあり、ああ、あのER図みたいに依存関係を表示してくれるやつとエディタだな、と思い、必要だと思ったので選択して「インストール」したら。</p>
<blockquote><p>Cannot complete the install because one or more required items could not be found.<br />
  Software being installed: org.eclipse.iam.feature.dependencyviewer.feature.group 0.9.0.200905051159<br />
  Missing requirement: org.eclipse.iam.feature.dependencyviewer.feature.group 0.9.0.200905051159 requires &#8216;com.ibm.icu [3.6.0,4.0.0)&#8217; but it could not be found</p></blockquote>
<p>なんか前にもq4eでこんなエラーを見たような・・・。com.ibm.icuがないと言ってると思うのだが・・・。前も解決できなかったと思ったけど調べてみるしかない。</p>
<p>Toolingを選択しなければ他は問題なくインストール出来たが、やはり「view dependencies」や、pom.xmlのエディタが入ってない。</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3467153506120319";
/* 468x60, 作成済み 09/05/08 */
google_ad_slot = "8443402396";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4sure.jp/yokoshima/2009/06/12/%e3%82%b5%e3%83%a9%e3%81%a7galileo%e3%81%9d%e3%81%ae%ef%bc%92/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.4sure.jp/yokoshima/2009/06/12/%e3%82%b5%e3%83%a9%e3%81%a7galileo%e3%81%9d%e3%81%ae%ef%bc%92/" />
	</item>
		<item>
		<title>q4eとMavenとTomcatの色々</title>
		<link>http://blog.4sure.jp/yokoshima/2009/06/04/q4e%e3%81%a8maven%e3%81%a8tomcat%e3%81%ae%e8%89%b2%e3%80%85/</link>
		<comments>http://blog.4sure.jp/yokoshima/2009/06/04/q4e%e3%81%a8maven%e3%81%a8tomcat%e3%81%ae%e8%89%b2%e3%80%85/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 05:34:15 +0000</pubDate>
		<dc:creator>yokoshima</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[I AM]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[q4e]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://blog.4sure.jp/yokoshima/?p=216</guid>
		<description><![CDATA[まずは、q4eをEclipseで使用し、通常のWebアプリケーションをローカルインストールしようとした。
プロジェクト右クリック→[Maven2]→アーティファクトのローカル・インストール
Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre6\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
これはつまり、JREではなくJDKに含まれている「tools.jar」が必要だということらしい。

ビルドやテスト、依存ライブラリ追加は自動化できる！
の『注意！ 「Javaコンパイラのエラー」』のところに記載があります。
これを解決する方法は、主に以下の2つがあります。
Eclipseの起動コマンドの「-vm」オプションでJDKに入っているjavaw.exeを指定する
プロジェクト定義ファイル（pom.xml）もしくはMaven設定ファイル（settings.xml）で、Maven実行の際に使われるコンパイラを指定する
ということなので、出来ればpom.xmlだけで解決したかったが、
Compiling Sources Using A Different JDKを見ると、settings.xmlまでいじらなくてはならなそうなので、1の方法にした。
-vm &#8220;C:\Program Files\Java\jdk1.6.0_10\bin\javaw.exe&#8221;
と付けるだけ。
次に実行してみたら
Failure executing javac,  but could not parse [...]]]></description>
			<content:encoded><![CDATA[<p>まずは、q4eをEclipseで使用し、通常のWebアプリケーションをローカルインストールしようとした。<br />
プロジェクト右クリック→[Maven2]→アーティファクトのローカル・インストール</p>
<blockquote><p>Unable to locate the Javac Compiler in:<br />
C:\Program Files\Java\jre6\..\lib\tools.jar<br />
Please ensure you are using JDK 1.4 or above and<br />
not a JRE (the com.sun.tools.javac.Main class is required).<br />
In most cases you can change the location of your Java<br />
installation by setting the JAVA_HOME environment variable.</p></blockquote>
<p>これはつまり、JREではなくJDKに含まれている「tools.jar」が必要だということらしい。<br />
<a href="http://www.atmarkit.co.jp/fjava/special/maven2_01/maven2_01_2.html"><br />
ビルドやテスト、依存ライブラリ追加は自動化できる！</a><br />
の『注意！ 「Javaコンパイラのエラー」』のところに記載があります。</p>
<blockquote><p>これを解決する方法は、主に以下の2つがあります。<br />
Eclipseの起動コマンドの「-vm」オプションでJDKに入っているjavaw.exeを指定する<br />
プロジェクト定義ファイル（pom.xml）もしくはMaven設定ファイル（settings.xml）で、Maven実行の際に使われるコンパイラを指定する</p></blockquote>
<p>ということなので、出来ればpom.xmlだけで解決したかったが、<a href="http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html"><br />
Compiling Sources Using A Different JDK</a>を見ると、settings.xmlまでいじらなくてはならなそうなので、1の方法にした。</p>
<blockquote><p>-vm &#8220;C:\Program Files\Java\jdk1.6.0_10\bin\javaw.exe&#8221;</p></blockquote>
<p>と付けるだけ。</p>
<p>次に実行してみたら</p>
<blockquote><p>Failure executing javac,  but could not parse the error:<br />
javac: ターゲットリリース 1.1 がデフォルトのソースリリース 1.5 と競合しています。</p></blockquote>
<p>と出た。たぶんこれは、pom.xmlに以下の記載を中途半端にしたまま実行してしまったから。</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-compiler-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;verbose<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/verbose<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fork<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fork<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #808080; font-style: italic;">&lt;!-- path-to-javac --&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executable<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compilerVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/compilerVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>これを消してさらに実行。すると</p>
<blockquote><p>注釈は -source 1.3 でサポートされていません<br />
(注釈を使用可能にするには、-source 5 以降を使用してください)<br />
@Execute(validator = false)</p></blockquote>
<p>これは、SAStrutsのアノテーションのところなのだが、Mavenの初期設定は1.3だそうなので、Mavenのプラグイン設定で変更する。<br />
（さっきのページに載っていたけど）</p>
<p><a href="http://d.hatena.ne.jp/TzlTTqTj/20090111/1231625637">ソースのバージョン</a></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-compiler-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>にしてさらに実行する。</p>
<blockquote><p>パッケージ javax.servlet は存在しません。<br />
パッケージ javax.servlet.http は存在しません。</p></blockquote>
<p>え、そんな当たり前なやつまで？？。と思ったけどMavenはTOMCATは意識しているはずもないので、dependencyを追加。</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"> 
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>servlet-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>    <br />
これで実行すると、問題なくローカルインストール出来た。<br />
だがしかし、TOMCATPluginを使ってこのアプリケーションを起動しようとすると、</p>
<blockquote><p>2009/06/04 13:12:45 org.apache.catalina.core.StandardContext filterStart<br />
致命的: フィルタ requestDumpFilter の起動中の例外です<br />
java.lang.ClassNotFoundException: org.seasar.extension.filter.RequestDumpFilter<br />
　：<br />
2009/06/04 13:12:45 org.apache.catalina.core.StandardContext filterStart<br />
致命的: フィルタ s2filter の起動中の例外です<br />
java.lang.ClassNotFoundException: org.seasar.framework.container.filter.S2ContainerFilter<br />
　：<br />
2009/06/04 13:12:45 org.apache.catalina.core.StandardContext filterStart<br />
致命的: フィルタ hotdeployfilter の起動中の例外です<br />
java.lang.ClassNotFoundException: org.seasar.framework.container.hotdeploy.HotdeployFilter<br />
　：<br />
2009/06/04 13:12:45 org.apache.catalina.core.StandardContext filterStart<br />
致命的: フィルタ encodingfilter の起動中の例外です<br />
java.lang.ClassNotFoundException: org.seasar.extension.filter.EncodingFilter<br />
　：<br />
2009/06/04 13:12:45 org.apache.catalina.core.StandardContext filterStart<br />
致命的: フィルタ routingfilter の起動中の例外です<br />
java.lang.ClassNotFoundException: org.seasar.struts.filter.RoutingFilter<br />
 </p></blockquote>
<p>とか、ドカドカ起動エラーが出ている。このアプリケーションはSAStrutsを使っているので、<br />
そのライブラリがTOMCATから見えないようだ。</p>
<p>どうも、q4eで追加されていた筈のDependencyのライブラリ群がプロジェクトにないのに気がついた。<br />
なぜなくなったんだろう？</p>
<p> <br />
ということで、試しにMaven2プロジェクトを作成してみて、そのプロジェクトの.classpathファイルを<br />
見てみたら以下のエントリーがある。</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;classpathentry</span> <span style="color: #000066;">kind</span>=<span style="color: #ff0000;">&quot;con&quot;</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;org.devzuz.q.maven.jdt.core.mavenClasspathContainer&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p> </p>
<p>これがいつのまにか無くなっていた。<br />
このエントリを起動しようとしていたプロジェクトの.classpathに追記したら、やっと画面が拝めるようになった。
<p><script type="text/javascript"><!--
google_ad_client = "pub-3467153506120319";
/* 468x60, 作成済み 09/05/08 */
google_ad_slot = "8443402396";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4sure.jp/yokoshima/2009/06/04/q4e%e3%81%a8maven%e3%81%a8tomcat%e3%81%ae%e8%89%b2%e3%80%85/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.4sure.jp/yokoshima/2009/06/04/q4e%e3%81%a8maven%e3%81%a8tomcat%e3%81%ae%e8%89%b2%e3%80%85/" />
	</item>
		<item>
		<title>Maven Additional Plugin</title>
		<link>http://blog.4sure.jp/yokoshima/2009/06/01/maven-additional-plugin/</link>
		<comments>http://blog.4sure.jp/yokoshima/2009/06/01/maven-additional-plugin/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 05:52:03 +0000</pubDate>
		<dc:creator>yokoshima</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://blog.4sure.jp/yokoshima/?p=197</guid>
		<description><![CDATA[以前に「SAStrutsとMaven」で、TOMCATデプロイ時にWEB-INF/libにコピーしてくれるって話を書きましたが、最近久々にのぞいてみたら全然うまくいってなかったのに気付きました。
WEB-INF/libはなんとかコピーできるようになるのですが、全体的にコピーされてしまうので、プロジェクト毎WEB-INFの中にコピーされてしまっていました。
これは、pom.xmlのbuild関係のパスを弄ってしまっていたためですが、いじらないとうまくコピーされないので結局ダメじゃん、てことになってガックリしてたら。
SAStruts+Maven2+Subversionで開発を始めるまでの10ステップ
に、Maven Additional Pluginというのがあるじゃないですか。
Mavenで取得したライブラリを WEB-INF/lib に反映するプラグインを入れます。これがあると、EclipseのプロジェクトをTomcatで直接読むことができて便利です。
早速インストールしました。
現在ではupdateサイトが
「http://www.skirnir.net/eclipse/updates/3.2/」
ではなく
「http://www.skirnir.net/eclipse/updates/3.3/」
しかないようです。
あと、q4eを使用している場合、Maven2クラスパス・コンテナーに以下を指定（追加）しないと動きません。
org.devzuz.q.maven.jdt.core.mavenClasspathContainer
これでうまくコピーされました。
それ以外のところでも、この記事はよくわかりやすくて良いですね。




]]></description>
			<content:encoded><![CDATA[<p>以前に「<a href="http://blog.4sure.jp/yokoshima/2009/04/11/sastrutsとmaven/">SAStrutsとMaven</a>」で、TOMCATデプロイ時にWEB-INF/libにコピーしてくれるって話を書きましたが、最近久々にのぞいてみたら全然うまくいってなかったのに気付きました。<br />
WEB-INF/libはなんとかコピーできるようになるのですが、全体的にコピーされてしまうので、プロジェクト毎WEB-INFの中にコピーされてしまっていました。<br />
これは、pom.xmlのbuild関係のパスを弄ってしまっていたためですが、いじらないとうまくコピーされないので結局ダメじゃん、てことになってガックリしてたら。</p>
<p><a href="http://d.hatena.ne.jp/int128/20080807/1218125467">SAStruts+Maven2+Subversionで開発を始めるまでの10ステップ</a></p>
<p>に、Maven Additional Pluginというのがあるじゃないですか。</p>
<blockquote><p>Mavenで取得したライブラリを WEB-INF/lib に反映するプラグインを入れます。これがあると、EclipseのプロジェクトをTomcatで直接読むことができて便利です。</p></blockquote>
<p>早速インストールしました。<br />
現在ではupdateサイトが<br />
「http://www.skirnir.net/eclipse/updates/3.2/」<br />
ではなく<br />
「http://www.skirnir.net/eclipse/updates/3.3/」<br />
しかないようです。</p>
<p>あと、q4eを使用している場合、Maven2クラスパス・コンテナーに以下を指定（追加）しないと動きません。<br />
org.devzuz.q.maven.jdt.core.mavenClasspathContainer</p>
<p>これでうまくコピーされました。<br />
それ以外のところでも、この記事はよくわかりやすくて良いですね。
<p><script type="text/javascript"><!--
google_ad_client = "pub-3467153506120319";
/* 468x60, 作成済み 09/05/08 */
google_ad_slot = "8443402396";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4sure.jp/yokoshima/2009/06/01/maven-additional-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.4sure.jp/yokoshima/2009/06/01/maven-additional-plugin/" />
	</item>
	</channel>
</rss>
