« | July 2025 | » | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | |
| 公告 |
关注电子政务、大型企业应用开发、Web、Workflow、MOM、MDA、RCP、GEF email:gmluyang@gmail.com
|
Blog信息 |
blog名称:SixSun的Blog 日志总数:152 评论数量:372 留言数量:13 访问次数:2373102 建立时间:2004年12月13日 |

| |
[Java Open Source]试用Maven2 心得体会, 软件技术
SixSun 发表于 2005/12/3 22:38:47 |
去年用的还是maven1.0.2。机器硬盘不小心被格掉了,重新下载maven时,发现已经是maven2.0,maven1.0.2和maven2.0 确实存在着许多差异。具体使用参考:
http://maven.apache.org/guides/getting-started/index.html
技巧:
Maven默认的本地文件保存在Document and Setting的user.home里面(在我的机器上就是 C:\Documents and Settings\sixsun\.m2\repository),非常不便。自定义 localRepository,保存在自定义的path里,以免重装系统丢失。
找到路径【maven.home】/conf/settings.xml 这个配置文件。
我们重新定义一下 localRepository 标签,定义为你需要的路径即可。(其他配置自行参考配置文件说明)
<!-- localRepository | The path to the local repository maven will use to store artifacts. | | Default: ~/.m2/repository <localRepository>/path/to/local/repo</localRepository> --> <localRepository>E:/Java/build/maven/maven-2.0/local/repo</localRepository>
==============================
其他:
在使用过程当执行 : mvn site
如果使用了 checkstyle-report 插件出现以下错误,不知道是不是bug500)this.width=500'>
[ERROR] FATAL ERROR[INFO] ----------------------------------------------------------------------------[INFO] Can't find bundle for base name checkstyle-report, locale zh_CN[INFO] ----------------------------------------------------------------------------[INFO] Tracejava.util.MissingResourceException: Can't find bundle for base name checkstyle-report, locale zh_CN at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773) at java.util.ResourceBundle.getBundle(ResourceBundle.java:661) at org.apache.maven.plugin.checkstyle.CheckstyleReport.getBundle(CheckstyleReport.java:539) at org.apache.maven.plugin.checkstyle.CheckstyleReport.getName(CheckstyleReport.java:201) at org.apache.maven.plugins.site.ReportComparator.compare(ReportComparator.java:40) at java.util.Arrays.mergeSort(Arrays.java:1278) at java.util.Arrays.sort(Arrays.java:1219) at java.util.Collections.sort(Collections.java:155) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:240) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:482) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:452) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113) at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) 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:324) 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 24 seconds[INFO] Finished at: Sun Dec 04 22:22:12 CST 2005[INFO] Final Memory: 12M/23M[INFO] ----------------------------------------------------------------------------
[INFO] Can't find bundle for base name checkstyle-report, locale zh_CN |
|
回复:试用Maven2 心得体会, 软件技术
谷子(游客)发表评论于2007/11/25 16:59:03 |
|
» 1 »
|