标签: atlassian-plugin-sdk

Confluence蓝图替换在具有纯文本正文的宏中不起作用

我根据Atlassian提供的基本/中级/高级教程创建了一个Confluence蓝图插件.我现在想要更新页面模板以包含{HTML}具有嵌入式CDATA 的宏,其中该CDATA中的URL包含要用用户输入的数据替换的部分.

我理想地喜欢做什么,<at:var...>被替换为locationid:

<ac:structured-macro ac:name="html">
  <ac:plain-text-body>
    <![CDATA[<iframe src="http://...?locationid=<at:var at:name="locationid"/>"></iframe>]]>
  </ac:plain-text-body>
</ac:structured-macro>
Run Code Online (Sandbox Code Playgroud)

不幸的是,这不起作用; 的<at:var at:name="...">内部CDATA不能被取代.

我已经尝试了各种格式,例如替换整个CDATA字符串本身,甚至可以<ac:structured-macro>在单个字符串中替换整个块.没有工作.

谷歌搜索带来了对Atlassian的社区维基两个非常相似的问题,这个这个.此外,我找到了一个Confluence Server JIRA来解决这个问题,但它被拒绝并关闭了.

尽管存在反对解决方案的证据,但我希望某位创意人员知道如何实现这一目标?

Atlassian SDK: 6.2.14

confluence atlassian-plugin-sdk

14
推荐指数
1
解决办法
175
查看次数

如何以编程方式将值保存到JIRA中的自定义字段?

我花了几天时间试图找出如何以编程方式将值保存或更新到CustomField中,并最终了解它是如何完成的.所以我会把它作为一个问题,然后回答它,因为我很想有这个问题和答案.

关于如何在JIRA中保存或更新自定义字段的值的文档存在冲突.我用的是:

customField.setCustomFieldValue(CustomField, value);
Run Code Online (Sandbox Code Playgroud)

这不会将值保存到数据库中,但它确实更新了值,据我所知.例如,如果您在工作流后期函数转换中进一步使用CustomField,它将非常有用.

我正在使用Jira 4.3.2.

如何将CustomFields值保存到JIRA数据库中?

java jira jira-plugin atlassian-plugin-sdk

13
推荐指数
1
解决办法
1万
查看次数

atlassian-plugin.xml包含component-import的定义.设置Atlassian-Plugin-Key时不允许这样做

这是我所得到的,当我运行atlas-create-jira-plugin,然后atlas-create-jira-plugin-module选择选项1: Component Import.

问题是所有教程示例似乎都有旧SDK版本生成的插件描述符(根本不会部署新版本的SDK/Jira),这些版本没有特色Atlassian-Plugin-Key,所以我找不到导入方法零件.

我正在使用SDK 6.2.3和Jira 7.1.1.

任何提示 - 如何解决这个问题?

jira-plugin atlassian-plugin-sdk

9
推荐指数
3
解决办法
5589
查看次数

如何以编程方式在文件*内容上运行Checkstyle,Findbugs或PMD*

我正在编写一个实用程序来检查Atlassian Stash对已修改文件的拉取请求 - 目标是通过Checkstyle(或Findbugs或PMD)运行每个Java文件,然后对每行有插件注释有问题.

为此,插件必须通过Checkstyle(或其他代码样式执行实用程序)运行请求中每个已修改 Java文件的内容.Atlassian Stash API使获取修改文件的内容变得非常容易,但似乎无法以编程方式通过Checkstyle运行这些内容 - 唯一的方法是将临时文件保存在磁盘上并运行Checkstyle通过调用Runtime.getRuntime().exec(...)命令来反对它.

是否有任何简化的类似Checkstyle的实用程序可以使用Java API以编程方式运行?

我基本上需要能做类似这样的事情:

String contentsOfJavaFile = ; //stuff
List<Problem> problems = CheckstyleOrSomethingElse.analyze(contentsOfJavaFile);

for(Problem p : problems) {
    // p.getLine();
    // p.getDescription();
    // add comment to Stash
}
Run Code Online (Sandbox Code Playgroud)

java findbugs checkstyle pmd atlassian-plugin-sdk

6
推荐指数
1
解决办法
1049
查看次数

如何在Task插件中使用Bamboo变量?

我试图在Task插件中使用Bamboo的构建变量(例如Bamboo.jira.version和类似的插件)。taskContext.getBuildContext().getVariableContext()仅使用似乎可以检索自定义的构建变量,而不能检索到Bamboo内置的变量。

插件SDK文档中似乎没有太多的文档,Atlassian Answers上似乎没有有效的答案或引用了SDK中仍然存在的API调用。

我该怎么做?

bamboo atlassian-plugin-sdk

5
推荐指数
1
解决办法
774
查看次数

我在哪里将atlassian-plugin-sdk'allowGoogleTracking'选项设置为false?

我已经安装/设置了atlassian-plugin-sdk,所以我可以查看JIRA插件开发.

但是,当我运行"atlas-run-standalone --product jira"命令并启动JIRA实例时,它会尝试连接到Google Analytics并拒绝连接(它被我们的代理阻止).

它说我可以关闭此跟踪选项:

you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml
Run Code Online (Sandbox Code Playgroud)

我的问题是,我在哪里可以找到这个"allowGoogleTracking"选项?其中pom.xml似乎无法在"atlassian-plugin-sdk"目录中找到一个.

我试过谷歌搜索和环顾四周,但我似乎无法找到他们确切地告诉我我应该编辑哪个pom.xml文件的任何地方.

atlassian-plugin-sdk

5
推荐指数
1
解决办法
2000
查看次数

Bamboo ProcessService bean 不存在?

https://developer.atlassian.com/bamboodev/bamboo-tasks-api/executing-external-processes-using-processservice之后,我想使用 ProcessService bean 调用一些命令。链接中描述的注入不起作用。我在 Bitbucket 检查了其他几个插件的来源,但每个插件都使用链接中描述的概念。

我的课:

import com.atlassian.bamboo.process.ProcessService;

public class CheckTask implements TaskType {
    private final ProcessService processService;
    public CheckTask(@NotNull final ProcessService processService) {
        this.processService = processService;
    }
Run Code Online (Sandbox Code Playgroud)

但是 Bamboo 没有找到 ProcessService bean 并失败并显示以下内容:

(org.springframework.beans.factory.UnsatisfiedDependencyException:创建名为“bamboo.tasks.CheckTask”的bean时出错:通过构造函数参数表达的不满意的依赖关系,类型为[com.atlassian.bamboo.process.ProcessService]的索引0::没有限定为依赖找到了 [com.atlassian.bamboo.process.ProcessService] 类型的 bean:预计至少有 1 个 bean 有资格作为此依赖的自动装配候选者。依赖注释:{};嵌套异常是 org.springframework.beans.factory.NoSuchBeanDefinitionException : 没有为依赖找到 [com.atlassian.bamboo.process.ProcessService] 类型的合格 bean:预计至少有 1 个 bean 有资格作为此依赖项的自动装配候选。依赖项注释:{})

我错过了什么吗?竹版:5.13.0 AMPS 版:6.2.6

java spring dependency-injection bamboo atlassian-plugin-sdk

5
推荐指数
1
解决办法
309
查看次数

Atlassian Confluence SDK 启动应用程序 404 问题

启动 Confluence 插件时,我总是收到以下错误:

[INFO] [talledLocalContainer] 2020-08-06 20:48:58,116 ERROR [main] [ContainerBase.[Catalina].[localhost].[/confluence]] log Exception sending context initialized event to listener instance of class [com.atlassian.confluence.setup.ConfluenceConfigurationListener]
INFO] [talledLocalContainer] java.lang.ExceptionInInitializerError
[INFO] [talledLocalContainer]   at com.ibm.icu.text.Collator.<clinit>(Collator.java:946)
[INFO] [talledLocalContainer]   at java.lang.Class.forName0(Native Method)
[INFO] [talledLocalContainer]   at java.lang.Class.forName(Class.java:264)
[INFO] [talledLocalContainer]   at org.h2.value.CompareMode.<clinit>(CompareMode.java:57)
[INFO] [talledLocalContainer]   at org.h2.engine.SessionRemote.<init>(SessionRemote.java:95)
[INFO] [talledLocalContainer]   at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:116)
[INFO] [talledLocalContainer] Aug 06, 2020 8:48:58 PM org.apache.catalina.core.StandardContext startInternal
[INFO] [talledLocalContainer]   at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:100)
[INFO] [talledLocalContainer]   at org.h2.Driver.connect(Driver.java:69)
[INFO] [talledLocalContainer] SEVERE: One or more listeners failed to start. Full details will …
Run Code Online (Sandbox Code Playgroud)

java tomcat confluence atlassian-plugin-sdk

5
推荐指数
2
解决办法
474
查看次数

Atlassian-plugin:未知的包装类型

我想开发 Stash 插件但无法开始。我们的 pom.xml 中有错误。

Project build error: Unknown packaging: atlassian-plugin
Project build error: Unresolveable build extension:
Plugin com.atlassian.maven.plugins:maven-stash-plugin:6.0.0
    or one of its dependencies could not be resolved:
Could not find artifact com.sun:tools:jar:1.7.0
    at specified path C:\Program Files (x86)\Java\jre1.7.0_75/../lib/tools.jar
Run Code Online (Sandbox Code Playgroud)

我开始知道 maven 无法将 atlasian-plugin 识别为包类型。有没有办法创建我们自己的包装类型?解决此问题的最佳方法是什么?

pom.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xxxxx</groupId>
    <artifactId>fkjghff</artifactId>
    <version>856</version>

    <organization>
        <name>CATE Developer Experience</name>
        <url>www.xxxxxx</url>
    </organization>

    <name>name of the project</name>
    <description>description of the project</description>
    <packaging>atlassian-plugin</packaging>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.stash</groupId>
                <artifactId>stash-parent</artifactId>
                <version>${stash.version}</version>
                <type>pom</type> …
Run Code Online (Sandbox Code Playgroud)

eclipse maven bitbucket-server atlassian-plugin-sdk

4
推荐指数
1
解决办法
2372
查看次数

在自定义Atlassian JIRA插件中注入SoyTemplateRenderer

我目前正在尝试开发一个自定义jira插件,它也使用servlet来渲染Soy模板.

这是我的servlet的代码:

    /*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package at.fraiss.plugins.custommenuitem.servlets;

import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import com.atlassian.soy.renderer.SoyTemplateRenderer;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Mario
 */
public class SoyTemplateServlet extends HttpServlet {

    private SoyTemplateRenderer soyTemplateRenderer;

    public SoyTemplateServlet(SoyTemplateRenderer soyTemplateRenderer)
    {
        this.soyTemplateRenderer = soyTemplateRenderer;
    }

    @Override
    public void doGet(HttpServletRequest request, …
Run Code Online (Sandbox Code Playgroud)

spring jira jira-plugin atlassian-plugin-sdk

3
推荐指数
1
解决办法
932
查看次数