不同类型的工程可以转为mvn工程,

只需要一个插件 You may need to install m2e-eclipse plugin in order to have this simple utility in Eclipse .

然后In your eclipse just right click on Java Project and click Configure and you should see “ Convert to Maven Project ” option.

但是生成的配置文件是不一样的,

1、比如web工程 生成的mvn文件

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>CrunchifyTutorial</groupId>
<artifactId>CrunchifyTutorial</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>

2、普通的java工程生成的配置文件

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Test</groupId>
<artifactId>Test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
</build>
</project>

普通工程转为mvn工程的更多相关文章

  1. 将普通工程转为mvn标准工程(main resources)

    It is sometimes required to change the default source folder working on the java project. One best e ...

  2. 把git上面的scala工程转为eclipse工程

    1,安装sbt工具,url:https://www.cnblogs.com/zeling/p/8494828.html 2,把插件添加到plugins.sbt文件中: addSbtPlugin(&qu ...

  3. IDEA如何将git下来的是工程转为maven工程

    1.在工程名称上右击并点击[Add Framework Support] 2.在打开的[Add Framework Support]窗口中在左侧栏找到[Maven]选项并勾上并点击[OK]按钮.

  4. Eclipse Java工程转为Web工程步骤

    找到工程的.project文件,在<natures>标签中增加以下两行配置:<nature>org.eclipse.wst.common.modulecore.ModuleCo ...

  5. Myeclipse普通工程转为Maven工程

    在SVN导出的Maven项目,或以前不是用Maven管理的项目想要转换成Maven项目,但Myeclipse中右键Configure 找不到(eclipse可行)Convert to maven pr ...

  6. eclipse里将java工程改web工程

    转自:http://blog.csdn.net/heirenheiren/article/details/8488245 把一个普通的eclipse项目转成web项目 1.  编辑工程的.projec ...

  7. 新手创建多module mvn工程

    1.创建工程 创建一个mvn工程有两种方式,一种是通过命令创建,一种是通过idea去一步一步配置. 1.1 命令模式 mvn archetype:generate -DgroupId={groupId ...

  8. spring源码第一章_获取源码并将源码转为eclipse工程

    1.通过http://gitforwindows.org/下载github 2.通过http://services.gradle.org/distributions/下载gradle:gardle类似 ...

  9. eclipse java工程和maven工程的互相转换

    eclipse java工程和maven工程的互相转换 maven转为工程一般工程: 工程右键--->Maven--->Disable Maven Nature转为一般工程. 一般工程转为 ...

随机推荐

  1. Accelerating Matlab

    Matlab is a very useful programming environment, but it also has many inefficiencies. You might thin ...

  2. 初探Docker

    本文旨在让大家了解什么是Docker,并带领大家体验Docker使用的整个流程. 开启Docker学习之旅前,我们简单描述几个场景,应该很多人都有碰到过: 小凹同学开发了一个web应用,服务器环境是: ...

  3. FastDFS简介

    一.FastDFS概述: FastDFS是一个开源的轻量级分布式文件系统,他对文件进行管理,功能包括:文件存储.文件同步.文件访问(文件上传.下载)等,解决了大容量存储和负载均衡的问题,高度追求高性能 ...

  4. JQuery学习之遍历

    1.祖先:向上遍历DOM树 **parent():返回被选中元素的直接父元素,该方法只会向上一级对DOM树进行遍历 $(document).ready(function(){ $("span ...

  5. js:方法3. 对象

    Object.constructor object.constructor a = new Array(1,2,3); // Create an object a.constructor == Arr ...

  6. 转载:Java面试笔试题大汇总

    本文来源于:http://blog.csdn.net/wulianghuan 1.面向对象的特征有哪些方面 1).抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关 ...

  7. iOS学习12之OC属性和点语法

    1.属性(@property和@Synthesize) 1> 属性是 Objective-C 2.0 定义的语法,提供 setter 和 getter 方法的默认实现.在一定程度上简化代码,并且 ...

  8. AngularJS学习笔记之directive—scope选项与绑定策略

    From:http://www.linuxidc.com/Linux/2015-05/116924.htm scope:{}使指令与外界隔离开来,使其模板(template)处于non-inherit ...

  9. POJ 2096 (概率DP)

    题目链接: http://poj.org/problem?id=2096 题目大意:n种bug,s个子系统.每天随机找一个bug,种类随机,来自系统随机.问找齐n种bug,且每个子系统至少有一个bug ...

  10. Human and AI's future (reverie)

    However, I do notice that to make the dark situation happen, it doesn't require the topleft matrix t ...