[ERROR] Manifest com.x:atlassian-plugin:1.0.0 : The default package '.' is not permitted by the Import-Package syntax

 
 
 
Сообщения:142
Привет! Сорри, что на англ., помогите!
0. How to fix this error?
1. Should I place all dependencies to Import-Package? Only packages, used in my code from this libs
or root packages of dependencies?
2. If last, how to define root packages, should I manually open jar to see it?
Because from errors I see that Import-Package does not corresponds to groupId.
3. Do we have only maven way to build the plugin?
4. Why plugin requires additional oracle dependencies, when other java
apps need only jdbc driver?
Such great JIRA for users, but development of plugins is a hell for me (and other developers, I read).
I spent several nights without any pogress and there are no practical examples with dependencies- just fictional 'my-lib*'.

[ERROR] Manifest com.globs.jira.plugin:com.globs.jira.plugin-boss:atlassian-plugin:1.0.0 : The default package '.' is not permitted by the Import-Package syntax.

POM
<?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.x.jira.plugin</groupId>
   <artifactId>com.x.jira.plugin-y</artifactId>
   <version>1.0.0</version>
   <organization>
      <name>x</name>
      <url>https://x.co</url>
   </organization>
   <name>com.x.jira.plugin-y</name>
   <description>This is the com.x.jira.plugin:com.x.jira.plugin-y 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>
      <!--START y DB-->
      <dependency>
         <groupId>com.oracle</groupId>
         <artifactId>ojdbc6</artifactId>
         <version>${ojdbc6.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>com.oracle</groupId>
         <artifactId>oraclepki</artifactId>
         <version>1.0</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>com.oracle</groupId>
         <artifactId>orai18n</artifactId>
         <version>${orai18n.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>com.oracle.ons</groupId>
         <artifactId>com.springsource.oracle.ons</artifactId>
         <version>${com.springsource.oracle.ons.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>c3p0</groupId>
         <artifactId>c3p0</artifactId>
         <version>${c3p0.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>com.sun.jna</groupId>
         <artifactId>jna</artifactId>
         <version>${jna.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>net.java.dev.jna</groupId>
         <artifactId>jna-platform</artifactId>
         <version>${jna-platform.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>javax.enterprise</groupId>
         <artifactId>cdi-api</artifactId>
         <version>${cdi-api.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>javax.resource</groupId>
         <artifactId>javax.resource-api</artifactId>
         <version>${javax.resource-api.version}</version>
         <scope>compile</scope>
      </dependency>
      <!--<dependency>-->
      <!--<groupId>org.postgresql</groupId>-->
      <!--<artifactId>postgresql</artifactId>-->
      <!--<version>${postgresql.version}</version>-->
      <!--<scope>provided</scope>-->
      <!--</dependency>-->
      <!--<dependency>-->
      <!--<groupId>com.microsoft.sqlserver</groupId>-->
      <!--<artifactId>mssql-jdbc</artifactId>-->
      <!--<version>${mssql-jdbc.version}</version>-->
      <!--<scope>provided</scope>-->
      <!--</dependency>-->
      <!--<dependency>-->
      <!--<groupId>mysql</groupId>-->
      <!--<artifactId>mysql-connector-java</artifactId>-->
      <!--<version>${mysql-connector-java.version}</version>-->
      <!--<scope>provided</scope>-->
      <!--</dependency>-->
      <!--<dependency>-->
      <!--<groupId>org.apache.commons</groupId>-->
      <!--<artifactId>commons-lang3</artifactId>-->
      <!--<version>${commons-lang3.version}</version>-->
      <!--<scope>provided</scope>-->
      <!--</dependency>-->
      <dependency>
         <groupId>org.projectlombok</groupId>
         <artifactId>lombok</artifactId>
         <version>1.18.4</version>
         <scope>provided</scope>
      </dependency>
      <!--END y DB-->
      <!-- 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>javax.xml.bind</groupId>
         <artifactId>jaxb-api</artifactId>
         <version>2.1</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>com.atlassian.plugins.rest</groupId>
         <artifactId>atlassian-rest-common</artifactId>
         <version>1.0.2</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>com.atlassian.sal</groupId>
         <artifactId>sal-api</artifactId>
         <version>2.6.0</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.wink</groupId>
         <artifactId>wink-client</artifactId>
         <version>1.1.3-incubating</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-all</artifactId>
         <version>1.8.5</version>
         <scope>test</scope>
      </dependency>
   </dependencies>
   <build>
      <plugins>
         <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-jira-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>
               <enableFastdev>false</enableFastdev>
               <!-- 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.x.jira.plugin.y.api,
	                        com.sun.security.auth.module,</Export-Package>
                  <!-- Add package import here -->
                  <Import-Package>org.springframework.osgi.*;resolution:="optional",
	                        org.eclipse.gemini.blueprint.*;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.12.0</jira.version>
      <amps.version>6.3.21</amps.version>
      <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
      <atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
      <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
      <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>
      <postgresql.version>42.2.5.jre7</postgresql.version>
      <mssql-jdbc.version>7.0.0.jre8</mssql-jdbc.version>
      <mysql-connector-java.version>8.0.13</mysql-connector-java.version>
      <commons-lang3.version>3.8.1</commons-lang3.version>
      <javax.resource-api.version>1.7.1</javax.resource-api.version>
      <orai18n.version>11.2.0.3</orai18n.version>
      <com.springsource.oracle.ons.version>10.2.0.2</com.springsource.oracle.ons.version>
      <ojdbc6.version>12.1.0.1-atlassian-hosted</ojdbc6.version>
      <c3p0.version>0.9.1.2</c3p0.version>
      <jna.version>3.0.9</jna.version>
      <jna-platform.version>5.2.0</jna-platform.version>
      <cdi-api.version>2.0</cdi-api.version>
   </properties>
</project>
Изменен:08 янв 2019 16:47
 
Модераторы:Нет
Сейчас эту тему просматривают:Нет