@dn230687kav

[ERROR] Manifest com.x:atlassian-plugin:1.0.0: The default package '.' is not permitted by the Import-Pack — как починить?

Привет! Сорри, что на англ., помогите!
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.

<?xml version="1.0" encoding="UTF-8"?>
<project...>
 ...
   <packaging>atlassian-plugin</packaging>
   <dependencies>
      <dependency>
         <groupId>com.atlassian.jira</groupId>
         <artifactId>jira-api</artifactId>
         <version>${jira.version}</version>
         <scope>provided</scope>
      </dependency>
      <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.projectlombok</groupId>
         <artifactId>lombok</artifactId>
         <version>1.18.4</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>junit</groupId>...
      </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>               
               <enableQuickReload>true</enableQuickReload>
               <enableFastdev>false</enableFastdev>
               <instructions>
                  <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                  <Export-Package>com.x.jira.plugin.y.api,
	                        com.sun.security.auth.module,</Export-Package>
                  <Import-Package>org.springframework.osgi.*;resolution:="optional",
	                        org.eclipse.gemini.blueprint.*;resolution:="optional",*</Import-Package>
                  <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>
      <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
      <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>
  • Вопрос задан
  • 97 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы