- 이문서는 Atlassian SDK를 사용하여 Jira 플러그인 개발에 필요한 가이드라인을 제공합니다.
...
1.1. Architecture overview
Jira Server 용 플러그인을 구축하려면 Atlassian SDK를 통해 Atlassian 개발 플랫폼을 사용하게됩니다.
These are the major components in the Atlassian Plugin Development Platform:
- Shared Access Layer (SAL). The API for accessing common services, regardless of the underlying Atlassian application interfaces. More...
- Atlassian User Interface (AUI). A set of reusable, cross-browser tested JavaScript and CSS UI components. More...
- Atlassian Template Renderer (ATR). API for rendering your textual content. More...
- Atlassian Event. A library that allows plugins to send and consume internal messages. See the Javadoc.
- Activity Streams. API for sending and consuming activity streams. More...
- Gadgets. Framework for developing OpenSocial gadgets. More...
- Universal Plugin Manager (UPM). The tool for installing, managing, upgrading, and diagnosing Atlassian plugins. More...
- Atlassian REST Plugin Module. An Atlassian plugin module that you can use to create plugin points easily in Atlassian applications, by exposing services and data entities as REST APIs. More...
- Trusted Apps. Protocol for authenticating Atlassian applications.
- Application Links (AppLinks). API for interacting with AppLinks, an Atlassian plugin module that allows you to connect to external applications. More...
- OAuth. Our OAuth implementation for accepting and sending authenticated requests.
- Plugin Framework. The framework that executes the plugins and manages the available plugin modules. More...
- Active Objects. For plugin data storage. An ORM layer that enables easier, faster and more scalable data access and storage than our old Bandana and PluginSettings APIs. More...
- Speakeasy. A new, experimental extension mechanism for Atlassian's products. Useful for easy plugin prototyping. More...
- JIRA Issue Collector. Library for collecting user feedback from any page.
1.2. 시작하기 전에
- 환경 구성
- JDK (Java SE Development Kit) 8 또는 AdoptOpenJDK 8 설치합니다.
Download : Oracle JDK 8 Downloads
- 2990 포트 제거 (지라서버가 사용하는 포트는 2990 포트 입니다.)
...
1.3. Download and install the Atlassian SDK
https://developer.atlassian.com/server/framework/atlassian-sdk/downloads/
- 아틀라시안 지라에서 제공하는 api 및 플러그인을 사용하기 위한 설치 파일입니다.
...
Step 1. Atlassian SDK를 사용하여 플러그인 스켈레톤 구축
- 플러그인을 작성하려는 시스템의 디렉토리로 이동 합니다.
- 우리가 실행할 명령은 플러그인 디렉토리가 들어있는 폴더를 만듭니다.
- 명령 프롬프트 창에서 atlas-create-jira-plugin 명령을 사용하여 애드온 프로젝트 작성
...
Intellij IDEA에서 디버깅 호출 방법
- 터미널에서 아래 명령어 실행한다.
atlas-debug --jvmargs "-Xmx2048m -Datlassian.mail.senddisabled=false" - config 설정하기
- Run -Edit Configration 클릭한다
- Remote 선택한다
- port 5005 기본포트
- command line
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
- Use module classpath - 프로젝트 모듈 추가
- apply 적용 완료
- 프로젝트를 종료하고 다시 start 한다
- 디버깅 모드에서 추가하 프로젝트를 실행한다.
...
2.2.Active Objects plugin module(ORM) 객체-관계 매핑
- 자바 어플리케이션에서 관계형 데이터베이스를 사용하는 방식을 정의한 인터페이스이다.(JPA)
com.myapp.MyEntity 키를 가진 플러그인에 속하는 클래스 이름이 MyEntity 인 엔티티의 예를 보자.
...
터미널에서 atlas-create-jira-plugin-module
코드 블럭 bash bash <?xml version="1.0" encoding="UTF-8"?> <atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2"> <plugin-info> <description>${project.description}</description> <version>${project.version}</version> <vendor name="${project.organization.name}" url="${project.organization.url}"/> <param name="plugin-icon">images/pluginIcon.png</param> <param name="plugin-logo">images/pluginLogo.png</param> </plugin-info> <!-- add our i18n resource --> <resource type="i18n" name="i18n" location="sample"/> <!-- add our web resources --> <web-resource key="sample-resources" name="sample Web Resources"> <dependency>com.atlassian.auiplugin:ajs</dependency> <resource type="download" name="sample.css" location="/css/sample.css"/> <resource type="download" name="sample.js" location="/js/sample.js"/> <resource type="download" name="images/" location="/images"/> <context>sample</context> <context>atl.admin</context> </web-resource> <web-section name="mySection" key="mySection" location="admin_plugins_menu" weight="1000"> <description>The mySection Plugin</description> <label>plugin Section</label> </web-section> <web-item name="myItem" key="my-item" section="admin_plugins_menu/mySection" weight="1000"> <description>The myItem Plugin</description> <label>plugin sample</label> <link>/plugins/servlet/myServlet</link> </web-item> <rest name="my Rest Resource" key="my-rest-resource" path="/custom" version="1.0"> <description>The my Rest Resource Plugin</description> </rest> <servlet name="my Servlet" key="my-servlet" class="com.plugin.jira.servlet.myServlet"> <description>The my Servlet Plugin</description> <url-pattern>/myServlet</url-pattern> </servlet> </atlassian-plugin>
참조: https://developer.atlassian.com/server/
참조:Customize Atlassian products with apps
...