Skip to main content

Develop Built-in Plugins

Built-in plugins ships together with OneDev, and requires OneDev source code to develop.

  1. First follow this guide to set up OneDev development environment

  2. Add a new Maven module using Maven archetype below:

    Here:

    • Plugin name should follow the name convention server-plugin-xxx
    • Package should follow the name convention io.onedev.server.plugin.xxx
    • group id should always be io.onedev
    • artifact id should follow the name convention server-plugin-xxx
  3. Open terminal and run mvn install in the new plugin module directory to install the plugin into local Maven repository

    $ cd ~/Projects/onedev/server/server-plugin/server-plugin-myplugin
    $ mvn install
  4. Edit pom.xml of module server-product to add dependency to the new plugin:

  5. Click Reload All Projects and Generate Sources and Update Folder for All Projects from maven tool window:

  6. Your plugin should be taking effect now, you may add functionalities to it and run the configuration to see it in action