Monis Majeed
Monis Majeed

Reputation: 1378

How to implement our own plugin for report portal

i want to create my own plugin which i can upload in to report portal

I created a simple plugin using Eclipse IDE (plugin in development) and then exported it as a jar , but when i trying to upload it , it always throw

 Error during plugin uploading: 'Plugin version should be specified.'

any pointer can help me

Upvotes: 1

Views: 316

Answers (1)

avarabyeu
avarabyeu

Reputation: 736

ReportPortal plugins must be packaged with additional information in JAR manifest. Refer to this one as an example.

jar {
    manifest {
        attributes(
                "Class-Path": configurations.compile.collect { it.getName() }.join(' '),
                "Plugin-Id": "${pluginID}",
                "Plugin-Version": "${project.version}",
                "Plugin-Provider": "<any arbitrary string, e.g. name>",
                "Plugin-Class": "com.epam.reportportal.extension.bugtracking.jira.JiraStrategyPlugin",
                "Plugin-Service": "api"
        )
    }
}

Plugins are built and loaded using PF4j framework, so checking its documentation will also be useful

Upvotes: 1

Related Questions