Archetypes can help you to make the development of new plugins easier starting from a well-defined template. More info on http://maven.apache.org/guides/introduction/introduction-to-archetypes.html
The archetype should be compiled with
mvn clean install
and added to the local list of archetypes with
mvn archetype:crawl
Now localhost is ready to create projects using this archetype
cd freedomotic/plugins/devices
mvn archetype:generate -Dfilter=com.freedomotic:device -DgroupId=com.freedomotic -Dversion=1.0-SNAPSHOT -Dpackage=com.freedomotic
Add your plugin name when asked and confirm. The plugin skeleton is now created so compile it with:
cd PLUGIN_NAME
mvn clean install
At this point the new plugin is installed in Freedomotic as usual, the developer can start to code it.
Please remember to rename the default Java class HelloWorld as your plugin name.
If you want to understand how the archetype works take a look here.
TODO Update maven archetype code to match latest freedomotic version and best practices
frontend-java/
├── pom.xml //THE MAVEN POM FILE
└── src
├── main
│ ├── java
│ │ └── com
│ │ └── freedomotic
│ │ └── jfrontend
│ │ └── JavaDesktopFrontend.java //THE PLUGIN SOURCE CODE
│ └── resources
│ ├── data (PLUGIN DATA FOLDER)
│ │ └── i18n
│ │ ├── jfrontend_it_IT.properties //ITALIAN TRANSLATION
│ │ ├── jfrontend.properties //DEFAULT LANGUAGE
│ │ └── cmd //PLUGINS COMMANDS XML FILES
│ │ └── rea //PLUGINS REACTIONS/AUTOMATIONS XML FILES
│ │ └── templates //OBJECTS TEMPLATES PROVIDED BY THIS PLUGIN
│ │ └── trg //PLUGINS TRIGGERS XML FILES
│ │ └── resources //PLUGINS MEDIA FILES
│ └── desktop-frontend.xml //THE PLUGIN MANIFEST
└── test
└── java
└── com
└── freedomotic
└── jfrontend
└── JavaDesktopFrontendTest.java //UNIT TESTS FILE