3

Я хочу разрабатывать плагины, но не могу начать работу. в нашем 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 не может идентифицировать атлас-плагин как тип упаковки. есть ли способ создать наш собственный тип упаковки? или что является лучшим способом решить эту проблему.

пожалуйста, найти прикрепленный файл 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.

 Смежные вопросы

  • Нет связанных вопросов^_^