mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-07 18:16:46 +02:00
update documentation
* fix broken links * remove v1 related stuff * restructure
This commit is contained in:
committed by
René Pfeuffer
parent
fbf4757bb1
commit
d03af49df9
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB |
@@ -2,7 +2,7 @@
|
||||
title: Migrate a v1 plugin
|
||||
---
|
||||
|
||||
Before starting, make sure to read the [Plugin Development](docs/en/plugin-development.mdpment.md).
|
||||
Before starting, make sure to read the [Plugin Development](../plugin-development).
|
||||
|
||||
To migrate an existing SCM-Manager 1.x Plugin, you have to do the following steps:
|
||||
|
||||
@@ -119,7 +119,7 @@ diff -r a988f4cfb7ab src/main/resources/META-INF/scm/plugin.xml
|
||||
### Java sources (src/main/java)
|
||||
|
||||
* try to compile the sources: `mvn compile`
|
||||
* fix problems (See [API changes](api-changes.md))
|
||||
* fix problems (TODO more help here)
|
||||
* Remove XML accept headers from REST Resource classes -> SCMMv2 supports JSON only
|
||||
* Migrate REST Resources (e.g. `v2`, add to Index Resource, Update Links) - See core plugins Git, Hg, Svn, e.g. [`GitConfigResource`](https://github.com/scm-manager/scm-manager/blob/develop/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/api/v2/resources/GitConfigResource.java)
|
||||
|
||||
@@ -139,7 +139,7 @@ diff -r a988f4cfb7ab src/main/resources/META-INF/scm/plugin.xml
|
||||
"postinstall" : "ui-plugins postinstall"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins" : "2.0.0-rc7"
|
||||
"@scm-manager/ui-plugins" : "2.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -164,10 +164,10 @@ Some more hints:
|
||||
|
||||
* For Configuration UIs use [`ConfigurationBinder`](https://github.com/scm-manager/scm-manager/blob/develop/scm-ui/ui-components/src/config/ConfigurationBinder.tsx) - See core plugins Git, Hg, Svn, e.g. [scm-git-plugin/index.ts](https://github.com/scm-manager/scm-manager/blob/develop/scm-plugins/scm-git-plugin/src/main/js/index.ts).
|
||||
Note that `readOnly` property checks if update link is returned by REST resource
|
||||
* Don't forget [i18n for Plugins](docs/en/i18n-for-plugins.mdugins.md)
|
||||
* Don't forget [i18n for Plugins](../i18n-for-plugins)
|
||||
|
||||
# Further reading
|
||||
|
||||
* [scm-manager/ui-extensions README](scm-ui/ui-extensions/README.md) - Extension Points within SCM-Manager
|
||||
* [UI Extensions](../../ui-extensions) - Extend the SCM-Manager UI
|
||||
* [scm-manager/ui-components](https://github.com/scm-manager/scm-manager/tree/develop/scm-ui/ui-components) - Reusable UI components within SCM-Manager
|
||||
* [smp-maven-plugin](https://github.com/scm-manager/smp-maven-plugin) - Plugin that facilitates efficient plugin development for SCMM
|
||||
|
||||
@@ -95,18 +95,17 @@ In order to extend the ui the plugin requires a `package.json` in the project ro
|
||||
"postinstall" : "ui-plugins postinstall"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins" : "2.0.0-rc7"
|
||||
"@scm-manager/ui-plugins" : "2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
The `main` field of the `package.json` describes the main entry point of the plugin.
|
||||
The file specified at `main` should use the `binder` from the [@scm-manager/ui-extensions](../../scm-ui/ui-extensions) in oder to bind its extensions.
|
||||
For more information of extensions, binder and extension points, please have a look at the [README.md](../../scm-ui/ui-extensions/README.md) of @scm-manager/ui-extensions.
|
||||
The file specified at `main` should use the `binder` from the [@scm-manager/ui-extensions](../../ui-extensions) in oder to bind its extensions.
|
||||
|
||||
If the plugins gets build (`mvn package` or `mvn install`), the [buildfrontend-maven-plugin](https://github.com/sdorra/buildfrontend-maven-plugin), will call the `build` script of `package.json`.
|
||||
The build script triggers the `plugin` command of [@scm-manager/ui-scripts](../../scm-ui/ui-scripts).
|
||||
The build script triggers the `plugin` command of `@scm-manager/ui-scripts`.
|
||||
The `ui-scripts` will do the following steps:
|
||||
|
||||
* traverses the import statements of the script specified at `main`
|
||||
|
||||
@@ -8,35 +8,25 @@ If you want to share your plugin with SCM-Manager users, you can publish it to t
|
||||
* Create a or Git repository for your plugin
|
||||
* Develop your plugin as described in [Create a plugin](../create/)
|
||||
* Fork the [Plugin Center Repository](https://github.com/scm-manager/plugin-center)
|
||||
* Create a folder with the name of your plugin under the `src/plugins` directory
|
||||
* Put a `index.md` which starts with frontmatter metadata, which describes your plugin e.g.:
|
||||
* Create a folder with the name of your plugin under the `content/plugins` directory
|
||||
* Create a `plugin.yml` in taht folder, which describes your plugin e.g.:
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: scm-cas-plugin
|
||||
displayName: CAS
|
||||
description: CAS Authentication plugin for version 2.x of SCM-Manager
|
||||
category: authentication
|
||||
author: Cloudogu GmbH
|
||||
---
|
||||
```
|
||||
|
||||
* Document your plugin with [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) below the frontmatter header
|
||||
* Commit your work and open a pull request. Put the url to your plugin repository into the description of the pull request.
|
||||
|
||||
After you have opened the pull request.
|
||||
We will do a few steps to integrate your plugin into the plugin center:
|
||||
|
||||
* We will create a fork of your plugin under the [SCM-Manager Team](https://github.com/scm-manager/) and give your account write permissions
|
||||
* After that we will create a Jenkins job for your plugin on [oss.cloudogu.com](https://oss.cloudogu.com/jenkins/job/scm-manager/job/scm-manager-bitbucket/)
|
||||
* After that we will create a Jenkins job for your plugin on [oss.cloudogu.com](https://oss.cloudogu.com/jenkins/job/scm-manager-plugins/)
|
||||
* At the end we will accept your pull request
|
||||
|
||||
From now on you can work with the repository in the [SCM-Manager Team](https://github.com/scm-manager/).
|
||||
Every time you release your plugin (push a tag to the repository) the Jenkins job will build your plugin and release it to the plugin center.
|
||||
|
||||
|
||||
# Architecture
|
||||
|
||||
The following picture shows the architecture of the involved systems.
|
||||
|
||||

|
||||
Every time you release your plugin (push a release branch e.g.: release/1.0.1) the Jenkins job will build your plugin and release it to the plugin center.
|
||||
|
||||
Reference in New Issue
Block a user