5

我已经安装/设置了 atlassian-plugin-sdk,所以我可以研究 JIRA 插件开发。

但是,当我运行“atlas-run-standalone --product jira”命令并启动 JIRA 实例时,它会尝试连接到谷歌分析并被拒绝连接(它被我们的代理阻止)。

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

you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml

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

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

4

2 回答 2

8

从文档中:

默认情况下,AMPS 会向 Google 分析发送基本使用事件。要禁用跟踪,请执行以下任一操作:

  1. 添加<allow.google.tracking>false</allow.google.tracking>到文件的<properties>部分.m2/settings.xml
  2. <allowGoogleTracking>false</allowGoogleTracking>在您的 amps 插件配置中包含pom.xml
  3. -Dallow.google.tracking=false或在命令行上传递。

最简单的方法是将其设置在您的~/.m2/settings.xml文件中,在默认配置文件中。您可能还希望同时设置skipAllPrompts

<settings>
  ...
  <profiles>
    <profile>
      <id>defaultProfile</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      ...
      <properties>
        <allow.google.tracking>false</allow.google.tracking>
        <skipAllPrompts>true</skipAllPrompts>
     </properties>
    </profile>
   </profiles>
</settings>
于 2014-08-18T10:28:02.917 回答
0

我已将以下内容添加到 pom 文件中:

  <build>
    <plugins>
      <!-- other plugins ... -->
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-amps-plugin</artifactId>
        <version>5.1.11</version>
        <configuration>
          <allowGoogleTracking>false</allowGoogleTracking>
        </configuration>
      </plugin>
    </plugins>
    <!-- other stuff -->
  </build>

不幸的是它不起作用......而且我不想在 maven 中添加一个属性settings.xml。我添加到 pom 中的代码段有问题吗?有人有“解决方案”吗?

于 2015-09-03T15:48:28.213 回答