3

我想開發Stash插件,但無法開始。我們的pom.xml中有一個錯誤。Atlassian-plugin:未知封裝類型

Project build error: Unknown packaging: atlassian-plugin 
Project build error: Unresolveable build extension: 
Plugin com.atlassian.maven.plugins:maven-stash-plugin:6.0.0 
    or one of its dependencies could not be resolved: 
Could not find artifact com.sun:tools:jar:1.7.0 
    at specified path C:\Program Files (x86)\Java\jre1.7.0_75/../lib/tools.jar 

我知道maven不能識別atlasian-plugin作爲包的類型。有沒有辦法創建我們自己的包裝類型?或者什麼是解決這個問題的最好方法。

請參考附件的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.xxxxx</groupId> 
    <artifactId>fkjghff</artifactId> 
    <version>856</version> 

    <organization> 
     <name>CATE Developer Experience</name> 
     <url>www.xxxxxx</url> 
    </organization> 

    <name>name of the project</name> 
    <description>description of the project</description> 
    <packaging>atlassian-plugin</packaging> 

    <dependencyManagement> 
     <dependencies> 
      <dependency> 
       <groupId>com.atlassian.stash</groupId> 
       <artifactId>stash-parent</artifactId> 
       <version>${stash.version}</version> 
       <type>pom</type> 
       <scope>import</scope> 
      </dependency> 

      <!-- CCD dependencies START --> 
      <dependency> 
       <groupId>com.atlassian.activeobjects</groupId> 
       <artifactId>activeobjects-plugin</artifactId> 
       <version>${ao.version}</version> 
       <scope>provided</scope> 
      </dependency> 

      <!-- SAL, the Active Objects plugin uses SAL's API for transactions --> 
      <dependency> 
       <groupId>com.atlassian.sal</groupId> 
       <artifactId>sal-api</artifactId> 
       <version>2.4.1</version> 
       <scope>provided</scope> 
      </dependency> 

      <!-- Google Collections, useful utilities for manipulating collections --> 
      <dependency> 
       <groupId>com.google.collections</groupId> 
       <artifactId>google-collections</artifactId> 
       <version>1.0</version> 
       <scope>provided</scope> 
      </dependency> 

      <!-- CCD dependencies END --> 
     </dependencies> 
    </dependencyManagement> 

    <dependencies> 
     <dependency> 
      <groupId>com.atlassian.activeobjects</groupId> 
      <artifactId>activeobjects-plugin</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.atlassian.stash</groupId> 
      <artifactId>stash-api</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.atlassian.stash</groupId> 
      <artifactId>stash-spi</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.atlassian.stash</groupId> 
      <artifactId>stash-page-objects</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>servlet-api</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>commons-lang</groupId> 
      <artifactId>commons-lang</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.atlassian.soy</groupId> 
      <artifactId>soy-template-renderer-api</artifactId> 
      <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> 
     <dependency> 
      <groupId>com.atlassian.stash</groupId> 
      <artifactId>stash-ssh</artifactId> 
      <scope>provided</scope> 
      <version>${stash.version}</version> 
     </dependency> 
    </dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>com.atlassian.maven.plugins</groupId> 
       <artifactId>maven-stash-plugin</artifactId> 
       <version>${amps.version}</version> 
       <extensions>true</extensions> 
       <configuration> 
        <products> 
         <product> 
          <id>stash</id> 
          <instanceId>stash</instanceId> 
          <version>${stash.version}</version> 
          <dataVersion>${stash.data.version}</dataVersion> 
         </product> 
        </products> 
        <systemPropertyVariables> 
         <johnson.spring.lifecycle.synchronousStartup>true</johnson.spring.lifecycle.synchronousStartup> 
        </systemPropertyVariables> 
        <pluginArtifacts> 
         <pluginArtifact> 
          <groupId>com.atlassian.activeobjects</groupId> 
          <artifactId>activeobjects-plugin</artifactId> 
          <version>${ao.version}</version> 
         </pluginArtifact> 
         <pluginArtifact> 
          <groupId>com.atlassian.activeobjects</groupId> 
          <artifactId>activeobjects-refapp-spi</artifactId> 
          <version>${ao.version}</version> 
         </pluginArtifact> 
        </pluginArtifacts> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>3.2</version> 
       <configuration> 
        <source>1.8</source> 
        <target>1.8</target> 
       </configuration> 
      </plugin> 
     </plugins> 
     <resources> 
      <resource> 
       <directory>src/main/resources</directory> 
       <includes> 
        <include>**/*.xml</include> 
        </includes> 
        <filtering>true</filtering> 
        </resource> 
        <resource> 
        <directory>src/main/resources</directory> 
        <includes> 
        <include>**/*.soy</include> 
       </includes> 
       <filtering>false</filtering> 
      </resource> 
      <resource> 
       <directory>src/main/resources</directory> 
       <includes> 
        <include>**/*.js</include> 
        </includes> 
        <filtering>false</filtering> 
        </resource> 
        <resource> 
        <directory>src/main/resources</directory> 
        <includes> 
        <include>**/*.properties</include> 
       </includes> 
       <filtering>false</filtering> 
      </resource> 
     </resources> 
    </build> 

    <properties> 
     <stash.version>3.9.2</stash.version> 
     <stash.data.version>3.9.2</stash.data.version> 
     <amps.version>6.0.0</amps.version> 
     <jdk.version>1.8</jdk.version> 
     <ao.version>0.19.7</ao.version> 
     <plugin.testrunner.version>1.2.0</plugin.testrunner.version> 
    </properties> 
</project> 

回答

2

是否按照本文檔配置日食?

https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and-build-a-project/set-up-the-eclipse-ide-for-linux

(還有其他的操作系統文檔,太)

應用程序設置 - >的Maven - >安裝 - >添加 - > /Applications/Atlassian/atlassian-plugin-sdk-5.1。 10/apache-maven-3.2.1(或你所在的任何地方)

應用程序設置 - > Maven - >用戶設置 - >全局設置 - > /Applications/Atlassian/atlassian-plugin-sdk-5.1.10/ apache-maven-3.2.1/conf/settings.xml(或你所在的任何地方)

0

當我閱讀「無法找到工件com.sun:tools:jar:1.7.0」時,我的第一個猜測是您可能想切換到jdk而不是jre。當我寫這篇評論的時候,Atlassian正在要求1.8.x jdk版本。