﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-liuyf8688-文章分类-Maven</title><link>http://www.blogjava.net/liuyf8688/category/54199.html</link><description /><language>zh-cn</language><lastBuildDate>Thu, 11 Dec 2014 21:44:08 GMT</lastBuildDate><pubDate>Thu, 11 Dec 2014 21:44:08 GMT</pubDate><ttl>60</ttl><item><title>Changing the project version</title><link>http://www.blogjava.net/liuyf8688/articles/421275.html</link><dc:creator>liuyf8688</dc:creator><author>liuyf8688</author><pubDate>Thu, 11 Dec 2014 06:23:00 GMT</pubDate><guid>http://www.blogjava.net/liuyf8688/articles/421275.html</guid><wfw:comment>http://www.blogjava.net/liuyf8688/comments/421275.html</wfw:comment><comments>http://www.blogjava.net/liuyf8688/articles/421275.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liuyf8688/comments/commentRss/421275.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liuyf8688/services/trackbacks/421275.html</trackback:ping><description><![CDATA[mvn versions:set -DnewVersion=XXX-SNAPSHOT<img src ="http://www.blogjava.net/liuyf8688/aggbug/421275.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liuyf8688/" target="_blank">liuyf8688</a> 2014-12-11 14:23 <a href="http://www.blogjava.net/liuyf8688/articles/421275.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Dependency scope In Maven</title><link>http://www.blogjava.net/liuyf8688/articles/421227.html</link><dc:creator>liuyf8688</dc:creator><author>liuyf8688</author><pubDate>Tue, 09 Dec 2014 08:49:00 GMT</pubDate><guid>http://www.blogjava.net/liuyf8688/articles/421227.html</guid><wfw:comment>http://www.blogjava.net/liuyf8688/comments/421227.html</wfw:comment><comments>http://www.blogjava.net/liuyf8688/articles/421227.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liuyf8688/comments/commentRss/421227.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liuyf8688/services/trackbacks/421227.html</trackback:ping><description><![CDATA[<p style="line-height: 1.3em; font-size: 12px; font-family: Verdana, Helvetica, Arial, sans-serif; background-color: #ffffff;">Dependency scope is used to limit the transitivity of a dependency, and also to affect the classpath used for various build tasks.</p><p style="line-height: 1.3em; font-size: 12px; font-family: Verdana, Helvetica, Arial, sans-serif; background-color: #ffffff;">There are 6 scopes available:</p><ul style="list-style-type: square; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; background-color: #ffffff;"><li style="font-size: 12px; color: #333333;"><strong>compile</strong><br />This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects.</li><li style="font-size: 12px; color: #333333;"><strong>provided</strong><br />This is much like&nbsp;<tt>compile</tt>, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope&nbsp;<tt>provided</tt>&nbsp;because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.</li><li style="font-size: 12px; color: #333333;"><strong>runtime</strong><br />This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.</li><li style="font-size: 12px; color: #333333;"><strong>test</strong><br />This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases.</li><li style="font-size: 12px; color: #333333;"><strong>system</strong><br />This scope is similar to&nbsp;<tt>provided</tt>&nbsp;except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.</li><li style="font-size: 12px; color: #333333;"><strong>import</strong>&nbsp;<em>(only available in Maven 2.0.9 or later)</em><br />This scope is only used on a dependency of type&nbsp;<tt>pom</tt>&nbsp;in the&nbsp;<tt>&lt;dependencyManagement&gt;</tt>&nbsp;section. It indicates that the specified POM should be replaced with the dependencies in that POM's&nbsp;<tt>&lt;dependencyManagement&gt;</tt>&nbsp;section. Since they are replaced, dependencies with a scope of<tt>import</tt>&nbsp;do not actually participate in limiting the transitivity of a dependency.</li></ul><p style="line-height: 1.3em; font-size: 12px; font-family: Verdana, Helvetica, Arial, sans-serif; background-color: #ffffff;">Each of the scopes (except for&nbsp;<tt>import</tt>) affects transitive dependencies in different ways, as is demonstrated in the table below. If a dependency is set to the scope in the left column, transitive dependencies of that dependency with the scope across the top row will result in a dependency in the main project with the scope listed at the intersection. If no scope is listed, it means the dependency will be omitted.</p><table border="1" style="padding: 0px; width: 1668px; margin-left: -2px; margin-right: -2px; font-size: 10px; color: #000000; font-family: Verdana, Helvetica, Arial, sans-serif; background-color: #ffffff;"><tbody><tr style="background-color: #dddddd;"><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;"></td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">compile</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">provided</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">runtime</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">test</td></tr><tr style="background-color: #eeeeee;"><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">compile</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">compile(*)</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">runtime</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td></tr><tr style="background-color: #dddddd;"><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">provided</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">provided</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">provided</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td></tr><tr style="background-color: #eeeeee;"><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">runtime</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">runtime</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">runtime</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td></tr><tr style="background: #dfe3db;"><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">test</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">test</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">test</td><td align="left" style="font-size: 11px; color: #333333; padding: 2px 4px; vertical-align: top;">-</td></tr></tbody></table><p style="line-height: 1.3em; font-size: 12px; font-family: Verdana, Helvetica, Arial, sans-serif; background-color: #ffffff;"><strong>(*) Note:</strong>&nbsp;it is intended that this should be runtime scope instead, so that all compile dependencies must be explicitly listed - however, there is the case where the library you depend on extends a class from another library, forcing you to have available at compile time. For this reason, compile time dependencies remain as compile scope even when they are transitive.</p><img src ="http://www.blogjava.net/liuyf8688/aggbug/421227.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liuyf8688/" target="_blank">liuyf8688</a> 2014-12-09 16:49 <a href="http://www.blogjava.net/liuyf8688/articles/421227.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>maven 安装第三方库</title><link>http://www.blogjava.net/liuyf8688/articles/410329.html</link><dc:creator>liuyf8688</dc:creator><author>liuyf8688</author><pubDate>Wed, 26 Feb 2014 05:28:00 GMT</pubDate><guid>http://www.blogjava.net/liuyf8688/articles/410329.html</guid><wfw:comment>http://www.blogjava.net/liuyf8688/comments/410329.html</wfw:comment><comments>http://www.blogjava.net/liuyf8688/articles/410329.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/liuyf8688/comments/commentRss/410329.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/liuyf8688/services/trackbacks/410329.html</trackback:ping><description><![CDATA[<div>mvn install:install-file -DgroupId=com.google.code -DartifactId=couchdb4j -Dversion=0.1.2 -Dpackaging=jar -Dfile=d:/couchdb4j-0.1.2.jar</div><img src ="http://www.blogjava.net/liuyf8688/aggbug/410329.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/liuyf8688/" target="_blank">liuyf8688</a> 2014-02-26 13:28 <a href="http://www.blogjava.net/liuyf8688/articles/410329.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>