Minesweeper portlet tutorial

This tutorial illustrates the technologies I use in liferay portlet development. It's a portlet version of the minesweeper game and you can download the sources here. I have broken the tutorial to the following parts:

I would recommend that you build and run the portlet before reading the other parts of this tutorial.

Building and running the tutorial

To build and run this tutorial you will need:
The following instructions assume that you have successfully installed the above listed items on your local environment.
  1. Download the sources from here
  2. Extract the minesweeper.zip archive
  3. In MySQL create a new database with the name minesweeper
  4. CREATE DATABASE minesweeper;
    
  5. Edit the minesweeper/src/main/resources/db.properties to set the right connection settings for your local MySQL instance
  6. url=jdbc:mysql://localhost:3306/minesweeper
    username=root
    password=
    
  7. Start your Liferay portal instance
  8. Edit the todir attribute in the following line in the minesweeper/pom.xml to point to the deploy directory under your Liferay directory:
  9. <copy todir="C:\liferay-portal-5.2.3\deploy" file="${project.build.directory}/${project.build.finalName}.war"/>
    
  10. In the minesweeper directory run following maven command:
  11. mvn integration-test
  12. This should build and deploy the minesweeper.war. Check the Liferay output for the following lines to verify that the portlet was deployed successfully:
  13. INFO  [PortletHotDeployListener:346] 1 portlet for minesweeper is available for use
  14. Open your browser at http://localhost:8080 and login
  15. From the top right dock menu choose "Add application"
  16. Select the example category and click "Add" for Minesweeper portlet
  17. Now the portlet is ready to go!
Continue to Part one: POJOs behind the game

References

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Quick+Installation+Instructions
http://maven.apache.org/download.html
http://dev.mysql.com/doc/refman/5.1/en/installing.html
http://en.wikipedia.org/wiki/Minesweeper_%28computer_game%29

3 comments:

  1. That was remarkable post. I like to read articles that are edifying for they enriched my mind with different knowledge that makes me a better person. These articles especially about recent events, technologies, news, tips and technical skills are the topics that I adore. Keep it up and more power to your website. I look forward for your next article.Thanks Jennifer Liferay

    ReplyDelete
  2. thanks for sharing nice images and data and sharing the code on play minesweeper online

    ReplyDelete