2012-02-29 11 views
0

JIRAのサービスを作成したいと思います。私はatlassian-plugin-sdk-3.8を使用しています。JIRAのサービスを作成できませんでした

私はそれを書くの後、私はアトラス-packageコマンドを使用し

import com.atlassian.jira.project.ProjectManager; 
import com.atlassian.jira.ComponentManager; 
ProjectManager pm = ComponentManager.getInstance().getProjectCategories(); 

アトラシアンAPIをインポートしていたとき、私は...そのサービスのためのJavaでプログラムを書きます。

しかし、ここで、それはBUILD-FAILURE

 
[INFO] Compilation failure 

F:\services\module\src\main\java\com\first\module\MyPlugin.java:[9,25] cannot fi 
nd symbol 

could not parse error message: symbol: class ComponentManager 
    location: package com.atlassian.jira 
F:\services\module\src\main\java\com\first\module\MyPlugin.java:20: cannot find 
symbol 
ProjectManager pm = ComponentManager.getInstance().getProjectCategories(); 
        ^

を示していただきました理由は?

+0

はに見てください公式の[ドキュメンテーション](http://confluence.atlassian.com/display/JIRA/Appendix+A+-+Extending+JIRA)。 – DerMike

答えて

0

あなたjira apiバージョンに応じて、以下のいずれかを試してみてください。詳細については

ProjectManager pm = ComponentManager.getInstance().getProjectManager(); 

ProjectManager pm = ComponentAccessor.getProjectManager(); 

JIRA api

0

を見て、あなたのpom.xmlにの依存性を追加します。

<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> 
    ... 
</dependencies> 
関連する問題