Develop Built-in Plugins
Built-in plugins ships together with OneDev, and requires OneDev source code to develop. Follow below steps to add a new built-in plugin project:
-
First follow this guide to set up OneDev development environment
-
Add a new plugin project by adding a new Maven module:
-
In next page, specify module name. The module name should follow the convention of server-plugin-. And the parent project should be specified as server-plugin. Also make sure NOT to check the create a simple project option
-
Click the next button to go to next page. If this is the first time you adding a OneDev plugin, you will need to click the configure button to add OneDev remote archetype catalog. The catalog url is: https://artifact.onedev.io/artifactory/onedev/archetype-catalog.xml. Apply and close the catalog adding dialog, Eclipse should list all archetypes relating to OneDev. If you added the catalog before, just input io.onedev to filter the archetype
-
From OneDev archetype list page, choose the archetype matching your current OneDev version (Check OneDev server pom file to find current version)
-
In the next page, specify group id and version. For built-in plugin project, group id must always be io.onedev, and version will actually be ignored (always use current OneDev version)
-
Finish adding the plugin. Eclipse will take a while to build the newly added plugin. Then edit file pom.xml of project server-product to make it depends on the newly added plugin