liferay/liferay-maven-support — pull request #2 by kameshsampath (2012-03-04 04:49:27+00:00)
Title: Solution for MAVEN-14 for review and merge

The following are the files updated, added, removed as part of the [MAVEN-14](http://issues.liferay.com/browse/MAVEN-14) related fixes

# Files Added
1. _liferay-maven-support/plugins/liferay-maven-plugin-components_ - this new project takes care of the code generation for Search container, this is componentized to allow reuse of code generation and defining new code builder for other Liferay Portal feature.The components defined in this module/project are injectable to the Mojo using via the [Plexus Container](http://plexus.codehaus.org/)
2. _liferay-maven-support/plugins/liferay-maven-plugin/src/main/java/com/liferay/maven/plugins/xml/SearchContainerModelParser.java_ - the Parser class that is used to parse the Mojo model for SearchContainer Mojo
3. _liferay-maven-plugin/src/main/java/com/liferay/maven/plugins/SearchContainerMojo.java_ - the Maven plugin that will take care of generating the Liferay Search Container code with jsps
4. _liferay-maven-plugin/src/test_ - the unit test folder

# Files Updated
1. _liferay-maven-support/plugins/pom.xml_ - added the entry for the module liferay-maven-plugin-components
2. _liferay-maven-support/plugins/liferay-maven-plugin/pom.xml_ - added the dependencies related to maven plugin automation and unit tests and added reporting section to generate plugin documentation and other reports
3. _.gitignore_ - to add pattern *.*~ that will ignore the linux swap files

# Other comments
The unit tests are very basic, just started to make the mechanics work, need to be more robust like automated checking instead of unlike whats done manually now. Will try to update them in next iterations. The reporting plugins are in place to enablke the plugin documentation in future for all the maven plugins defined

# How to integrate with liferay maven projects
1. Create a liferay maven portlet project
2. Create a search-containers.xml file, an example is available in the liferay-maven-plugin/src/test_ folder
3. Run the maven command mvn liferay:build-search-container
4. A set of Java classes wil be generated in the src folder and set of jsps will be generated in the src/main/webapp folder