Using Maven with a Hello World Plugin for CIShell
- Create a Hello World Plugin as guided by this document.
- Install parent (org.cishell.parent) into the local Maven repository ------ Right click on parent (org.cishell.parent) -> Select Run As -> Maven install
- Convert the "Hello World" project created into a Maven project ------ Right Click on "Hello World" -> Configure -> Convert to Maven project
- Ensure that the Artifact Id (pom.xml -> Overview) and the Bundle-SymbolicName (META-INF -> MANIFEST.MF -> MANIFEST.MF) are the same.
- Ensure that the Version (pom.xml -> Overview) and the Bundle-Version (META-INF -> MANIFEST.MF -> MANIFEST.MF) are the same.
- Set a parent in pom.xml ------ pom.xml -> Overview -> Select "Select parent" icon on the right corner of "Parent" section -> "org.cishell"
- pom.xml -> Overview -> Packaging-> Type "eclipse-plugin"
- Change the output directory to target/classes ------ build.properties -> output.. = target/classes
- To test the algorithm, export the algorithm ------ Right click on the project -> Export -> Expand "Plug-in Development" category and select "deployable plug-ins and fragments". On the next page, select the algorithm bundle to export as an OSGI Bundle and set the destination directory to be where CIShell application is installed. Click "Finish" to export the algorithm bundle. NOTE: Do not export to the "plugins" directory of the CIShell tool directly, even though it the final destination of the plugin. This is because Eclipse appends "/plugins" to the path of whichever directory you choose.
- We can now test the algorithm. Run the CIShell application, and choose the algorithm from the menu "AwesomeAlgorithm"(which appears on the top menu bar). You will see the message "Hello World!" printed on the console.