There are many advantages of MAVEN, some of which are prominent such as
1. The existence of a code base
2. Dependency Management
3. Automatically find the corresponding Javadoc and SRC
4. Numerous plug-in support
Of course there are deficiencies, such as
1. There is redundancy in the LIB packet structure of the code base
2. All Lib found is always >= expected
3. There are also 10% Javadoc and SRC not found
4. Plug-in execution parameters are cumbersome
Now consider this: If team members are not using a traditional Web project on MAVEN,SVN
Is it not possible to check out directly for a MAVEN project or to submit directly, if you insist on using it?
Our idea is this:Maven project--Traditional Web project ->SVN
In turn is the:svn-> traditional Web project->maven project
First build a Web project, add MAVEN support
Using traditional structures
Now we need to map SRC and webroot as they are, and then get all the Lib
A plugin is used here:
Ability to automatically synchronize changes to the source folder to the destination folder
Once the required dependencies are all ready, change the Pom.xml
<plugin> <Artifactid>Maven-war-plugin</Artifactid> <version>2.2</version> <Configuration> <warsourcedirectory>${basedir}/webroot</warsourcedirectory> <version>3.0</version> <Failonmissingwebxml>False</Failonmissingwebxml> <warsourcedirectory></warsourcedirectory> Packaging source is set to empty, because only need to get all lib, never need to really pack </Configuration> </plugin>
Run war:exploded packaged as a folder structure because the source is empty and results in only Lib
Last step, synchronize Lib
Done!!
How to share a maven project as a traditional Web project