Different types of projects can be converted to MVN engineering,
Only one plug-in is required need to the install M2e-eclipse plugin in order to having this simple utility in eclipse.
Then in your eclipse just and click and you right click on Java Project
Configure
should see " Convert to Maven Project
" option.
But the generated configuration file is not the same,
1, such as the Web project generated MVN files
1 <Projectxmlns= "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">2 <modelversion>4.0.0</modelversion>3 <groupId>Crunchifytutorial</groupId>4 <Artifactid>Crunchifytutorial</Artifactid>5 <version>0.0.1-snapshot</version>6 <Packaging>War</Packaging>7 <Build>8 <sourcedirectory>Src</sourcedirectory>9 <Plugins>Ten <plugin> One <Artifactid>Maven-compiler-plugin</Artifactid> A <version>3.1</version> - <Configuration> - <Source>1.7</Source> the <Target>1.7</Target> - </Configuration> - </plugin> - <plugin> + <Artifactid>Maven-war-plugin</Artifactid> - <version>2.3</version> + <Configuration> A <warsourcedirectory>WebContent</warsourcedirectory> at <Failonmissingwebxml>False</Failonmissingwebxml> - </Configuration> - </plugin> - </Plugins> - </Build> - </Project>
2. Common Java Project generated configuration file
<Projectxmlns= "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>
General Engineering to MVN project