1 plugin failed to load during JIRA startup... 176.0: missing requirement [176.0] osgi.wiring.package; (osgi.wiring.package=com.sun.jna)

Hello,
I am about to develop a jira plugin using a java servlet, the servlet has to connect to postgre database, so I have followed all the process about using an external database and the configuration went well.

However, when I have written my java code to connect to that database, and after launching atlas-run to see if the servlet works well, I receive an 404 error. furthermore, I have added postgre dependency to my pom.xml and unfotunately when I re launched the atlas-run command.
An error appeared in the command window, here is the error below

[INFO] [talledLocalContainer]     ___ FAILED PLUGIN REPORT _____________________
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]     1 plugin failed to load during JIRA startup.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]           'com.plugins.check.checks-plugin' - 'checks-plugin'  failed to load.
[INFO] [talledLocalContainer]                   Cannot start plugin: com.plugins.check.checks-plugin
[INFO] [talledLocalContainer]                           Unresolved constraint in bundle com.plugins.check.s-plugin [176]: Unable to resolve 176.0: missing requirement [176.0] osgi.wiring.package; (osgi.wiring.package=com.sun.jna)
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]                   It was loaded from C:\checks-plugin\target\jira\home\plugins\installed-plugins\checks-plugin-1.0.0-SNAPSHOT.jar

I have tried to fix this problem and I have looked at the Atlassian developer community but nothing similar like this error, please what is the solution ?

Best regards

1 Like

The problem is related to postgres dependency, the postgres driver is a module, if you check the Import-Package section of the postegres driver manifest you will see that it import a large amount of libraries, only three of them are mandatory.

But when you include the driver in your project, all dependencies become mandatory and therefore you must explicit exclude them.

Add this in your pom in the <Import-Package> section:

com.sun.jna;resolution:=optional,
com.sun.jna.platform.win32;resolution:=optional,
com.sun.jna.ptr;resolution:=optional,
com.sun.jna.win32;resolution:=optional,
javax.crypto;resolution:=optional,
javax.crypto.spec;resolution:=optional,
javax.naming.ldap;resolution:=optional,
javax.naming.spi;resolution:=optional,
javax.net;resolution:=optional,
javax.net.ssl;resolution:=optional,
javax.security.auth;resolution:=optional,
javax.security.auth.callback;resolution:=optional,
javax.security.auth.login;resolution:=optional,
javax.security.auth.x500;resolution:=optional,
javax.xml.parsers;resolution:=optional,
javax.xml.stream;resolution:=optional,
javax.xml.transform;resolution:=optional,
javax.xml.transform.dom;resolution:=optional,
javax.xml.transform.sax;resolution:=optional,
javax.xml.transform.stax;resolution:=optional,
javax.xml.transform.stream;resolution:=optional,
org.ietf.jgss;resolution:=optional,
org.osgi.framework;resolution:=optional,
org.osgi.service.jdbc;resolution:=optional,
org.w3c.dom;resolution:=optional,
org.xml.sax;resolution:=optional,
waffle.windows.auth;resolution:=optional,
waffle.windows.auth.impl;resolution:=optional,

Dear @noisydump,

Thank you very much for your answer, and I have done what you have written , but unfortunately another error occured and I couldn’t handle it once again.
here is the log error below:

[INFO] [talledLocalContainer]     ___ FAILED PLUGIN REPORT _____________________
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]     1 plugin failed to load during JIRA startup.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]           'com.plugins.check.checks-plugin' - 'checks-plugin'  failed to load.
[INFO] [talledLocalContainer]                   Unexpected exception parsing XML document from URL [bundle://176.0:0/META-INF/spring/plugin-context.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.atlassian.plugin.spring.scanner.extension.AtlassianScannerNamespaceHandler] for namespace [http://www.atlassian.com/schema/atlassian-scanner]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.plugin.spring.scanner.extension.AtlassianScannerNamespaceHandler not found from bundle [checks-plugin (com.plugins.check.s-plugin)]
[INFO] [talledLocalContainer]                           Invalid NamespaceHandler class [com.atlassian.plugin.spring.scanner.extension.AtlassianScannerNamespaceHandler] for namespace [http://www.atlassian.com/schema/atlassian-scanner]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.plugin.spring.scanner.extension.AtlassianScannerNamespaceHandler not found from bundle [checks-plugin (com.plugins.check.s-plugin)]
[INFO] [talledLocalContainer]                                   com.atlassian.plugin.spring.scanner.extension.AtlassianScannerNamespaceHandler not found from bundle [checks-plugin (com.plugins.check.s-plugin)]
[INFO] [talledLocalContainer]                                           org/springframework/beans/factory/xml/NamespaceHandlerSupport
[INFO] [talledLocalContainer]                                                   org.springframework.beans.factory.xml.NamespaceHandlerSupport not found by com.plugins.check.s-plugin [176]
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]                   It was loaded from C:\checks-plugin\target\jira\home\plugins\installed-plugins\checks-plugin-1.0.0-SNAPSHOT.jar
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]     ********************************************************************************************************************************************************************************************************

Please if you don’t mind, would you help me fixing this problem ? Thank you very much

Post your pom.xml and eventually your plugin-context.xml

@noisydump
I will, here is my pom.xml content

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.plugins.check</groupId>
    <artifactId>checks-plugin</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <organization>
        <name>Example Company</name>
        <url>http://www.example.com/</url>
    </organization>
    <name>checks-plugin</name>
    <description>This is the com.plugins.check:checks-plugin plugin for Atlassian JIRA.</description>
    <packaging>atlassian-plugin</packaging>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
        <!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->

        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <version>${atlassian.spring.scanner.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-runtime</artifactId>
            <version>${atlassian.spring.scanner.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
            <scope>provided</scope>
        </dependency>
        <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
        </dependency>
        <!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
        <!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
        <!--
        <dependency>
            <groupId>com.atlassian.jira.tests</groupId>
            <artifactId>jira-testkit-client</artifactId>
            <version>${testkit.version}</version>
            <scope>test</scope>
        </dependency>
        -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <version>2.0.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.2.12</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>jira-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
                    <!-- Uncomment to install TestKit backdoor in JIRA. -->
                    <!--
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.jira.tests</groupId>
                            <artifactId>jira-testkit-plugin</artifactId>
                            <version>${testkit.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    -->
                    <enableQuickReload>true</enableQuickReload>
                    <!-- See here for an explanation of default instructions: -->
                    <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <!-- Add package to export here -->
                        <Export-Package>com.plugins.check.api,</Export-Package>
                        <!-- Add package import here -->
                        <Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *
                            com.sun.jna;resolution:=optional,
                            com.sun.jna.platform.win32;resolution:=optional,
                            com.sun.jna.ptr;resolution:=optional,
                            com.sun.jna.win32;resolution:=optional,
                            javax.crypto;resolution:=optional,
                            javax.crypto.spec;resolution:=optional,
                            javax.naming.ldap;resolution:=optional,
                            javax.naming.spi;resolution:=optional,
                            javax.net;resolution:=optional,
                            javax.net.ssl;resolution:=optional,
                            javax.security.auth;resolution:=optional,
                            javax.security.auth.callback;resolution:=optional,
                            javax.security.auth.login;resolution:=optional,
                            javax.security.auth.x500;resolution:=optional,
                            javax.xml.parsers;resolution:=optional,
                            javax.xml.stream;resolution:=optional,
                            javax.xml.transform;resolution:=optional,
                            javax.xml.transform.dom;resolution:=optional,
                            javax.xml.transform.sax;resolution:=optional,
                            javax.xml.transform.stax;resolution:=optional,
                            javax.xml.transform.stream;resolution:=optional,
                            org.ietf.jgss;resolution:=optional,
                            org.osgi.framework;resolution:=optional,
                            org.osgi.service.jdbc;resolution:=optional,
                            org.w3c.dom;resolution:=optional,
                            org.xml.sax;resolution:=optional,
                            waffle.windows.auth;resolution:=optional,
                            waffle.windows.auth.impl;resolution:=optional,</Import-Package>
                        <!-- Ensure plugin is spring powered -->
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>atlassian-spring-scanner</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <scannedDependencies>
                        <dependency>
                            <groupId>com.atlassian.plugin</groupId>
                            <artifactId>atlassian-spring-scanner-external-jar</artifactId>
                        </dependency>
                    </scannedDependencies>
                    <verbose>false</verbose>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <properties>
        <jira.version>7.13.0</jira.version>
        <amps.version>8.0.2</amps.version>
        <plugin.testrunner.version>2.0.1</plugin.testrunner.version>
        <atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
        <!-- This property ensures consistency between the key in atlassian-plugin.xml and the OSGi bundle's key. -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <!-- TestKit version 6.x for JIRA 6.x -->
        <testkit.version>6.3.11</testkit.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
</project>

and here is the plugin-context.xml file

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:atlassian-scanner="http://www.atlassian.com/schema/atlassian-scanner"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.atlassian.com/schema/atlassian-scanner
        http://www.atlassian.com/schema/atlassian-scanner/atlassian-scanner.xsd">
    <atlassian-scanner:scan-indexes/>
</beans>

Thank you very much for your help

You have an error in your pom, the correct form of Import-Package is this:

<Import-Package>
	org.springframework.osgi.*;resolution:=&quot;optional&quot;,
	org.eclipse.gemini.blueprint.*;resolution:=&quot;optional&quot;,
	com.sun.jna;resolution:=optional,
	com.sun.jna.platform.win32;resolution:=optional,
	com.sun.jna.ptr;resolution:=optional,
	com.sun.jna.win32;resolution:=optional,
	javax.crypto;resolution:=optional,
	javax.crypto.spec;resolution:=optional,
	javax.naming.ldap;resolution:=optional,
	javax.naming.spi;resolution:=optional,
	javax.net;resolution:=optional,
	javax.net.ssl;resolution:=optional,
	javax.security.auth;resolution:=optional,
	javax.security.auth.callback;resolution:=optional,
	javax.security.auth.login;resolution:=optional,
	javax.security.auth.x500;resolution:=optional,
	javax.xml.parsers;resolution:=optional,
	javax.xml.stream;resolution:=optional,
	javax.xml.transform;resolution:=optional,
	javax.xml.transform.dom;resolution:=optional,
	javax.xml.transform.sax;resolution:=optional,
	javax.xml.transform.stax;resolution:=optional,
	javax.xml.transform.stream;resolution:=optional,
	org.ietf.jgss;resolution:=optional,
	org.osgi.framework;resolution:=optional,
	org.osgi.service.jdbc;resolution:=optional,
	org.w3c.dom;resolution:=optional,
	org.xml.sax;resolution:=optional,
	waffle.windows.auth;resolution:=optional,
	waffle.windows.auth.impl;resolution:=optional,
	*
</Import-Package>

But you are just scratching the surface, if you want connect to external database you have to define other section in your pom. With your configuration you are still using the internal H2 database, just run the project and check the log.

If you want I can send you a correctly configured pom so that you can check what’s missing.

@noisydump

Okay, I really want to, please send me the correct pom configuration.

Thank you

Here you are, this is the pom you can use for your project, pay attention to the sections:

<products>..</products>
Here you have to specify your datasource

<applications>...</applications>
Here you specify the product for which you want to make the plugin, in this case I use Jira Software, without this section you get only Jira Core that it is not enough, if you want to develop plugins for other product see here.

Last you have to create a folder into your resources folder with the name jira-home and put dbconfig.xml file there.

Due to file extension resctriction i cannot upload xml files, I put here inline

pom.xml

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
				 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.plugins.check</groupId>
	<artifactId>checks-plugin</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<organization>
		<name>Example Company</name>
		<url>http://www.example.com/</url>
	</organization>
	<name>checks-plugin</name>
	<description>This is the com.plugins.check:checks-plugin plugin for Atlassian JIRA.</description>
	<packaging>atlassian-plugin</packaging>
	<dependencies>
		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-api</artifactId>
			<version>${jira.version}</version>
			<scope>provided</scope>
		</dependency>
		<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
		<!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->

		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-core</artifactId>
			<version>${jira.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.plugin</groupId>
			<artifactId>atlassian-spring-scanner-annotation</artifactId>
			<version>${atlassian.spring.scanner.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.plugin</groupId>
			<artifactId>atlassian-spring-scanner-runtime</artifactId>
			<version>${atlassian.spring.scanner.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
			<scope>provided</scope>
		</dependency>
		<!-- WIRED TEST RUNNER DEPENDENCIES -->
		<dependency>
			<groupId>com.atlassian.plugins</groupId>
			<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
			<version>${plugin.testrunner.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>jsr311-api</artifactId>
			<version>1.1.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.2.2-atlassian-1</version>
		</dependency>
		<!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
		<!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
		<!--
		<dependency>
				<groupId>com.atlassian.jira.tests</groupId>
				<artifactId>jira-testkit-client</artifactId>
				<version>${testkit.version}</version>
				<scope>test</scope>
		</dependency>
		-->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.4</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.6.6</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.1.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.8.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.templaterenderer</groupId>
			<artifactId>atlassian-template-renderer-api</artifactId>
			<version>2.0.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>42.2.12</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>com.atlassian.maven.plugins</groupId>
				<artifactId>jira-maven-plugin</artifactId>
				<version>${amps.version}</version>
				<extensions>true</extensions>
				<configuration>
					<productVersion>${jira.version}</productVersion>
					<productDataVersion>${jira.version}</productDataVersion>
					<instanceId>jira</instanceId>
					<products>            
						<product>
							<id>jira</id>
							<instanceId>jira</instanceId>
							<version>${jira.version}</version>
							<dataPath>${basedir}/src/main/resources/jira-home</dataPath>
							<dataSources>
								<dataSource>               
									<jndi>jdbc/JiraDS</jndi>
									<url>jdbc:postgresql://localhost:25432/jira</url>
									<driver>org.postgresql.Driver</driver>                        
									<username>xxxxxx</username>
									<password>xxxxxx</password>          
									<schema>public</schema>              
									<libArtifacts>                            
										<libArtifact>                                
											<groupId>org.postgresql</groupId>
											<artifactId>postgresql</artifactId>
											<version>42.2.12</version>                            
										</libArtifact>
									</libArtifacts>
								</dataSource>
							</dataSources>
						</product>
					</products>

					<applications>
						<application>
							<applicationKey>jira-software</applicationKey>
							<version>${jira.version}</version>
						</application>
					</applications>

					<!-- make AMPS faster -->
					<enableDevToolbox>false</enableDevToolbox>
					<enablePde>false</enablePde>
					<skipRestDocGeneration>true</skipRestDocGeneration>
					<allowGoogleTracking>false</allowGoogleTracking>
					<skipManifestValidation>true</skipManifestValidation>
					<extractDependencies>false</extractDependencies>

					<!-- QUICK RELOAD -->
					<enableQuickReload>true</enableQuickReload>

					<!-- Uncomment to install TestKit backdoor in JIRA. -->
					<!--
					<pluginArtifacts>
							<pluginArtifact>
									<groupId>com.atlassian.jira.tests</groupId>
									<artifactId>jira-testkit-plugin</artifactId>
									<version>${testkit.version}</version>
							</pluginArtifact>
					</pluginArtifacts>
					-->

					<!-- See here for an explanation of default instructions: -->
					<!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
					<instructions>
						<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
						<!-- Add package to export here -->
						<Export-Package>com.plugins.check.api,</Export-Package>
						<!-- Add package import here -->
						<Import-Package>
							org.springframework.osgi.*;resolution:="optional",
							org.eclipse.gemini.blueprint.*;resolution:="optional",
							com.sun.jna;resolution:=optional,
							com.sun.jna.platform.win32;resolution:=optional,
							com.sun.jna.ptr;resolution:=optional,
							com.sun.jna.win32;resolution:=optional,
							javax.crypto;resolution:=optional,
							javax.crypto.spec;resolution:=optional,
							javax.naming.ldap;resolution:=optional,
							javax.naming.spi;resolution:=optional,
							javax.net;resolution:=optional,
							javax.net.ssl;resolution:=optional,
							javax.security.auth;resolution:=optional,
							javax.security.auth.callback;resolution:=optional,
							javax.security.auth.login;resolution:=optional,
							javax.security.auth.x500;resolution:=optional,
							javax.xml.parsers;resolution:=optional,
							javax.xml.stream;resolution:=optional,
							javax.xml.transform;resolution:=optional,
							javax.xml.transform.dom;resolution:=optional,
							javax.xml.transform.sax;resolution:=optional,
							javax.xml.transform.stax;resolution:=optional,
							javax.xml.transform.stream;resolution:=optional,
							org.ietf.jgss;resolution:=optional,
							org.osgi.framework;resolution:=optional,
							org.osgi.service.jdbc;resolution:=optional,
							org.w3c.dom;resolution:=optional,
							org.xml.sax;resolution:=optional,
							waffle.windows.auth;resolution:=optional,
							waffle.windows.auth.impl;resolution:=optional,
							*
						</Import-Package>
						<!-- Ensure plugin is spring powered -->
						<Spring-Context>*</Spring-Context>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.atlassian.plugin</groupId>
				<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
				<version>${atlassian.spring.scanner.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>atlassian-spring-scanner</goal>
						</goals>
						<phase>process-classes</phase>
					</execution>
				</executions>
				<configuration>
					<scannedDependencies>
						<dependency>
							<groupId>com.atlassian.plugin</groupId>
							<artifactId>atlassian-spring-scanner-external-jar</artifactId>
						</dependency>
					</scannedDependencies>
					<verbose>false</verbose>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<properties>
		<jira.version>7.13.0</jira.version>
		<amps.version>8.0.2</amps.version>
		<plugin.testrunner.version>2.0.1</plugin.testrunner.version>
		<atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
		<!-- This property ensures consistency between the key in atlassian-plugin.xml and the OSGi bundle's key. -->
		<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
		<!-- TestKit version 6.x for JIRA 6.x -->
		<testkit.version>6.3.11</testkit.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>
</project>

dbconfig.xml

<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
	<name>defaultDS</name>
	<delegator-name>default</delegator-name>
	<database-type>postgres72</database-type>
	<schema-name>public</schema-name>
	<jndi-datasource>
		<jndi-name>java:comp/env/jdbc/JiraDS</jndi-name>
	</jndi-datasource>
</jira-database-config>

1 Like