JIRA 4.0 : Quick start guide for creating a portlet plugin
This page last changed on Jun 22, 2009 by rosie@atlassian.com.
GoalThis page is intented to get you up and running with writing your own JIRA portlet within no time. It actually is a combination of several examples included in the plugin development kit which were broken. The portlet which is explained below lets you configure 3 parameters and will result in table of books that match the searchcriterium:
PrequisitesMy installed software:
Configuration steps
<profiles> <profile> <id>Ciber</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> ... <!-- JIRA --> <repository> <id>atlassian-public</id> <url>https://maven.atlassian.com/repository/public</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>atlassian-contrib</id> <url>https://maven.atlassian.com/contrib</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>atlassian-m1-repository</id> <url>https://maven.atlassian.com/maven1</url> <layout>legacy</layout> </repository> </repositories> <pluginRepositories> ... <!-- JIRA --> <pluginRepository> <id>atlassian-public</id> <url>https://maven.atlassian.com/repository/public</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </pluginRepository> <pluginRepository> <id>atlassian-contrib</id> <url>https://maven.atlassian.com/contrib</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </pluginRepository> </pluginRepositories> <properties> <downloadSources>false</downloadSources> <downloadJavadocs>false</downloadJavadocs> <atlassian.pdk.server.url>http://localhost:8080</atlassian.pdk.server.url> <atlassian.pdk.server.username>********</atlassian.pdk.server.username> <atlassian.pdk.server.password>********</atlassian.pdk.server.password> </properties> </profile> </profiles> See also "how to build an atlassian plugin".
Next we will create a new plugin project based on a plugin archetype. In a DOS-box, run following command: mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \ -DarchetypeGroupId=com.atlassian.maven.archetypes \ -DarchetypeArtifactId=jira-plugin-archetype \ -DarchetypeVersion=10 \ -DremoteRepositories=https://maven.atlassian.com/repository/public/ \ -DgroupId=$MY_PACKAGE$ -DartifactId=$MY_PLUGIN$ and replace $MY_PACKAGE$ and $MY_PLUGIN$ according to your project. Make sure you remove the backslashes "\" so the complete command is one 1 line before you execute it.
Maven will create a new folder $MY_PLUGIN$ and provide some default files. Check the attachment for how the plugin works.
Cheers, Robby
![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Oct 06, 2009 00:31 |