<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>wolfg&#039;s Weblog &#187; maven</title>
	<atom:link href="http://guoyong.org/tag/maven/feed" rel="self" type="application/rss+xml" />
	<link>http://guoyong.org</link>
	<description>wolfg&#039;s journey with open source, linux, programming, sysadm ...</description>
	<lastBuildDate>Thu, 04 Aug 2011 15:02:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/cn/</creativeCommons:license>		<item>
		<title>maven-eclipse-plugin v2.6与aspectj</title>
		<link>http://guoyong.org/2009/04/24/365</link>
		<comments>http://guoyong.org/2009/04/24/365#comments</comments>
		<pubDate>Fri, 24 Apr 2009 06:17:47 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[maven-eclipse-plugin]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=365</guid>
		<description><![CDATA[最近一段时间以来，项目中使用maven-eclipse-plugin的eclipse:eclipse目标时比较恼人。pom里已经加入了aspectj的依赖，但生成的.classpath里却没有相应的classpathentry。 今天google到了解决办法，有两个： 1. 强制使用上个版本的maven-eclipse-plugin &#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;&#160; &#60;artifactId&#62;maven-eclipse-plugin&#60;/artifactId&#62;&#160; &#60;version&#62;2.5.1&#60;/version&#62;&#60;/plugin&#62; 2. 设置ajdtVersion为none &#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;&#160; &#60;artifactId&#62;maven-eclipse-plugin&#60;/artifactId&#62;&#160; &#60;configuration&#62;&#160;&#160; &#160;&#60;ajdtVersion&#62;none&#60;/ajdtVersion&#62;&#160; &#60;/configuration&#62;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#60;/plugin&#62;]]></description>
			<content:encoded><![CDATA[<p>最近一段时间以来，项目中使用maven-eclipse-plugin的eclipse:eclipse目标时比较恼人。pom里已经加入了aspectj的依赖，但生成的.classpath里却没有相应的classpathentry。</p>
<p>今天google到了解决办法，有两个：</p>
<p>1. 强制使用上个版本的maven-eclipse-plugin</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Olive;">&lt;</span><span style="color: Green;">groupId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">org.apache.maven.plugins</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">groupId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"><br />&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">artifactId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">maven-eclipse-plugin</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">artifactId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"><br />&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">version</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">2.5.1</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">version</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"><br /></span><span style="color: Olive;">&lt;/</span><span style="color: Green;">plugin</span><span style="color: Olive;">&gt;</span></div></div>
<p>2. 设置ajdtVersion为none</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Olive;">&lt;</span><span style="color: Green;">groupId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">org.apache.maven.plugins</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">groupId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"><br />&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">artifactId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">maven-eclipse-plugin</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">artifactId</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"><br />&nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">configuration</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">&lt;</span><span style="color: Green;">ajdtVersion</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">none</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">ajdtVersion</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"><br />&nbsp; </span><span style="color: Olive;">&lt;/</span><span style="color: Green;">configuration</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /></span><span style="color: Olive;">&lt;/</span><span style="color: Green;">plugin</span><span style="color: Olive;">&gt;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.org/2009/04/24/365/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决Maven Jetty Plugin在Windows下的“文件锁定”问题</title>
		<link>http://guoyong.org/2008/06/23/360</link>
		<comments>http://guoyong.org/2008/06/23/360#comments</comments>
		<pubDate>Mon, 23 Jun 2008 05:31:04 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://guoyong.org/?p=360</guid>
		<description><![CDATA[使用Maven进行Java的web开发，Jetty Plugin是必不可缺的插件，可以极大的提到开发效率。但在Windows环境下会遇到静态文件（html、css、js）被锁定、无法即时更新的问题。要想更新这些文件，只能先停掉Jetty，保存修改，再启动Jetty，非常不方便。 解决办法是这样的： 1、从jetty.jar中解出webdefault.xml（位于org.mortbay.jetty.webapp包下）这个文件，把这个useFileMappedBuffer参数设为false &#60;init-param&#62;&#160;&#60;param-name&#62;useFileMappedBuffer&#60;/param-name&#62;&#160;&#60;!-- change to false --&#62;&#160;&#60;param-value&#62;true&#60;/param-value&#62;&#60;/init-param&#62; 2、把修改后的webdefault.xml文件跟pom.xml放在一起 3、修改pom.xml里的Jetty Plugin的配置，加入webdefault.xml ...&#60;plugin&#62;&#160;&#160; &#60;groupId&#62;org.mortbay.jetty&#60;/groupId&#62;&#160;&#160; &#60;artifactId&#62;maven-jetty-plugin&#60;/artifactId&#62;&#160;&#160; &#60;version&#62;6.1.7&#60;/version&#62;&#160;&#160; &#60;configuration&#62;&#160;&#160; &#160; &#60;contextPath&#62;/&#60;/contextPath&#62;&#160;&#160; &#160; &#60;webDefaultXml&#62;webdefault.xml&#60;/webDefaultXml&#62;&#160;&#160; &#160; ...&#160;&#160; &#160;&#60;/configuration&#62;&#160;&#160; &#160;...&#60;/plugin&#62;...]]></description>
			<content:encoded><![CDATA[<p>使用Maven进行Java的web开发，Jetty Plugin是必不可缺的插件，可以极大的提到开发效率。但在Windows环境下会遇到静态文件（html、css、js）被锁定、无法即时更新的问题。要想更新这些文件，只能先停掉Jetty，保存修改，再启动Jetty，非常不方便。<br />
解决办法是这样的：<br />
1、从jetty.jar中解出webdefault.xml（位于org.mortbay.jetty.webapp包下）这个文件，把这个useFileMappedBuffer参数设为false</p>
<div class="hl-surround"><div class="hl-main">&lt;init-param&gt;<br />&nbsp;&lt;param-name&gt;useFileMappedBuffer&lt;/param-name&gt;<br />&nbsp;&lt;!-- change to false --&gt;<br />&nbsp;&lt;param-value&gt;true&lt;/param-value&gt;<br />&lt;/init-param&gt;</div></div>
<p>2、把修改后的webdefault.xml文件跟pom.xml放在一起<br />
3、修改pom.xml里的Jetty Plugin的配置，加入<webDefaultXml>webdefault.xml</webDefaultXml></p>
<div class="hl-surround"><div class="hl-main">...<br />&lt;plugin&gt;<br />&nbsp;&nbsp; &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;<br />&nbsp;&nbsp; &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;<br />&nbsp;&nbsp; &lt;version&gt;6.1.7&lt;/version&gt;<br />&nbsp;&nbsp; &lt;configuration&gt;<br />&nbsp;&nbsp; &nbsp; &lt;contextPath&gt;/&lt;/contextPath&gt;<br />&nbsp;&nbsp; &nbsp; &lt;webDefaultXml&gt;webdefault.xml&lt;/webDefaultXml&gt;<br />&nbsp;&nbsp; &nbsp; ...<br />&nbsp;&nbsp; &nbsp;&lt;/configuration&gt;<br />&nbsp;&nbsp; &nbsp;...<br />&lt;/plugin&gt;<br />...</div></div>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.org/2008/06/23/360/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>发布jar包到自己设立的Maven Repository</title>
		<link>http://guoyong.org/2007/12/08/348</link>
		<comments>http://guoyong.org/2007/12/08/348#comments</comments>
		<pubDate>Sat, 08 Dec 2007 07:28:47 +0000</pubDate>
		<dc:creator>wolfg</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://guoyong.org/2007/12/08/348</guid>
		<description><![CDATA[使用Artifactiry为自己的开发团队设立了repository镜像。有时需要把本地的一些第三方的jar包发布到服务器，使用maven-deploy-plugin的deploy:deploy-file目标可以完成这个任务。 比如，要发布jta的jar包jta-1.0.1B.jar $ mvn deploy:deploy-file -DgroupId=javax.transaction \&#160;&#160; -DartifactId=jta \&#160;&#160; -Dversion=1.0.1B \&#160;&#160; -Dpackaging=jar \&#160;&#160; -Dfile=~/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar \&#160;&#160; -DrepositoryId=central \&#160;&#160; -Durl=http://host.of.your.repository[:port]/artifactory/ibiblio@repo 说明： repositoryId在工程的pom文件里设置 url由Artifactiry的配置决定，注意不能使用virtual repository的地址 如果远程repository需要身份验证，用户名和密码需要在maven的settings.xml里设置 参考: maven.apache.org/guides/mini/guide-deploying-3rd-p&#8230; www.jfrog.org/sites/artifactory/latest/import.html]]></description>
			<content:encoded><![CDATA[<p>使用Artifactiry为自己的开发团队设立了repository镜像。有时需要把本地的一些第三方的jar包发布到服务器，使用maven-deploy-plugin的deploy:deploy-file目标可以完成这个任务。</p>
<p>比如，要发布jta的jar包jta-1.0.1B.jar</p>
<div class="hl-surround"><div class="hl-main">$ mvn deploy:deploy-file -DgroupId=javax.transaction \<br />&nbsp;&nbsp; -DartifactId=jta \<br />&nbsp;&nbsp; -Dversion=1.0.1B \<br />&nbsp;&nbsp; -Dpackaging=jar \<br />&nbsp;&nbsp; -Dfile=~/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar \<br />&nbsp;&nbsp; -DrepositoryId=central \<br />&nbsp;&nbsp; -Durl=http://host.of.your.repository[:port]/artifactory/ibiblio@repo</div></div>
<p>说明：</p>
<ul>
<li>repositoryId在工程的pom文件里设置</li>
<li>url由Artifactiry的配置决定，注意不能使用virtual repository的地址</li>
<li>如果远程repository需要身份验证，用户名和密码需要在maven的settings.xml里设置</li>
</ul>
<p>参考: </p>
<ul>
<li> <a href="http://maven.apache.org/guides/mini/guide-deploying-3rd-party-jars.html" title="http://maven.apache.org/guides/mini/guide-deploying-3rd-party-jars.html" target="_blank">maven.apache.org/guides/mini/guide-deploying-3rd-p&#8230;</a> </li>
<li> <a href="http://www.jfrog.org/sites/artifactory/latest/import.html" title="http://www.jfrog.org/sites/artifactory/latest/import.html" target="_blank">www.jfrog.org/sites/artifactory/latest/import.html</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://guoyong.org/2007/12/08/348/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

