How to Build an Atlassian Plugin

Links
Developer Network

Overview

This documentation contains all of the information you'll need to start building your own plugins and extensions for Atlassian's products. We set several goals for our plugin development process:

  • Allow you to set up a complete plugin development environment with just a few commands.
  • Ensure that all plugins are set up, built, tested and released in a consistent way.
  • To allow you to use the IDE you prefer.
  • To make the code/deploy/test cycle as efficient as possible.
  • To encourage unit and functional testing
  • To use continuous integration and code coverage metrics to ensure plugins are of high quality, and that they stay compatible with new releases of the products.
  • Make it easy to release your plugins to the community.
  • To encourage collaboration around plugin development.

Quickstart for the impatient

Please note that the new Eclipse plugin is unable to deal with source 'includes' and 'excludes'.

Use the following command :mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse as this will force mvn to use version 2.6 of the maven eclipse plugin.

The error that you will see if 2.7 is used in your mvn build :

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Request to merge when 'filtering' is not identical. 
[INFO] Original=resource src/main/resources: output=target/classes, 
[INFO]    include=[atlassian-plugin.xml], exclude=[**/*.java], test=false, 
[INFO]    filtering=true, merging with=resource src/main/resources: 
[INFO]    output=target/classes, include=[], exclude=[atlassian-plugin.xml|**/*.java], 
[INFO]    test=false, filtering=false
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------

Requirements

Java: Depending on which Atlassian product (and which version of the product) you are building plugins for, you may need either JDK 5 or JDK 1.4. Many of Atlassian customers are still using Java 1.4, either by choice or because their app servers still require it. If you are building a plugin exclusively for internal use, you're free to target whichever JDK you wish. However, if you are planning to share your plugin with other Atlassian users, you must check what requirements your targetted product has, and unless stated explicitly we recommend you make sure that it is compatible with Java 1.4.

Read How do I specify a particular version of Java? to learn how to use Java 5 language features or enforce building with a particular version of Java.

Maven 2: The Atlassian plugin development process depends heavily on Maven. Calling Maven a "build tool" would be an understatement - but if you have no experience with Maven yet, start thinking of it as a tool for simplifying your life by building your plugin. Quoting its homepage, "Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information."

Maven is particularly useful in this instance because it can automatically manage massive dependency trees - especially transitive dependencies where Plugin X depends on Product Y, which depends on Shared Library Z. Using Maven, you should be able to quickly and easily retrieve all the dependencies that your plugin will need, and create a working development environment in just a few steps.

Atlassian Maven PDK: We've written a Maven extension specifically for plugin developers. The extension provides a new packaging type for atlassian-plugins, gives you some utility methods for uploading, enabling, disabling and uninstalling a plugin to the product, and provides methods for integration and functional testing. This plugins is automatically installed when you build an Atlassian plugin.

Settings.xml

In order for Maven to find and download all of the necessary dependencies, we have to tell it where everything is stored. The best option is to do that once, in your $HOME/.m2/settings.xml file. We've included instructions and an example that you can copy and paste at Example settings.xml. If you look closely, you will find two lines containing placeholders for username & password. Don't worry about them at this moment — you don't need them to get started.

Your plugin will depend on many different artifacts: the Atlassian product itself, Atlassian modules and various open-source libraries. All of those artifacts are stored in different maven repositories scattered around the net. However, to simplify configuration and speed downloads, Atlassian provides a Maven proxy that contains all of the dependencies for all of our products. The example settings file contains just one repository entry for this proxy, and saves Maven from having to check several different repositories for each artifact it needs. You can find more information about the repositories that are behind the Maven Proxy.

Atlassian will release binary and javadoc artifacts for all of our product releases and their Atlassian-managed dependencies. We will release source artifacts wherever we can freely do so. Some of our closed-source artifacts will only be available via manual download by source-license-holders.

We will also be releasing various milestone and snapshot releases during product development to aid plugin developers in testing their work against upcoming product releases.

You will be able to find all of these artifacts in the Maven proxy.

Creating a skeleton plugin

Now you're ready to create your (skeleton) plugin. This involves creating plenty of directories and subdirectories, two XML files and initial Java files. Fortunately, Maven can help here, too, and simplify your life a lot! Maven has a concept called an Archetype, which is basically a plugin template. We've created plugin templates for each of our pluggable products, so you can use those templates to set up your initial plugin skeleton easily. You can find the Atlassian Plugin Archetypes and how you use them here. Visit the page, create a plugin for your targetted Atlassian product, and return to this page later.

Running an plugin archetype will download dependencies from the internet, set up a project skeleton, and prepare you to run unit and functional tests. Once you run the Maven archetype command, you'll find that it creates a new directory structure that looks like this:
Here a a few points to note:

It's important to understand a little bit about the pom.xml, and what's in it. The Project Object Model describes everything that maven needs to know about your plugin, from dependencies, to source control, to authors, to tests, to deployment locations. The POM is also hierarchical, so many properties are inherited. You'll note that this pom.xml inherits from something like confluence-plugin-base, which contains lots of information about the products and the Atlassian development environment. Some properties are later overridden in your plugin's POM.

We've written a page with an Example pom.xml that explains what's going on in your plugin's POM.

Please note: The plugin now knows about the target product's binaries, because it has downloaded the JAR files - but it has not downloaded the actual source code. You don't need to have access to the target product's sourcecode to be able to develop a plugin, the JAR files alone will enable you to go and write the plugin, using the product's API. If you do have access to the source code (e.g. as a commercial license holder) then it helps to download and set up the source code now:

Special section for commercial license holders with Confluence source access.

Since you have purchased a commercial license to Confluence, you have access to the Confluence source code. You can download a source distribution by visiting http://my.atlassian.com. You can attach the Confluence source code to your plugin project so that you can step through the Confluence code in your debugger. It's often helpful to do this to better understand that API, or to track down problems.

Once you've downloaded and unpacked the source distribution, you'll see a bunch of directories and files, exactly as they are checked out of our SVN repository. This is perfect for reading and exploring, but it doesn't do you much good in the brave new world of Maven 2. So what you'll need to do is create and install source artifacts into your local maven repository. Once you've done that, the maven IDE plugins will recognize that they are there and link them up for debugging purposes.

From the top level of the source distribution, run:

mvn source:jar install -Dmaven.test.skip=true

This will build JAR files containing most of our source-code into the target directory of each subproject. There are still a few items that aren't yet set up for this, but the important ones are, like the core product source code. Likewise, we will soon be enabling this same process for JIRA.

The JAR files can be copied into your local Maven repository to make them available in your IDE when you run mvn idea:idea or mvn eclipse:eclipse. For example, to install the source code for Confluence 2.10 core, copy confluence-project/confluence/target/confluence-2.10-sources.jar to $HOME/.m2/repository/com/atlassian/confluence/confluence/2.10.

A note about memory: This is a resource intensive process, and you may need to allocate more memory to maven in order to complete it. You can do so be setting an environment variable called MAVEN_OPTS, like so export MAVEN_OPTS=-Xmx512m

A note about versions: Make sure that you download and install the same version of the source code that is set in the atlassian.product.version property in your pom.xml.

Maven and your IDE

We have our plugin skeleton, and now it's time to get it set up in your IDE, if you use one. Once again, Maven comes to the rescue. Maven has plugins to generate project files for both Eclipse and IntelliJ IDEA. Our instructions will cover these two IDEs, but you're free to use whichever IDE or editor you prefer.

To set up your IDE project, simply run mvn eclipse:eclipse or mvn idea:idea from the root folder of the newly created directory (e.g. where the pom.xml resides).

First, Maven will download all of the dependencies referenced in your pom.xml, and then all the inherited dependencies from the parent POMs. Your settings.xml specifies that maven should down the javadoc and source files as well, where they are available. This is likely to take quite a while: Depending on what product you are targetting, Maven will now download hundred MB or more from the internet. Go relax, get some coffee, read a blog. Fortunately, after you've downloaded these files for the first time, they are stored in your local Maven repository ($HOME/.m2/repository/) and won't be downloaded again unless they change.

In case this process ended with an error message (e.g. "required artifact missing") please refer to FAQ and Troubleshooting

Second, Maven will construct project files that your IDE can understand. It will reference all the dependent jars in the right projects, and attach the sources and javadoc where they are available. Note, when you're ready to check in your plugin, don't commit these project files as they are generally specific to each developer's machine.

Open the project files in your IDE, and you should see the mostly-empty template directory for your new plugin, matching the directory structure in the screenshot above.

Eclipse Workspace Setup
Eclipse requires an additional one-time step to configure your workspace with the Maven repository location:
 mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo

You can also accomplish the same thing by adding the M2_REPO classpath variable, pointing to your .m2/repository directory, in Eclipse preferences

(see also the Maven Eclipse Plugin Usage guide

Using a different build tool

These instructions depend on using Maven. However, if you want to use your own build environment (e.g. Ant), the following Maven command will export all the JAR files you need to develop against to the directory you specify, and you can then ensure that these JAR files are in your CLASSPATH using your build tool.

mvn dependency:copy-dependencies -DoutputDirectory=<specify a directory>

Developing your plugin

So now what? Find out how the development/test/debug cycle works. We've tried to make it as efficient as possible.

Testing your plugin

Atlassian plugins depend on Maven 2 for running their test suites. This is advantageous because all plugins are always tested the same way, and because Bamboo, our continuous integration server, can do likewise.

Building a suite of tests for your plugin is extremely important. We're big believers in Test Driven Development, and we think that writing tests as you go is one of the best ways to ensure you build a high-quality and functional application. Additionally, having a comprehensive suite of tests means that other developers in the community (or even Atlassian developers) can jump in and collaborate on your plugin without fear of breaking anything inadvertently.

Find out how to make it happen on the Testing your plugin page.

A note about quality

We have set certain criteria for our own plugin development. If you are working on a plugin that you wish to share with the community, we encourage you to try and meet these same criteria in your work. It will result in a higher quality product and make it easier for other to collaborate.

Your plugin should:

Atlassian offers hosting for plugins to all authors. Find out more about the resources and how to take advantage of them here.

Releasing your plugin

Atlassian offers lots of services to help you host your plugin development project. We can provide an SVN repository with Fisheye and Crucible, a JIRA project, Confluence space, a Bamboo Project, a Maven repository for artifacts, and more. When you're ready to start collaborating with other developers on your plugin project, read about Releasing your plugin. Contact us and we'll grant you account and get everything set up for you.

Resources

Where do you go for help? For questions about plugin development for Atlassian products, head to the Developer Forum. These are community run forums where other plugin developers ask and answer questions, get advice, and publicize their latest work.

NOTE: Please do not file support tickets at http://support.atlassian.com regarding plugin development questions. The engineers on support are not equipped to answer those sorts of questions.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Dec 28, 2007

    Bill Smith says:

    Looks like the plugin development documentation was revamped.  Previously, ...

    Looks like the plugin development documentation was revamped.  Previously, you had to get the source distribution and compile it.  It seems that it's no longer necessary.  I'm trying to follow along the new documentation and have some comments:

    1.  I think the documentation should have an explanation why you might want to get/build the confluence source. I'm guessing that the only reason is to be able to step into Confluence code in order to better understand how it works so that you can write your plugin effectively.

    2. The page has a sample settings.xml.  I replaced my existing settings.xml and tried to  follow the steps in: http://confluence.atlassian.com/display/DEVNET/Atlassian+Plugin+Archetypes but I get a build error:

    [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found

    3. It would be helpful to have some info for people who want to take an existing plugin and enhance it or implement some bug fixes.

  2. Jan 23, 2008

    ananth says:

    I get the following error trying to run mvn eclipse:eclipse command : [INF...

    I get the following error trying to run mvn eclipse:eclipse command :



    [INFO] Scanning for projects...
    Downloading: https://maven.atlassian.com/repository/public/com/atlassian/jira/plugins/jira-plugin-base/5/jira-plugin-base-5.pom
    Downloading: https://maven.atlassian.com/maven1/com.atlassian.jira.plugins/poms/jira-plugin-base-5.pom
    Downloading: http://repo1.maven.org/maven2/com/atlassian/jira/plugins/jira-plugin-base/5/jira-plugin-base-5.pom
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error building POM (may not be this project's POM).

    Project ID: MyProject:MyPlugin:jar:1.0-SNAPSHOT

    Reason: Cannot find parent: com.atlassian.jira.plugins:jira-plugin-base for project: MyProject:MyPlugin:jar:1.0-SNAPSHOT for project MyProject:MyPlugin:jar:1.0-SNAPSHOT

    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.atlassian.jira.plugins:jira-plugin-base for project: MyProject:MyPlugin:jar:1.0-SNAPSHOT for project MyProject:MyPlugin:jar:1.0-SNAPSHOT
     at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:376)
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:289)
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
     at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
     at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
     at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.atlassian.jira.plugins:jira-plugin-base for project: MyProject:MyPlugin:jar:1.0-SNAPSHOT for project MyProject:MyPlugin:jar:1.0-SNAPSHOT
     at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1259)
     at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:745)
     at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:476)
     at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:197)
     at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:548)
     at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:458)
     at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:362)
     ... 11 more



    Any ideas on what might be the issue ? I have copies the settings.xml file under $HOME/.m2 diretory. Thanks in advance for your reply.

    1. Jan 24, 2008

      aaron frishling says:

      by the looks of it, when maven was trying to download jira-plugin-base-5.pom, it...

      by the looks of it, when maven was trying to download jira-plugin-base-5.pom, it failed for whatever reason and tried to download it from the alternate repositories (which don't exist, so they'd have to fail).

      a likely cause of this is that you've set up your proxy settings in maven incorrectly and so it can't access the repository. when i was having this issue, it would try to download a file for at least 10 seconds before deciding that it couldn't get it.

      you can learn how to set up proxies for maven here: http://maven.apache.org/guides/mini/guide-proxies.html
      note that you'll have to set up proxy setting entries for both http and https, though they'll most likely be exactly the same other than the protocol and name

      1. Jan 26, 2008

        ananth says:

        Thank you very much. I was indeed missing the proxy settings for https. I cant h...

        Thank you very much. I was indeed missing the proxy settings for https. I cant however seem to be able to specify both http and https proxy configurations at the same time. I could only get this to work if I substituted the http proxy section with https.

        1. Jan 28, 2008

          aaron frishling says:

          i think it may be necessary to specify ids for each of the proxies, which is don...

          i think it may be necessary to specify ids for each of the proxies, which is done with with the <ID> tag.

          here's how it looks in mine, which seems to work, though i don't think it's accessed any http servers recently

           <proxies>
              <proxy>
                <id>httpsproxy</id>
                <active>true</active>
                <protocol>https</protocol>
                <username></username>
                <password></password>
                <host>hostip</host>
                <port>hostport</port>
                <nonProxyHosts>localhost</nonProxyHosts>
              </proxy>
              <proxy>
                <id>httpproxy</id>
                <active>true</active>
                <protocol>http</protocol>
                <username></username>
                <password></password>
                <host>hostip</host>
                <port>hostport</port>
                <nonProxyHosts>localhost</nonProxyHosts>
              </proxy>
              </proxies>

  3. Jan 25, 2008

    Kristyn Oliveti says:

    Any suggestions on what one should do when trying to modify an existing plugin t...

    Any suggestions on what one should do when trying to modify an existing plugin that was built in Ant (therefore there is only a build.xml, not a project.xml or pom.xml)? Given the rather extensive modifications I am attempting, I would like to be able to do my work in a real IDE like Eclipse, and build and test it according to these instructions. As it is though I am unsure how to go about this

    1. Jan 29, 2008

      Jonathan Nolen says:

      Well, this page is only partly applicable, but you can start here: How to conver...

      Well, this page is only partly applicable, but you can start here: How to convert an existing plugin to the new development framework.

      The main task will be to create a valid POM for your project. I might advise using the archetype to create an empty project, and the copy your old files into the new structure.

  4. Jan 25, 2008

    Roberto Dominguez says:

    Thanks for the Tip! I was just wondering about that... Couple of comments: Yo...

    Thanks for the Tip! I was just wondering about that...

    Couple of comments:

  5. Feb 07, 2008

    Joshua Goodall says:

    Current confluence source build instructions fail with [ERROR] BUILD ERROR [IN...

    Current confluence source build instructions fail with

    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to resolve artifact.
    
    GroupId: org.apache.maven.plugins
    ArtifactId: maven-clover-plugin
    Version: 2.4.1
    
    Reason: Unable to download the artifact from any repository
    
      org.apache.maven.plugins:maven-clover-plugin:pom:2.4.1
    

    My hack wordaround: added ibiblio as a central mirror in settings.xml and hacked my local copy of atlassian-base-pom-8.pom to make Maven fetch 2.4 instead.

  6. Apr 01, 2008

    Matt Doar says:

    Looks like the latest version of maven doesn't work with the plexus-compiler. At...

    Looks like the latest version of maven doesn't work with the plexus-compiler. At least there's a fix for it in the plexus fisheye but nothing past 1.5.3 yet.

    The error is:

    [INFO] [compiler:compile]
    [INFO] Compiling 1 source file to /Users/mdoar/jira/timecharts/target/classes
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Fatal error compiling
    
    Embedded error: Prohibited package name: java.lang
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
    	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:498)
    	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
    	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
    
    
    1. Apr 01, 2008

      Matt Doar says:

      Here is the commit that I'm referring to: http://svn.plexus.codehaus.org/change...
  7. Apr 01, 2008

    Matt Doar says:

    Forcing my mac to use jdk1.4 got me past that problem.

    Forcing my mac to use jdk1.4 got me past that problem.

  8. May 26, 2008

    Frank Stiller says:

    I modified and compiled the jira3 plugin since some time, i did that when ant wa...

    I modified and compiled the jira3 plugin since some time, i did that when ant was runable without modifications in the confluence/plugins folder. Now i am switching to the maven2 style and the only way to get this to run was to write the follwing into my settings.xml:

    <mirrors>
         <mirror>
           <mirrorOf>central</mirrorOf>
           <name>atlassian-central</name>
           <url>https://maven.atlassian.com/contrib</url>
           <id/>
         </mirror>
         <mirror>
                <mirrorOf>central</mirrorOf>
                <name>another-atlassian-central</name>
                <url>https://maven.atlassian.com/repository/public</url>
                <id/>
         </mirror>
      </mirrors>
    

    I tried all of the steps listed here, but all other except central is ignored. So if anyone can tell me how to run the "official" way or whether its not good this way i would be thankfull.

  9. May 27, 2008

    Ali Ibrahim says:

    Are the example files included in the previous development kit included in this ...

    Are the example files included in the previous development kit included in this build environment?  I trying to build a plugin using Maven 2.0 and Eclipse, but I haven't had too much success.  Some kind of example would be very helpful.

  10. May 30, 2008

    Chris Fletcher says:

    Hi everyone,  I installed both maven and the PDK successfully, now I am tr...

    Hi everyone,

     I installed both maven and the PDK successfully, now I am trying to get a JIRA archetype up and running.  I keep getting this error:

     C:\Documents and Settings\Chris\.m2>mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Maven Default Project
    [INFO]    task-segment: [org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create] (aggregator-style)
    [INFO] ------------------------------------------------------------------------
    [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
    [INFO] Setting property: velocimacro.messages.on => 'false'.
    [INFO] Setting property: resource.loader => 'classpath'.
    [INFO] Setting property: resource.manager.logwhenfound => 'false'.
    [INFO] **************************************************************
    [INFO] Starting Jakarta Velocity v1.4
    [INFO] RuntimeInstance initializing.
    [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
    [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
    [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
    [INFO] ClasspathResourceLoader : initialization starting.
    [INFO] ClasspathResourceLoader : initialization complete.
    [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
    [INFO] Default ResourceManager initialization complete.
    [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
    [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
    [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
    [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
    [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
    [INFO] Created: 20 parsers.
    [INFO] Velocimacro : initialization starting.
    [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
    [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
    [INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable
     to find resource 'VM_global_library.vm'
    [INFO] Velocimacro :  VM library template macro registration complete.
    [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
    [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
    [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in scope if allowed.
    [INFO] Velocimacro : initialization complete.
    [INFO] Velocity successfully started.
    [INFO] [archetype:create]
    [INFO] Defaulting package to group ID: null
    [INFO] artifact org.apache.maven.archetypes:maven-archetype-quickstart: checking for updates from atlassian-public
    [WARNING] repository metadata for: 'artifact org.apache.maven.archetypes:maven-archetype-quickstart' could not be retrieved from repository:
     atlassian-public due to an error: Error transferring file
    [INFO] Repository 'atlassian-public' will be blacklisted
    [INFO] artifact org.apache.maven.archetypes:maven-archetype-quickstart: checking for updates from atlassian-contrib
    [WARNING] repository metadata for: 'artifact org.apache.maven.archetypes:maven-archetype-quickstart' could not be retrieved from repository:
     atlassian-contrib due to an error: Error transferring file
    [INFO] Repository 'atlassian-contrib' will be blacklisted
    [INFO] artifact org.apache.maven.archetypes:maven-archetype-quickstart: checking for updates from atlassian-m1-repository
    [WARNING] repository metadata for: 'artifact org.apache.maven.archetypes:maven-archetype-quickstart' could not be retrieved from repository:
     atlassian-m1-repository due to an error: Error transferring file
    [INFO] Repository 'atlassian-m1-repository' will be blacklisted
    [INFO] ----------------------------------------------------------------------------
    [INFO] Using following parameters for creating Archetype: maven-archetype-quickstart:RELEASE
    [INFO] ----------------------------------------------------------------------------
    [INFO] Parameter: groupId, Value: null
    [INFO] Parameter: packageName, Value: null
    [INFO] Parameter: basedir, Value: C:\Documents and Settings\Chris\.m2
    [INFO] Parameter: package, Value: null
    [INFO] Parameter: version, Value: 1.0-SNAPSHOT
    [INFO] Parameter: artifactId, Value: null
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error creating from archetype

    Embedded error: Artifact ID must be specified when creating a new project from an archetype.
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1 minute 6 seconds
    [INFO] Finished at: Fri May 30 16:52:58 PDT 2008
    [INFO] Final Memory: 5M/10M
    [INFO] ------------------------------------------------------------------------

    C:\Documents and Settings\Chris\.m2>  -DarchetypeGroupId=com.atlassian.maven.archetypes
    '-DarchetypeGroupId' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Documents and Settings\Chris\.m2>  -DarchetypeArtifactId=jira-plugin-archetype
    '-DarchetypeArtifactId' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Documents and Settings\Chris\.m2>  -DarchetypeVersion=10
    '-DarchetypeVersion' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Documents and Settings\Chris\.m2>  -DremoteRepositories=https://maven.atlassian.com/repository/public/
    '-DremoteRepositories' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Documents and Settings\Chris\.m2>  -DgroupId=XXX.XXXX.jira.plugin.pilot -DartifactId=pilot

    Anyone seen this error before?  Is there any way to fix it? (putting the arguments in " " to prevent the = split in the windows cmd prompt doesn't work ; ) )

    Thanks! 

    1. May 30, 2008

      David Peterson [CustomWare] says:

      Hi Chris, On Windows you will have to put all of the arguments on a single line...

      Hi Chris,

      On Windows you will have to put all of the arguments on a single line before you hit enter. On Unix and relativies you can break it up by putting '
      ' at the end of each line, but that won't work in Windows. As such, you'll have to copy-n-paste each line individually onto the end of your command.

      Personally, I set up a batch file which just needed me to provide the groupId and artifactId. Much simpler...

  11. Jun 10, 2008

    Justy Justinson says:

    Hi, the archetype creation and other maven tasks work for me, but I'm getting p...

    Hi,

    the archetype creation and other maven tasks work for me, but I'm getting problems with eclipse plugin. The .classpath file is not created at all, and the .project file looks like:

    <projectDescription>
    
      <name>jira-ps-plugin</name>
    
      <comment>Parent POM for JIRA plugins. Specifies which version of Java to compile
            against, and Maven repositories for JIRA and its dependencies.</comment>
    
      <projects/>
    
      <buildSpec/>
    
     <natures/>
    
    </projectDescription>
    

    Does it work how it should?

    1. Jun 12, 2008

      Tim Moore says:

      There is an issue with some versions of the atlassian-pdk plugin that causes the...

      There is an issue with some versions of the atlassian-pdk plugin that causes the problem you're seeing. This has been fixed in atlassian-pdk, but unfortunately the Maven configuration for tge Confluence plugin archetype is still using an older version. You can force it to use the latest version by putting this into your plugin's pom.xml file:

          <build>
              <plugins>
                  <plugin>
                      <groupId>com.atlassian.maven.plugins</groupId>
                      <artifactId>atlassian-pdk</artifactId>
                      <version>2.1.5-SNAPSHOT</version>
                  </plugin>
              </plugins>
          </build>
      

      (If your POM already has a <build> section, just add the <plugins> section inside it)

      We plan to release atlassian-pdk-2.1.5 and create a new version of the archetype and the plugin base POM that use it as soon as we can. Sorry about the confusion in the meantime.

  12. Jun 19, 2008

    Michael Immell says:

    Littlle frustrated as this page says "Atlassian provides a Maven proxy that cont...

    Littlle frustrated as this page says "Atlassian provides a Maven proxy that contains all of the dependencies for all of our products." However if you go to the attlassian-mail link, you can't find anything...

    https://maven.atlassian.com/browse/atlassian-mail/atlassian-mail/1.5

     Where am I supposed to get this from now?

  13. Jul 04, 2008

    iconde says:

    I already downloaded Eclipse 3.2. I'm using the JDK 1.4. I also downloaded Apach...

    I already downloaded Eclipse 3.2. I'm using the JDK 1.4. I also downloaded Apache Maven 2.0.9 which I used to download all the libraries included in the Jira-development-kit-3.2 for Eclipse. I stored all the libraries inside the /.m2/ folder. So.. It should work, but it doesn't, because whenever I try to open a new project in Eclipse(it doesn't matter if I chose a Java project or a Plug-in project, the desired template to develop a jira plug-in. And if link the libraries to the project it doesn't reckon the jar files as libraries. What am I doing wrong?

    1. Jul 07, 2008

      Tim Moore says:

      Are you using 'mvn eclipse:eclipse' to generate the Eclipse project files? You ...

      Are you using 'mvn eclipse:eclipse' to generate the Eclipse project files? You shouldn't need to download any libraries yourself, or manually set up your project classpath. When you want to open the project you should tell Eclipse to import the existing project rather than creating a new one from scratch.

  14. Jul 07, 2008

    Jacky Li says:

    I got the errors below when I tried the steps until this one - Run mvn idea:idea...

    I got the errors below when I tried the steps until this one - Run mvn idea:idea or mvn eclipse:eclipse in the top-level directory of your new plugin.

    08-7-7 下午03时59分28秒: Scanned javadoc C:/Documents and Settings/lijian/.m2/repository/com/atlassian/extras/atlassian-extras/1.12/atlassian-extras-1.12-javadoc.jar 0.0
    08-7-7 下午03时59分28秒: Scanned javadoc C:/Documents and Settings/lijian/.m2/repository/com/atlassian/renderer/atlassian-renderer/3.14/atlassian-renderer-3.14-javadoc.jar 0.0
    08-7-7 下午03时59分29秒: Parsing error C:\Documents and Settings\lijian\.m2\repository\seraph\seraph\0.7.17\seraph-0.7.17.pom; org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'id' (position: START_TAG seen ...<dependency>\r\n      <id>... @51:11)
    08-7-7 下午03时59分29秒: Unable to read test/pom.xml; org.eclipse.core.runtime.CoreException: Parsing error C:\Documents and Settings\lijian\.m2\repository\seraph\seraph\0.7.17\seraph-0.7.17.pom; org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'id' (position: START_TAG seen ...<dependency>\r\n      <id>... @51:11)
     

    1. Jul 07, 2008

      Tim Moore says:

      Try deleting C:\Documents and Settings\lijian\.m2\repository\seraph\seraph\0.7.1...

      Try deleting C:\Documents and Settings\lijian\.m2\repository\seraph\seraph\0.7.17\seraph-0.7.17.pom and give it another shot. It looks like Maven may have downloaded it incorrectly.

      1. Jul 07, 2008

        Jacky Li says:

        Many thanks for your reply. I've tried deleting seraph folder and delete seraph-...

        Many thanks for your reply. I've tried deleting seraph folder and delete seraph-0.7.17.pom, but none of them worked. Then I checked the pom file on https://maven.atlassian.com/repository/public, and found that seraph-0.7.17.pom is using modelversion 3, which is inconsistent with modelversion 4.0.0. 

        I think a newer version should be used, such as seraph-0.7.19 or 0.7.23 etc. But I don't know which jar is using  seraph-0.7.17

        1. Jul 08, 2008

          Jacky Li says:

          I found where is the problem: I hated to see some many elements in the .classpat...

          I found where is the problem: I hated to see some many elements in the .classpath file, such as:

           <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.0.2/activation-1.0.2.jar"/>
           <classpathentry kind="var" path="M2_REPO/mockobjects/alt-jdk1.3/0.07/alt-jdk1.3-0.07.jar"/>...

          so I deleted them all, replaced with one line:
            <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>

          Then I got  org.codehaus.plexus.util.xml.pull.XmlPullParserException as mentioned before.

          I can fix this problem by leaving around 200 elements as< classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.0.2/activation-1.0.2.jar"/> in .classpath file, but I think it's not a good solution.

          1. Jul 08, 2008

            Tim Moore says:

            It looks like that's a bug in m2eclipse: http://jira.codehaus.org/browse/MNGECL...

            It looks like that's a bug in m2eclipse:

            http://jira.codehaus.org/browse/MNGECLIPSE-257

            This could continue to be a problem until either the bug is fixed in m2eclipse or JIRA is fully converted to Maven 2. In the meantime, I think that 'mvn eclipse:eclipse' should work, so if you just let it manage your .classpath file that way, you should be good. You don't need to check the .classpath file into source control, since it can be regenerated automatically by Maven, so I'd recommend leaving it alone.

            1. Jul 08, 2008

              Jacky Li says:

              I understand now, thanks

              I understand now, thanks

  15. Jul 17, 2008

    Ray La Valley says:

    OK.  I'm very new to Jira and have downloaded Maven and the PDK plugin...

    OK.  I'm very new to Jira and have downloaded Maven and the PDK plugin.  Where do I install these?  On the server that has Jira installed, or is this a local application to my desktop?  A lot of this documentation makes it look like it has to be on the server with Jira, but nothing specific addresses this.  If so, then does Jira then suddenly provide some menu option to get into Maven to develope plugins?

    1. Jul 17, 2008

      Tim Moore says:

      Ray, Maven is a development tool that you want to install on your development w...

      Ray,

      Maven is a development tool that you want to install on your development workstation. It will let you run a simple JIRA server on your workstation for testing. When your plugin is finished, you can upload the plugin JAR onto your production JIRA server. You don't need Maven on the JIRA server.

      The PDK plugin is automatically downloaded by Maven when you build your plugin. You don't need to install it yourself.

      If you're having trouble getting started, I'd recommend joining the JIRA Dev forum and asking questions there.

      --
      Tim Moore
      Atlassian Plugin Developer

  16. Jul 31, 2008

    joshua Rodman says:

    I just had a big fight with maven 2 and the example settings.xml file. I had th...

    I just had a big fight with maven 2 and the example settings.xml file.

    I had the following problems

     1 - A lot of attribute values were not properly quoted.  Maven 2 did not like this.
     2 - A lot of input, img and a few other tags were not closed.  Maven 2 did not like this.
     3 - Some attribute values (hrefs) had ampersand characters that were not correctly quoted, eg <a href="blah&blah"> instead of <a href="blah&amp;blah">. This one was pretty pernicious because the parser gets confused and complains about an invalid use of an equals sign later because it looks like <a href="blah&blah=blah"> and entities can't have equals in their names.
     4 - "Error reading settings.xml: Error reading settings file"  this last one has me stumped.

    I get the feeling that either my maven or java is different from yours:

    jrodman@calufrax:~ >mvn --version
    Maven version: 2.0.9
    Java version: 1.6.0_07
    OS name: "linux" version: "2.6.24-1-amd64" arch: "amd64" Family: "unix"

    Or someone isn't testing their edits to the Example settings.xml very well.

    1. Jul 31, 2008

      Tim Moore says:

      Joshua, Are you sure you've created settings.xml correctly? There shouldn't be...

      Joshua,

      Are you sure you've created settings.xml correctly? There shouldn't be any hrefs, img tags or any other HTML in it. The 'Example settings.xml' link above goes to a wiki page that contains the XML source you want, along with some brief instructions – you'll need to copy and paste the XML part into a file. It sounds like you may have downloaded the link directly.

  17. Aug 19, 2008

    Jeff Kirby says:

    I've followed the instructions.  When I open my plug-in project in Eclipse ...

    I've followed the instructions.  When I open my plug-in project in Eclipse I get nothing but errors because all the paths in my build path start with M2_REPO, like M2_REPO/velocity/1.4/velocity-1.4.jar.  Did I skip a step in the setup?  Why is M2_REPO not resolved to ~/.m2?

    1. Aug 19, 2008

      Jeff Kirby says:

      I figured it out.  Please add this step to your documentation: I needed to ...

      I figured it out.  Please add this step to your documentation: I needed to go into Eclipse | Window | Preferences | Java | Build Path | Classpath Variables and create a variable called M2_REPO which points to /home/me/.m2/repository. 

      1. Aug 19, 2008

        Tim Moore says:

        Done! There's also a way to do the same thing with a Maven command.

        Done! There's also a way to do the same thing with a Maven command.

  18. Sep 12, 2008

    Ethan McDonald says:

    I'm making my way through the "How to Build an Atlassian Plugin" I have plugin s...

    I'm making my way through the "How to Build an Atlassian Plugin" I have plugin skeleton laid out and when I run "mvn idea:idea" command I get "FATAL ERROR".

    Someone must have had this happen but all my searches come up with inconclusive solutions.

    The one thing that strikes me as unusual is that the URL listed for where it Downloading from doesn't exist !?
    http://repo1.maven.org/maven2/com/atlassian/jira/plugins/jira-plugin-base/8/jira-plugin-base-8.pom

    ERROR TEXT:

    C:\plugin-project\portal-assignedtasks>mvn idea:idea
     
    [INFO] Scanning for projects...
    Downloading: http://repo1.maven.org/maven2/com/atlassian/jira/plugins/jira-plugin-base/8/jira-plugin-base-8.pom
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to resolve artifact.
    GroupId: com.atlassian.jira.plugins
    ArtifactId: jira-plugin-base
    Version: 8
    Reason: Unable to download the artifact from any repository
      com.atlassian.jira.plugins:jira-plugin-base:pom:8
    from the specified remote repositories:
      central (http://repo1.maven.org/maven2)
    
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.atlassian.jira.plugins:jira-plugin-base for pr
    oject: com.retro.jira.plugins:portal-assignedtasks:atlassian-plugin:1.0-SNAPSHOT for project com.retro.jira.plugins:port
    al-assignedtasks:atlassian-plugin:1.0-SNAPSHOT
            at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
            at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
            at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
            at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.atlassian.jira.plugins:jira-plugin
    -base for project: com.retro.jira.plugins:portal-assignedtasks:atlassian-plugin:1.0-SNAPSHOT for project com.retro.jira.
    plugins:portal-assignedtasks:atlassian-plugin:1.0-SNAPSHOT
            at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1370)
            at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:821)
            at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.ja
    va:506)
            at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
            at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
            at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
            at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
            ... 11 more
    Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.atlassian.jira.plugins:jira-plugin-base' not foun
    d in repository: Unable to download the artifact from any repository
      com.atlassian.jira.plugins:jira-plugin-base:pom:8
    from the specified remote repositories:
      central (http://repo1.maven.org/maven2)
     for project com.atlassian.jira.plugins:jira-plugin-base
            at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:6
    03)
            at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1366)
            ... 17 more
    Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any reposi
    tory
      com.atlassian.jira.plugins:jira-plugin-base:pom:8
    from the specified remote repositories:
      central (http://repo1.maven.org/maven2)
            at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:212)
            at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:74)
            at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:5
    56)
            ... 18 more
    Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
            at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:331)
            at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:200)
            ... 20 more
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: < 1 second
    [INFO] Finished at: Thu Sep 11 15:56:01 CDT 2008
    [INFO] Final Memory: 1M/2M
    [INFO] ------------------------------------------------------------------------
    
    1. Sep 12, 2008

      Jeff Kirby says:

      Hi Ethan, I'm guessing that you don't have Atlassian's suggested settings in yo...

      Hi Ethan,

      I'm guessing that you don't have Atlassian's suggested settings in your HOME/.m2/settings.xml file and so Maven is trying to download Atlassian customizations from the central Maven repository at Apache.  The .pom that you need is at maven.atlassian.com and that setting has to exist in your settings.xml file.  See http://confluence.atlassian.com/display/DEVNET/Example+settings.xml

      Hope that helps,

      Jeff

      1. Sep 12, 2008

        Ethan McDonald says:

        Ok I got turned around and thought $HOME translated to %M2_HOME% in windows. It ...

        Ok I got turned around and thought $HOME translated to %M2_HOME% in windows.
        It all makes sense now it's %home% = "C:\Documents and Settings\username", Duh!

        Thanks for the help

    2. Sep 12, 2008

      Tim Moore says:

      Ethan, I responded to your thread on the forum: http://forums.atlassian.com/thre...

      Ethan, I responded to your thread on the forum: http://forums.atlassian.com/thread.jspa?messageID=257289298&#257289298 We can continue the conversation there.

  19. Sep 17, 2008

    Daniel Berkich says:

    I am working in an environment without internet access.  Does this mean tha...

    I am working in an environment without internet access.  Does this mean that my only option for building Jira plugins is by using the JIRA plugin dev kit and then using ANT to build it.

    Thanks

    1. Sep 22, 2008

      Tim Moore says:

      Daniel, I think your best bet is to use a computer that does have internet acce...

      Daniel,

      I think your best bet is to use a computer that does have internet access to build an archetype so Maven populates your $HOME/.m2/repository directory with the dependencies you need. Then copy that directory onto your normal development machine and use mvn -o to run Maven in offline mode.

  20. Oct 01, 2008

    Thomas Allen says:

    The wording on this page makes it seem like Eclipse or IDEA is required for deve...

    The wording on this page makes it seem like Eclipse or IDEA is required for developing these plugins. Is that the case? I'm not a Java guy by any means, and I use Vim for all code editing. I ran an "mvn clean test" and Maven downloaded quite a bit into my .m2/repository/ directory, but I want to make sure that I'm not missing anything.

     Also, how should I structure a theme plugin? Right now, the path to my .vmd files is /asce_theme/src/main/java/com/asce/confluence/themes/asce (based on a page in the main Confluence wiki, not this dev network).

    1. Oct 01, 2008

      Tim Moore says:

      You don't need to use Eclipse or IDEA — any text editor is fine, and you c...

      You don't need to use Eclipse or IDEA — any text editor is fine, and you can do all of your builds on the command line. I just adjusted the wording to try to clarify this. Do you think it makes sense now?

      Generally, .vmd files and any other non-java files would go into src/main/resources... instead of src/main/java. The difference is that Maven tries to compile the files in src/main/java, whereas files in src/main/resources are simply copied into the plugin. Within that directory, the com/asce/confluence/themes/asce structure looks good. You can actually use any directory structure you like, as long as it matches what you have in atlassian-plugins.xml, but I think using a java-package-like structure, as you are, is a good idea because it reduces the chances of name conflicts between your Velocity files and ones from other plugins, and it means that any Java classes will end up in the same location as the Velocity files within the JAR.

      1. Oct 02, 2008

        Thomas Allen says:

        Thanks for the quick response, I appreciate it. What you've changed above adds a...

        Thanks for the quick response, I appreciate it. What you've changed above adds a little clarity, but I think that this is the part that still gets (or would get) me:

        To set up your IDE project, simply run mvn eclipse:eclipse or mvn idea:idea from the root folder of the newly created directory (e.g. where the pom.xml resides).

        First, Maven will download all of the dependencies referenced in your pom.xml, and then all the inherited dependencies from the parent POMs. Your settings.xml specifies that maven should down the javadoc and source files as well, where they are available.

        Which leaves me with questions like:

        1. What command do I run if I'm not using one of these IDEs?
        2. How can I get these dependencies, editor-agnostic?
        3. (Bolded text) Do you mean "download"?

        It seemed to me like these dependencies were fetched on my first Maven build, but I have no way of knowing that. You may want to completely separate the two sections: Project setup (editor-agnostic), and IDE/editor instructions.

        As far as theme plugins go, do I need to include every Velocity file, or only the ones that I want to customize? I only want to customize the wrapper and a few other parts. In the past, I've done this using the "Layouts" admin page, and I'm really having a hard time making the transition from that overly-simplistic configuration to this very engineered approach. I have to say that the docs I've found on theme development are really poor, so I must be looking in the wrong place. So many details are left out that I couldn't possibly entrust my site's display to any theme plugin I write at the moment. Or is this simpler than I'm making it?

        Again, thanks for the help!

        1. Oct 03, 2008

          Tim Moore says:

          You can skip the whole "Maven and your IDE" section if you're not using one and ...

          You can skip the whole "Maven and your IDE" section if you're not using one and just move onto Developing your plugin and Testing your plugin. Maven downloads dependencies whenever it needs them, so if you skip the IDE setup step, it will download them whenever you first compile and package your application (just run 'mvn compile' or 'mvn package'). Or, if you follow the instructions on Developing your plugin and run 'mvn -Pplugin-debug' to test your plugin, that will go through downloading dependencies, compiling and packaging the plugin first before starting the server. In general, when you run most Maven commands it will figure out what needs to be done first and make sure it's all done in the right order. You can find out more about it at http://maven.apache.org/guides/index.html

          For your theme, you only need to include Velocity files that you're overriding. All of the theme documentation is at Theme Plugins and I agree it's a little spare on details, but I think the best way to learn is to look at the example theme plugins linked from that page. All of our theme plugins are available from our public Subversion repository so you can check out the way they do things to get a better idea of how it all works.

          Thanks for your feedback! I'll think about how the docs can be reworded to make it more obvious that the IDE setup is totally optional. Good luck with your plugin. You might also want to look at the Confluence development forum at http://forums.atlassian.com — it's a great place to get help.

  21. Oct 07, 2008

    Jeff Kirby says:

    Can I run 'mvn -PpluginDebug' and have JIRA 3.13 be my version rather than 3...

    Can I run 'mvn -PpluginDebug' and have JIRA 3.13 be my version rather than 3.12?

    1. Oct 07, 2008

      Jeff Kirby says:

      Never mind. I figured it out. I added these properties to my pom.xml <...

      Never mind. I figured it out. I added these properties to my pom.xml

         <properties>
             <atlassian.product.version>3.13</atlassian.product.version>
             <atlassian.product.test-lib.version>3.13</atlassian.product.test-lib.version>
             <atlassian.product.data.version>3.13</atlassian.product.data.version>
         </properties>
      

      Ouch. Looks like a lot of changes to the code base.

      package com.atlassian.jira.web.action.filter.professional does not exist
      cannot find symbol class ShareFilter
      cannot find symbol class SearchRequestManagerImpl
      cannot find symbol constructor IssueNavigator(com.atlassian.jira.issue.search.SearchProvider,com.atlassian.jira.issue.fields.layout.column.ColumnLayoutManager,com.atlassian.jira.issue.search.managers.IssueSearcherManager,com.atlassian.jira.issue.search.SearchRequestManager,com.atlassian.jira.web.component.TableLayoutFactory,com.atlassian.jira.issue.comments.CommentManager,com.atlassian.plugin.PluginManager,com.atlassian.jira.config.properties.ApplicationProperties)
      
  22. Oct 16, 2008

    Espog says:

    hello everyone i'm new on confluence and i need help! i have try to follow t...

    hello everyone i'm new on confluence and i need help! i have try to follow the "How to build an atlassian plugin"

    have install maven2.0.8; tomcat5.5.x; and confluence and its working, allready make a "hello world macro", but the plugin is killing me! i run "mvn compile" and i got

       root@espog-laptop:~/1pl/awesome-macro# mvn install
    [INFO] Scanning for projects...
    Downloading: http://repo1.maven.org/maven2/com/atlassian/confluence/plugin/base/confluence-plugin-base/13/confluence-plugin-base-13.pom
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error building POM (may not be this project's POM).

    Project ID: com.acme.confluence.plugins:awesome-macro:atlassian-plugin:1.0-SNAPSHOT

    Reason: Cannot find parent: com.atlassian.confluence.plugin.base:confluence-plugin-base for project: com.acme.confluence.plugins:awesome-macro:atlassian-plugin:1.0-SNAPSHOT for project com.acme.confluence.plugins:awesome-macro:atlassian-plugin:1.0-SNAPSHOT

    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.atlassian.confluence.plugin.base:confluence-plugin-base for project: com.acme.confluence.plugins:awesome-macro:atlassian-plugin:1.0-SNAPSHOT for project com.acme.confluence.plugins:awesome-macro:atlassian-plugin:1.0-SNAPSHOT
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:376)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:289)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.atlassian.confluence.plugin.base:confluence-plugin-base for project: com.acme.confluence.plugins:awesome-macro:atlassian-plugin:1.0-SNAPSHOT for project com.acme.confluence.plugins:awesome-macro:atlassian-plugin:1.0-SNAPSHOT
        at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1259)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:745)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:476)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:197)
        at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:548)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:458)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:362)
        ... 11 more
    Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.atlassian.confluence.plugin.base:confluence-plugin-base' not found in repository: Unable to download the artifact from any repository

      com.atlassian.confluence.plugin.base:confluence-plugin-base:pom:13

    from the specified remote repositories:
      central (http://repo1.maven.org/maven2)
     for project com.atlassian.confluence.plugin.base:confluence-plugin-base
        at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:571)
        at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1255)
        ... 17 more
    Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository

      com.atlassian.confluence.plugin.base:confluence-plugin-base:pom:13

    from the specified remote repositories:
      central (http://repo1.maven.org/maven2)

        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:206)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:73)
        at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:524)
        ... 18 more
    Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
        at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:324)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:194)
        ... 20 more
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 5 seconds
    [INFO] Finished at: Thu Oct 16 16:40:13 WEST 2008
    [INFO] Final Memory: 1M/4M
    [INFO] ------------------------------------------------------------------------


    perhaps its a simple thing that i didnt make!
    thanks in advance

    1. Oct 20, 2008

      Jonathan Nolen says:

      Looks like you're not using the correct settings.xml.

      Looks like you're not using the correct settings.xml.

      1. Oct 24, 2008

        Espog says:

        Thank you Jonathan for the tip, but i manage to use a different pom and it has c...

        Thank you Jonathan for the tip, but i manage to use a different pom and it has compiled the "awesome-macro", and i get to see "Hello World" by the way i use the questionniki pom.xml - it was the only one that works! can anyone tell me why!?

         Thank you once more.

  23. Dec 08, 2008

    Tim McDougall says:

    In the Developing your plugin section we are directed to the development/test/de...

    In the Developing your plugin section we are directed to the development/test/debug cycle page that addresses testing a completed plugin.  Aren't we missing the step of actually writing the plugin?  I don't think that is addressed anywhere in this guide.  In fact, development/test/debug cycle starts out by stating: "We're not going to discuss the details of what you need to do...we'll leave that for the product specific plugin guides."  First, does anyone know where these product specific guides are? (I am trying to write for Confluence)  Second, wouldn't it be better to put the links to those pages in the "Developing your plugin section"?

  24. Jan 01, 2009

    Wayne Le-Trung says:

    Hello, On my first attempt to build a JIRA plugin I followed the guide in 'How T...

    Hello,
    On my first attempt to build a JIRA plugin I followed the guide in 'How To Build An Atlassian Plugin' and managed to get the skeleton code produced. I am using IDEA tool for development and have tried the command 'mvn idea:idea' but kept having errors thrown back.
    I noticed that in the produced 'pom.xml' file the artifact 'atlassian-plugin-base' uses version 13 which does not exist anywhere in any repository. A search on Google indicated it was in https://maven.atlassian.com/contrib but I had to manually downloaded it and placed it in my local repository. The same command was executed and another error indicated that this time the parent artifact 'atlassian-plugin-pom' of version 9 could not be found and in fact this time I could not find anywhere on the net.
    Can anybody help me to understand what's going on and how to fix this?
    Thanks.
    Wayne

    PS: These are errors reported:

    C:\JIRA-Proj\plugin-dev\wfext1>mvn -e idea:idea
    + Error stacktraces are turned on.
    [INFO] Scanning for projects...
    Downloading: https://maven.atlassian.com/contrib/com/atlassian/pom/atlassian-plu
    gin-pom/9/atlassian-plugin-pom-9.pom
    Downloading: https://maven.atlassian.com/repository/public/com/atlassian/pom/atl
    assian-plugin-pom/9/atlassian-plugin-pom-9.pom
    Downloading: https://maven.atlassian.com/maven1/com.atlassian.pom/poms/atlassian
    -plugin-pom-9.pom
    Downloading: http://repo1.maven.org/maven2/com/atlassian/pom/atlassian-plugin-po
    m/9/atlassian-plugin-pom-9.pom
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error building POM (may not be this project's POM).

    Project ID: com.atlassian.jira.plugins:jira-plugin-base:pom:13

    Reason: Cannot find parent: com.atlassian.pom:atlassian-plugin-pom for project:
    com.atlassian.jira.plugins:jira-plugin-base:pom:13 for project com.atlassian.jir
    a.plugins:jira-plugin-base:pom:13

    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.atlass
    ian.pom:atlassian-plugin-pom for project: com.atlassian.jira.plugins:jira-plugin
    -base:pom:13 for project com.atlassian.jira.plugins:jira-plugin-base:pom:13
            at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
            at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
            at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

            at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent
    : com.atlassian.pom:atlassian-plugin-pom for project: com.atlassian.jira.plugins
    :jira-plugin-base:pom:13 for project com.atlassian.jira.plugins:jira-plugin-base
    :pom:13
            at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
    efaultMavenProjectBuilder.java:1370)
            at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
    efaultMavenProjectBuilder.java:1387)
            at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
    aultMavenProjectBuilder.java:821)
            at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
    leInternal(DefaultMavenProjectBuilder.java:506)
            at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
    nProjectBuilder.java:198)
            at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
            at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
            at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
            ... 11 more
    Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.atlassian
    .pom:atlassian-plugin-pom' not found in repository: Unable to download the artif
    act from any repository

      com.atlassian.pom:atlassian-plugin-pom:pom:9

    from the specified remote repositories:
      atlassian-m1-repository (https://maven.atlassian.com/maven1),
      atlassian-public (https://maven.atlassian.com/repository/public),
      central (http://repo1.maven.org/maven2),
      atlassian-contrib-repository (https://maven.atlassian.com/contrib)
     for project com.atlassian.pom:atlassian-plugin-pom
            at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
    sitory(DefaultMavenProjectBuilder.java:603)
            at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
    efaultMavenProjectBuilder.java:1366)
            ... 18 more
    Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable
    to download the artifact from any repository

      com.atlassian.pom:atlassian-plugin-pom:pom:9

    from the specified remote repositories:
      atlassian-m1-repository (https://maven.atlassian.com/maven1),
      atlassian-public (https://maven.atlassian.com/repository/public),
      central (http://repo1.maven.org/maven2),
      atlassian-contrib-repository (https://maven.atlassian.com/contrib)

            at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
    faultArtifactResolver.java:212)
            at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
    faultArtifactResolver.java:74)
            at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
    sitory(DefaultMavenProjectBuilder.java:556)
            ... 19 more
    Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to downl
    oad the artifact from any repository
            at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def
    aultWagonManager.java:331)
            at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
    faultArtifactResolver.java:200)
            ... 21 more
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1 minute 4 seconds
    [INFO] Finished at: Fri Jan 02 11:09:44 EST 2009
    [INFO] Final Memory: 2M/4M
    [INFO] ------------------------------------------------------------------------

    C:\JIRA-Proj\plugin-dev\wfext1>

    1. Jan 02, 2009

      Jonathan Nolen says:

      Hi Wayne, Are you sure that you are using the correct settings.xml.

      Hi Wayne,

      Are you sure that you are using the correct settings.xml.

      1. Jan 04

        Wayne Le-Trung says:

        Hello Jonathan, I used the same settings.xml as shown in your article. Neverthe...

        Hello Jonathan,

        I used the same settings.xml as shown in your article. Nevertheless I browsed through the forum and found out that somebody (on entirely different topics) had used a different proxy at m2proxy.atlassian.com and I had ago with it and it worked. However I still don't know why I could not download some of the pom files via maven but had to manually download from the site. Any idea?

        Regards,

        Wayne

  25. Jan 15

    Kevin Ross says:

    As attempted with Bamboo: In the instructions for installation of the source co...

    As attempted with Bamboo:

    In the instructions for installation of the source code, each module displays:

    [INFO] NOT adding java-sources to attached artifacts list.

    I was able to ensure attachment and installation locally by adding the following to the bulid/plugins section of the aggregation pom.xml:

    	<plugin>
    		<groupId>org.apache.maven.plugins</groupId>
    		<artifactId>maven-source-plugin</artifactId>
    		<configuration>
    			<attach>true</attach>
    		</configuration>
    		<executions>
    			<execution>
    				<id>attach-sources</id>
    				<goals>
    					<goal>jar</goal>
    				</goals>
    			</execution>
    		</executions>
    	</plugin>         
    

    I doubt this would be recommended for atlassian to change in the pom as it would provide for general distribution of the source code, BUT, I believe atlassian should provide a way as the process described above does not work.

    As a side note, for some reason, using mvn eclipse:eclipse is not attaching the sources.  I don't have a problem doing this with other projects, it may be a configuration somewhere in the pom that is not allowing it.  This isn't a big deal as it is easy enough to manually attach as necessary, but nonetheless an annoyance that could probably work out of the box.

  26. Jan 20

    Kevin Ross says:

    When attempting mvn source:jar install -Dmaven.test.skip=true The same ...

    When attempting

    mvn source:jar install -Dmaven.test.skip=true
    

    The same

    [INFO] NOT adding java-sources to attached artifacts list.
    

    Is appearing many times. I attempted the same workaround I used for bamboo, though most of the source jars i.e. confluence core did not make it into the local repository. It appears something is not configured properly in the confluence 2.10.1 source distribution poms.

  27. Jan 23

    Roberto Dominguez says:

    Hey Tim, thanx for updating on having to copy the packaged source code to the re...

    Hey Tim, thanx for updating on having to copy the packaged source code to the repository... I always thought I had done something wrong

    I guess the same javadocs,

    Hey Jonathan, is there a chance go get that done in the maven plugin itself? There are lots of source packages and the Idea project already have the source path attached

    Roberto

    1. Jan 23

      Tim Moore says:

      Roberto, We're working on a solution to get it to install automatically. I just...

      Roberto,

      We're working on a solution to get it to install automatically. I just fixed up the docs for the meantime so they're not misleading.

  28. Jan 28

    Thomas Dudziak says:

    Unfortunately, the maven archetype does not work for me - the generated pom refe...

    Unfortunately, the maven archetype does not work for me - the generated pom references a parent pom (com.atlassian.jira.plugins:jira-plugin-base:13) that references 6 artifacts that cannot be found anywhere (I created http://jira.atlassian.com/browse/JRA-16341).

    1. Mar 31

      Royce Wong says:

      Can't see this ticket...

      Can't see this ticket...

      1. Mar 31

        Thomas Dudziak says:

        Looks like somebody moved it to http://jira.atlassian.com/browse/RELENG-171 whic...

        Looks like somebody moved it to http://jira.atlassian.com/browse/RELENG-171 which is private.

  29. Feb 11

    Conversión Magro says:

    Hi there!, I'm quite new to maven and I was trying to simply point to the repo...

    Hi there!,

    I'm quite new to maven and I was trying to simply point to the repo within eclipse using the m2eclipse plugin.
    No luck, this is what I got:

    [WARN] Error reading archetype catalog http://maven.atlassian.com/repository/public Unable to locate resource in repository
    I guess it's because you're using archiva.
    

    That was my second try, first I tried from the command line, following the steps indicated in the doc and this is what I got:

    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'archetype'.
    [INFO] org.apache.maven.plugins: checking for updates from atlassian-public
    [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
    eved from repository: atlassian-public due to an error: Error transferring file
    [INFO] Repository 'atlassian-public' will be blacklisted
    [INFO] org.apache.maven.plugins: checking for updates from central
    [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
    eved from repository: central due to an error: Error transferring file
    [INFO] Repository 'central' will be blacklisted
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
    st or no valid version could be found
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2 seconds
    [INFO] Finished at: Thu Feb 12 01:34:22 CET 2009
    [INFO] Final Memory: 1M/4M
    [INFO] ------------------------------------------------------------------------
    

    Please help!!! I'm dying to develop some plugins for jira
    thanks

  30. Mar 04

    Stefan Wolf says:

    I want to develop a plugin for Confluence 2.5.8. I carefully followed the steps ...

    I want to develop a plugin for Confluence 2.5.8. I carefully followed the steps to test the plugin skeleton as base for further development. Maven is working, mvn eclipse:eclipse was also successful. I installed java.mail and javax.activation as described but am now facing a new problem: The last artifact that is missing is confluence-plugin-test-resources 2.5.8 :

    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to resolve artifact.
    Missing:
    ----------
    1) com.atlassian.confluence.plugins:confluence-plugin-test-resources:zip:2.5.8
      Try downloading the file manually from the project website.
      Then, install it using the command:
          mvn install:install-file -DgroupId=com.atlassian.confluence.plugins -Darti
    factId=confluence-plugin-test-resources -Dversion=2.5.8 -Dpackaging=zip -Dfile=/
    path/to/file
      Alternatively, if you host your own repository you can deploy the file there:
          mvn deploy:deploy-file -DgroupId=com.atlassian.confluence.plugins -Dartifa
    ctId=confluence-plugin-test-resources -Dversion=2.5.8 -Dpackaging=zip -Dfile=/pa
    th/to/file -Durl=[url] -DrepositoryId=[id]
      Path to dependency:
            1) profilexport:testplugin:atlassian-plugin:1.0-SNAPSHOT
            2) com.atlassian.confluence.plugins:confluence-plugin-test-resources:zip :2.5.8

    I searched in the repos but I only found the versions 2.5 and 2.6 (and higher) of the above mentioned artifact. None of those worked (as I assumed).

    I'm working with the example settings.xml and the properties in my pom.xml look like this:

        <properties>
            <atlassian.plugin.key>profilexport.testplugin</atlassian.plugin.key>
            <atlassian.product.version>2.5.8</atlassian.product.version>
            <atlassian.product.test-lib.version>1.4.1</atlassian.product.test-lib.version>
            <atlassian.product.data.version>2.5.8</atlassian.product.data.version>
        </properties>

    I assume there might be a mistake in the version numbers I entered. I'm pretty sure about the atlassion.product.version since I'm working with Confluence 2.5.8, but I'm not sure about the other two figures: atlassian.product.test-lib.version and atlassian.product.data.version ... though I don't have any clue what else to enter there.

    Any hints appreciated.

    1. Mar 04

      Stefan Wolf says:

      I should have followed my lead concerning the pom.xml figures before I wrote the...

      I should have followed my lead concerning the pom.xml figures before I wrote the comment above, I was sooo close! Well, maybe someone else encounters the same problem. In that case - here's the solution:

      Set the atlassian.product.data.version to 2.5 (instead of 2.5.8). Then the properties in pom-xml should look like this (also added atlassian.product.context but I don't think it made a difference):

          <properties>
              <atlassian.plugin.key>profilexport.testplugin</atlassian.plugin.key>
              <atlassian.product.version>2.5.8</atlassian.product.version>
              <atlassian.product.data.version>2.5</atlassian.product.data.version>
              <atlassian.product.test-lib.version>1.4.1</atlassian.product.test-lib.version>
              <atlassian.product.context>confluence</atlassian.product.context>
          </properties>

      Now everything works as is should.


Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 2.5 Australia License.