A kata is an exercise in martial arts. A code kata is an exercise in programming which helps hone your skills through practice and repetition. The Reladomo Kata is a fun way to help you learn idiomatic Reladomo usage. This particular kata is set up as a series of unit tests which fail. Your task is to make them pass, using Reladomo.
Clone this repo or simply download and extract the master zip file then follow the instructions below for your IntelliJ IDEA. We currently do not have a setup process for Eclipse and Netbeans.
Once you have extracted the downloaded zip file, it comes with all the necessary project files. You can open the project from "File" => "Open..." => choose "reladomo-kata" folder which you just extracted. You might see a dialog to suggest importing as a Maven project, please import it as a Maven project. If you do not get the option to import it as a Maven project, you can do so from the Maven tool window. Setup the project JDK from "File" => "Project Structure" => Setup the Project SDK Run the Maven clean and install. It should generate the necessary files. Run the unit tests under main-kata/src/test/java/kata/test. Happy coding!
Once you have extracted the downloaded zip file, it is ready to be opened in your Eclipse Workspace. You can open the project from "File" => "Open Projects from File System..." => choose "reladomo-kata" folder which you just extracted. The project should automatically be imported as a Maven project. In case it is not imported as a Maven project, you can import it by right click on reladomo-kata => "Maven" => "Configure..."
Maven will automatically select Java 8 for you, make sure you have your JDK 8 installed and properly configured in Eclipse "Preferences" => "Installed JREs". If not follow the below steps:
-
Navigate to "Window" => "Preferences" => "Installed JREs" => "Add" => "Standard VM".
-
For "JRE home:" click on "Directory..." find your Java 8 JDK directory and click "OK", all other fields should auto-populate.
-
Click on "Finish".
-
Make sure the JDK you just setup, is checked off under the "Installed JREs".
-
Right click on "reladomo-kata-parent".
-
Navigate to "Run As" => "Maven build".
-
Under "Goals", enter the command:
-DskipTests=true clean install
-
Click on "Run".
It should generate all the necessary files. Run the unit tests under main-kata/src/test/java/kata/test. Happy coding!
We haven't come up with an instruction for NetBeans yet.
You can access the slides for the Main Kata and Mini Kata online.
Run the Maven task "site" to generate slides for the kata. It should generate the presentation. Navigate to main-kata/target/presentation/reladomokata and open the ReladomoKata.xhtml in your favorite browser.
-
Right click on "reladomo-kata-parent".
-
Navigate to "Run As" => "Maven build".
-
Under "Goals", enter the command:
site
-
Click on "Run".
It should generate the presentation. Navigate to main-kata/target/presentation/reladomokata and open the ReladomoKata.xhtml in your favorite browser.
Feature: f6 Feature: f7 Feature: f11