Atlassian SDK 8.0.16

Hello,

I’m trying to create a JIRA plugin with the SDK (atlas-create-jira-plugin), but I got 2 problems :

  1. the sdk tries to access to google-analytics.com and to analyze the groupId I tell it, and then it fails because it can’t access this URL
  2. the sdk fails because it loses the groupId

What can I do ?

1 Like

Hi @ICDCInformatiqueCDC,

I’m a little unsure of what you mean when you say " 1. the sdk tries to access to google-analytics.com and to analyze the groupId I tell it, and then it fails because it can’t access this URL".

Can you please let me know what the error you’re seeing is?

Cheers,
Melissa

Hi,

This is the full scenario :

C:\Local\Eclipse\ccmt>\Developpement\atlassian-plugin-sdk-8.0.16\bin\atlas-create-jira-plugin
Executing: “C:\Developpement\atlassian-plugin-sdk-8.0.16\apache-maven-3.5.4\bin\mvn.cmd” com.atlassian.maven.plugins:jira-maven-plugin:8.0.2:create -gs C:\Developpement\atlassian-plugin-sdk-8.0.16\apache-maven-3.5.4/conf/settings.xml
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] — jira-maven-plugin:8.0.2:create (default-cli) @ standalone-pom —
juil. 02, 2019 11:27:35 AM java.util.prefs.WindowsPreferences
AVERTISSEMENT: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
[INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics.
[INFO] Although no personal information is sent, you may disable tracking by adding false to the amps plugin configuration in your pom.xml
[INFO] Sending event to Google Analytics: AMPS:jira - Create Plugin
[INFO] using stable product version: 7.13.0
[INFO] using stable data version: 7.13.0
Define value for groupId: : [ERROR] Error making tracking request
java.net.UnknownHostException: www.google-analytics.com
at java.net.AbstractPlainSocketImpl.connect (Unknown Source)
at java.net.PlainSocketImpl.connect (Unknown Source)
at java.net.SocksSocketImpl.connect (Unknown Source)
at java.net.Socket.connect (Unknown Source)
at java.net.Socket.connect (Unknown Source)
at sun.net.NetworkClient.doConnect (Unknown Source)
at sun.net.www.http.HttpClient.openServer (Unknown Source)
at sun.net.www.http.HttpClient.openServer (Unknown Source)
at sun.net.www.http.HttpClient. (Unknown Source)
at sun.net.www.http.HttpClient.New (Unknown Source)
at sun.net.www.http.HttpClient.New (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0 (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect (Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect (Unknown Source)
at com.dmurph.tracking.JGoogleAnalyticsTracker.dispatchRequest (JGoogleAnalyticsTracker.java:463)
at com.dmurph.tracking.JGoogleAnalyticsTracker.access$100 (JGoogleAnalyticsTracker.java:76)
at com.dmurph.tracking.JGoogleAnalyticsTracker$1.run (JGoogleAnalyticsTracker.java:431)

Define value for artifactId: : MSZPlugin
Define value for version: 1.0.0-SNAPSHOT: :
Define value for package: : : fr.icdc.dei
Confirm properties configuration:
groupId:
artifactId: MSZPlugin
version: 1.0.0-SNAPSHOT
package: fr.icdc.dei
Y: : Y
[INFO] Generating project in Batch mode
[WARNING] No archetype found in remote catalog. Defaulting to internal catalog
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repsoitory with id ‘archetype’ in your settings.xml if archetype’s repository is elsewhere.
[WARNING] Property groupId is missing. Add -DgroupId=someValue
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.815 s
[INFO] Finished at: 2019-07-02T11:28:13+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:jira-maven-plugin:8.0.2:create (default-cli) on project standalone-pom: Unable to execute mojo: Archetype com.atlassian.maven.archetypes:jira-plugin-archetype:8.0.2 is not configured
[ERROR] Property groupId is missing.
[ERROR] → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoExecutionException - Apache Maven - Apache Software Foundation

Are you maybe on a corporate network that filters DNS? What about sending www.google-analytics.com to a black hole or some other random web server you have lying about by editing your hosts file?

127.0.0.1 www.google-analytics.com

Might speed up general browsing too

You can disable analytics by including

 <allowGoogleTracking>false</allowGoogleTracking>

in the configuration section of the

<groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>jira-maven-plugin</artifactId>

However your second error is not related to this. If analytics fails there should be no build failure.

Can you post the top section of your pom.xml file?

The problem is trying to create a new project so there isn’t a pom.xml yet. I can reproduce this on Linux by disabling networking:

geoff@computer:~/tmp/expr$ atlas-version 

ATLAS Version:    8.0.16
ATLAS Home:       /usr/share/atlassian-plugin-sdk-8.0.16
ATLAS Scripts:    /usr/share/atlassian-plugin-sdk-8.0.16/bin
ATLAS Maven Home: /usr/share/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4
AMPS Version:     8.0.2
--------
Executing: /usr/share/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4/bin/mvn --version -gs /usr/share/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4/conf/settings.xml
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T04:33:14+10:00)
Maven home: /usr/share/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4
Java version: 1.8.0_161, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8.0_161/jre
Default locale: en_AU, platform encoding: UTF-8
OS name: "linux", version: "5.0.0-20-generic", arch: "amd64", family: "unix"
geoff@computer:~/tmp/expr$ atlas-create-jira-plugin
Executing: /usr/share/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4/bin/mvn com.atlassian.maven.plugins:jira-maven-plugin:8.0.2:create -gs /usr/share/atlassian-plugin-sdk-8.0.16/apache-maven-3.5.4/conf/settings.xml
[INFO] Scanning for projects...
Downloading from atlassian-public: https://maven.atlassian.com/repository/public/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.pom
Downloading from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.pom
Downloaded from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.pom (3.3 kB at 278 kB/s)
Downloading from atlassian-public: https://maven.atlassian.com/repository/public/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.jar
Downloading from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.jar
Downloaded from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/plugins/jira-maven-plugin/8.0.2/jira-maven-plugin-8.0.2.jar (78 kB at 5.2 MB/s)
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- jira-maven-plugin:8.0.2:create (default-cli) @ standalone-pom ---
Downloading from atlassian-public: https://maven.atlassian.com/repository/public/com/atlassian/maven/archetypes/jira-plugin-archetype/8.0.2/jira-plugin-archetype-8.0.2.pom
Downloading from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/archetypes/jira-plugin-archetype/8.0.2/jira-plugin-archetype-8.0.2.pom
Downloaded from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/archetypes/jira-plugin-archetype/8.0.2/jira-plugin-archetype-8.0.2.pom (742 B at 124 kB/s)
Downloading from atlassian-public: https://maven.atlassian.com/repository/public/com/atlassian/maven/archetypes/jira-plugin-archetype/8.0.2/jira-plugin-archetype-8.0.2.jar
Downloading from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/archetypes/jira-plugin-archetype/8.0.2/jira-plugin-archetype-8.0.2.jar
Downloaded from atlassian-plugin-sdk: file:///usr/share/atlassian-plugin-sdk-8.0.16/repository/com/atlassian/maven/archetypes/jira-plugin-archetype/8.0.2/jira-plugin-archetype-8.0.2.jar (18 kB at 2.5 MB/s)
[INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics.
[INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml
[INFO] Sending event to Google Analytics: AMPS:jira - SDK First Run - 8.0.2
[INFO] using stable product version: 7.13.0
[INFO] using stable data version: 7.13.0
[ERROR] Error making tracking request
java.net.UnknownHostException: www.google-analytics.com
    at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.java:184)
    at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:392)
    at java.net.Socket.connect (Socket.java:589)
    at java.net.Socket.connect (Socket.java:538)
    at sun.net.NetworkClient.doConnect (NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer (HttpClient.java:463)
    at sun.net.www.http.HttpClient.openServer (HttpClient.java:558)
    at sun.net.www.http.HttpClient.<init> (HttpClient.java:242)
    at sun.net.www.http.HttpClient.New (HttpClient.java:339)
    at sun.net.www.http.HttpClient.New (HttpClient.java:357)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (HttpURLConnection.java:1220)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0 (HttpURLConnection.java:1199)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect (HttpURLConnection.java:1050)
    at sun.net.www.protocol.http.HttpURLConnection.connect (HttpURLConnection.java:984)
    at com.dmurph.tracking.JGoogleAnalyticsTracker.dispatchRequest (JGoogleAnalyticsTracker.java:463)
    at com.dmurph.tracking.JGoogleAnalyticsTracker.access$100 (JGoogleAnalyticsTracker.java:76)
    at com.dmurph.tracking.JGoogleAnalyticsTracker$1.run (JGoogleAnalyticsTracker.java:431)

I updated /etc/hosts to send www.google-analytics.com to a black hole but then I get a different exception instead:

Define value for groupId: : [ERROR] Error making tracking request
java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect (Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect (AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress (AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:392)
    at java.net.Socket.connect (Socket.java:589)
    at java.net.Socket.connect (Socket.java:538)
    at sun.net.NetworkClient.doConnect (NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer (HttpClient.java:463)
    at sun.net.www.http.HttpClient.openServer (HttpClient.java:558)
    at sun.net.www.http.HttpClient.<init> (HttpClient.java:242)
    at sun.net.www.http.HttpClient.New (HttpClient.java:339)
    at sun.net.www.http.HttpClient.New (HttpClient.java:357)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (HttpURLConnection.java:1220)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0 (HttpURLConnection.java:1199)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect (HttpURLConnection.java:1050)
    at sun.net.www.protocol.http.HttpURLConnection.connect (HttpURLConnection.java:984)
    at com.dmurph.tracking.JGoogleAnalyticsTracker.dispatchRequest (JGoogleAnalyticsTracker.java:463)
    at com.dmurph.tracking.JGoogleAnalyticsTracker.access$100 (JGoogleAnalyticsTracker.java:76)
    at com.dmurph.tracking.JGoogleAnalyticsTracker$1.run (JGoogleAnalyticsTracker.java:431)

oops, didn’t see that.

Google Analytics can also disabled in settings.xml:

<allow.google.tracking>false</allow.google.tracking>

another possibility that might work is -Dallow.google.tracking=false when executing the command

3 Likes

couldn’t see where to add it in settings.xml but:

atlas-create-jira-plugin -Dallow.google.tracking=false

Seems to work! - thanks

1 Like

Hello,

Thanks for your answer.

The command line option -Dallow.google.tracking=false works fine for me.