6

I have installed/setup the atlassian-plugin-sdk so I can look into JIRA plugin development.

However, when I run "atlas-run-standalone --product jira" command and it starts up the JIRA instance, it tries to connect to google analytics and gets a connection refused (its being blocked by our proxy).

It says I can turn this tracking option off:

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

My question is, where do I find this "allowGoogleTracking" option? In which pom.xml as I cant seem to find one in the "atlassian-plugin-sdk" directory.

I have tried googling and looking around, but I cant seem to find anywhere they tell me exactly which pom.xml file I am supposed to edit.

dleerob
  • 4,951
  • 4
  • 24
  • 36

2 Answers2

9

From the documentation:

AMPS sends basic usage events to Google analytics by default. To disable tracking, either:

  1. Add <allow.google.tracking>false</allow.google.tracking> to the <properties> section of your .m2/settings.xml file
  2. Include <allowGoogleTracking>false</allowGoogleTracking> in the amps plugin configuration in your pom.xml
  3. or pass -Dallow.google.tracking=false on the command line.

The simplest is to set it in your ~/.m2/settings.xml file, in a default profile. You may also wish to set skipAllPrompts at the same time:

<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>
Joe
  • 29,416
  • 12
  • 68
  • 88
  • 4
    Thank you, I edited the settings.xml in the atlassian-plugin-sdk\apache-maven-3.2.1\conf directory and it worked for me. – dleerob Aug 18 '14 at 11:45
  • 2
    you can also set ATLAS_OPTS environment variable ( -Dallow.google.tracking=false ) – culmat Jul 16 '19 at 09:20
0

I've added the following into the pom file:

  <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>

Unfortunately it doesn't work ... and I rather do not want to add a property for that into maven settings.xml. Is something wrong with my snippet i've added into pom? Does somebody has the "solution"?

  • 1
    If it doesn't work then you should post it as a comment, because it's not an answer per se. However, in this case I tried your code and it actually worked for me. I would suggest that you remove the last paragraph and make it actually an "answer" instead of a question. – zypA13510 Aug 16 '21 at 11:11