liferay-maven-support
liferay-maven-support copied to clipboard
Solution for MAVEN-14 for review and merge
The following are the files updated, added, removed as part of the MAVEN-14 related fixes
Files Added
- 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
- 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
- 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
- liferay-maven-plugin/src/test - the unit test folder
Files Updated
- liferay-maven-support/plugins/pom.xml - added the entry for the module liferay-maven-plugin-components
- 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
- .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
- Create a liferay maven portlet project
- Create a search-containers.xml file, an example is available in the liferay-maven-plugin/src/test_ folder
- Run the maven command mvn liferay:build-search-container
- 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