沉沦人生

---^_^

统计

最新评论

[导入]将maven2生成的工程转换为一个eclipse工程


网站:JavaEye 作者:danlley 发表时间: 2007-07-17 13:40 此文章来自于 http://www.JavaEye.com
声明:本文系JavaEye网站原创文章,未经JavaEye网站或者作者本人书面许可,任何其他网站严禁擅自发表本文,否则必将追究法律责任!
原文链接: http://danlley.javaeye.com/blog/101980

与ant执行过程完全相同,只不过,在用maven2生成eclipse工程文件的过程中,maven2需要到网上寻找最新的支持jar文件,这也是maven2与ant的一个最明显差异:maven2的运行必须能够链接到网络中。

 

生成eclipse工程文件的命令: mvn eclipse:eclipse

后台显示信息如下:




D:\mywork\my-app>mvn eclipse:eclipse

[INFO] Scanning for projects...

[INFO] Searching repository for plugin with prefix: 'eclipse'.

[INFO] org.apache.maven.plugins: checking for updates from central

[INFO] org.codehaus.mojo: checking for updates from central

[INFO] -------------------------------------------------------------------------

---

[INFO] Building my-app

[INFO]    task-segment: [eclipse:eclipse]

[INFO] -------------------------------------------------------------------------

---

[INFO] Preparing eclipse:eclipse

[INFO] No goals needed for project - skipping

Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactiv

ity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.pom

772b downloaded

Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactiv

ity/1.0-alpha-5/plexus-interactivity-1.0-alpha-5.pom

482b downloaded

Downloading: http://repo1.maven.org/maven2/jline/jline/0.9.1/jline-0.9.1.pom

145b downloaded

Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactiv

ity-api/1.0-alpha-5/plexus-interactivity-api-1.0-alpha-5.pom

430b downloaded

Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0

.1/maven-plugin-api-2.0.1.pom

643b downloaded

Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interactiv

ity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar

5K downloaded

Downloading: http://repo1.maven.org/maven2/jline/jline/0.9.1/jline-0.9.1.jar

45K downloaded

[INFO] [eclipse:eclipse]

[INFO] Using source status cache: D:\mywork\my-app\target\mvn-eclipse-cache.prop

erties

[INFO] Not writing settings - defaults suffice

[INFO] Wrote Eclipse project for "my-app" to D:\mywork\my-app.

[INFO]

       Sources for some artifacts are not available.

       Please run the same goal with the -DdownloadSources=true parameter in ord

er to check remote repositories for sources.

       List of artifacts without a source archive:

         o junit:junit:3.8.1

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESSFUL

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 36 seconds

[INFO] Finished at: Sun Apr 15 14:17:40 CST 2007

[INFO] Final Memory: 3M/6M

[INFO] ------------------------------------------------------------------------




 

打开eclipse,在workspace中点击右键,选择import,选择Existing Projects into Workspace,点击下一步,选择Select root directory。也就是你的工程根目录确定完成后,你会在工作去看到刚刚添加的工程已经进入你的workspace。

 

                                    ------------------------伏羲狂徒

 




《 将maven2生成的工程转换为一个eclipse工程 》 的评论也很精彩,欢迎您也添加评论。查看详细 >>





JavaEye推荐
上海:优秀公司德比:高薪诚聘 资深Java工程师
广州:优易公司:诚聘Java工程师,开发经理
上海:尤恩斯国际集团:诚聘开发工程师
北京:优秀公司NHNChina招聘:WEB开发,系统管理,JAVA开发, DBA



文章来源: http://danlley.javaeye.com/blog/101980

posted on 2007-07-17 13:40 伏羲狂徒 阅读(6469) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: