Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-33782

Cannot compile Confluence plugin against Confluence 5.5.1 or 5.5.2

    XMLWordPrintable

Details

    Description

      When using the Atlassian Plugin SDK to compile a Confluence plugin built against 5.5.1 or 5.5.2, the package phase fails because a pom cannot be found.

      For some reason, Maven is searching repo1.maven.org for the com.atlassian.refapp:atlassian-platform:2.20.0 pom instead of maven.atlassian.com.

      The problem cannot be reproduced when the confluence.version is set to 5.5

      Steps to reproduce:

      • Run with Maven 2 + AMPS 4.2.20
      eah-yeah:test jclark$ atlas-version
      
      ATLAS Version:    4.2.20
      ATLAS Home:       /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec
      ATLAS Scripts:    /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/bin
      ATLAS Maven Home: /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/apache-maven
      --------
      Executing: /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/apache-maven/bin/mvn --version -gs /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/apache-maven/conf/settings.xml
      Apache Maven 2.1.0 (r755702; 2009-03-18 12:10:27-0700)
      Java version: 1.7.0_25
      Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: "mac os x" version: "10.8.5" arch: "x86_64" Family: "mac"
      
      • Ensure you do not have a settings.xml configured with Atlassian's private repositories in your user directory.
      yeah-yeah:test jclark$ ls ~/.m2
      repository
      
      • Create a new plugin
      yeah-yeah:test jclark$ atlas-create-confluence-plugin
      Executing: /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/apache-maven/bin/mvn com.atlassian.maven.plugins:maven-confluence-plugin:4.2.20:create -gs /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/apache-maven/conf/settings.xml
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Maven Default Project
      [INFO]    task-segment: [com.atlassian.maven.plugins:maven-confluence-plugin:4.2.20:create] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      [INFO] [confluence:create]
      [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:confluence - Create Plugin
      [INFO] determining latest stable product version...
      [INFO] artifact com.atlassian.confluence:confluence-webapp: checking for updates from atlassian-public
      [INFO] artifact com.atlassian.confluence:confluence-webapp: checking for updates from atlassian-plugin-sdk
      [INFO] artifact com.atlassian.confluence:confluence-webapp: checking for updates from central
      [INFO] using latest stable product version: 5.5.2
      [INFO] determining latest stable data version...
      [INFO] artifact com.atlassian.confluence.plugins:confluence-plugin-test-resources: checking for updates from atlassian-public
      [INFO] artifact com.atlassian.confluence.plugins:confluence-plugin-test-resources: checking for updates from atlassian-plugin-sdk
      [INFO] artifact com.atlassian.confluence.plugins:confluence-plugin-test-resources: checking for updates from central
      [INFO] using latest stable data version: 5.5.2
      Define value for groupId: : com.atlassian.test
      Define value for artifactId: : test-plugin
      Define value for version:  [1.0-SNAPSHOT]: 1.0-SNAPSHOT
      Define value for package:  [com.atlassian.test]:
      Confirm properties configuration:
      groupId: com.atlassian.test
      artifactId: test-plugin
      version: 1.0-SNAPSHOT
      package: com.atlassian.test
       [Y]: Y
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-archetype-plugin/2.0-alpha-4/maven-archetype-plugin-2.0-alpha-4.pom
      4K downloaded  (maven-archetype-plugin-2.0-alpha-4.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/archetype/maven-archetype/2.0-alpha-4/maven-archetype-2.0-alpha-4.pom
      13K downloaded  (maven-archetype-2.0-alpha-4.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-archetype-plugin/2.0-alpha-4/maven-archetype-plugin-2.0-alpha-4.jar
      63K downloaded  (maven-archetype-plugin-2.0-alpha-4.jar)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/archetype/archetype-common/2.0-alpha-4/archetype-common-2.0-alpha-4.pom
      15K downloaded  (archetype-common-2.0-alpha-4.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-core/2.0.8/maven-core-2.0.8.pom
      6K downloaded  (maven-core-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-settings/2.0.8/maven-settings-2.0.8.pom
      2K downloaded  (maven-settings-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/wagon/wagon-file/1.0-alpha-6/wagon-file-1.0-alpha-6.pom
      441b downloaded  (wagon-file-1.0-alpha-6.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/wagon/wagon-providers/1.0-alpha-6/wagon-providers-1.0-alpha-6.pom
      1K downloaded  (wagon-providers-1.0-alpha-6.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-plugin-parameter-documenter/2.0.8/maven-plugin-parameter-documenter-2.0.8.pom
      1K downloaded  (maven-plugin-parameter-documenter-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/reporting/maven-reporting-api/2.0.8/maven-reporting-api-2.0.8.pom
      1K downloaded  (maven-reporting-api-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/reporting/maven-reporting/2.0.8/maven-reporting-2.0.8.pom
      1K downloaded  (maven-reporting-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-9/doxia-sink-api-1.0-alpha-9.pom
      1K downloaded  (doxia-sink-api-1.0-alpha-9.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/doxia/doxia/1.0-alpha-9/doxia-1.0-alpha-9.pom
      8K downloaded  (doxia-1.0-alpha-9.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-profile/2.0.8/maven-profile-2.0.8.pom
      1K downloaded  (maven-profile-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-repository-metadata/2.0.8/maven-repository-metadata-2.0.8.pom
      1K downloaded  (maven-repository-metadata-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-error-diagnostics/2.0.8/maven-error-diagnostics-2.0.8.pom
      1K downloaded  (maven-error-diagnostics-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-artifact-manager/2.0.8/maven-artifact-manager-2.0.8.pom
      2K downloaded  (maven-artifact-manager-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-plugin-registry/2.0.8/maven-plugin-registry-2.0.8.pom
      1K downloaded  (maven-plugin-registry-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-5/plexus-interactivity-api-1.0-alpha-5.pom
      430b downloaded  (plexus-interactivity-api-1.0-alpha-5.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/codehaus/plexus/plexus-interactivity/1.0-alpha-5/plexus-interactivity-1.0-alpha-5.pom
      482b downloaded  (plexus-interactivity-1.0-alpha-5.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-plugin-descriptor/2.0.8/maven-plugin-descriptor-2.0.8.pom
      2K downloaded  (maven-plugin-descriptor-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-monitor/2.0.8/maven-monitor-2.0.8.pom
      1K downloaded  (maven-monitor-2.0.8.pom)
      Downloading: https://maven.atlassian.com/repository/public/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.pom
      1K downloaded  (jchardet-1.0.pom)
      Downloading: https://maven.atlassian.com/repository/public/commons-io/commons-io/1.3.1/commons-io-1.3.1.pom
      6K downloaded  (commons-io-1.3.1.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/shared/maven-invoker/2.0.6/maven-invoker-2.0.6.pom
      2K downloaded  (maven-invoker-2.0.6.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/shared/maven-shared-components/6/maven-shared-components-6.pom
      3K downloaded  (maven-shared-components-6.pom)
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/maven-monitor/2.0/maven-monitor-2.0.pom
      400b downloaded  (maven-monitor-2.0.pom)
      Downloading: https://maven.atlassian.com/repository/public/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/shared/maven-invoker/2.0.6/maven-invoker-2.0.6.jar
      Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/archetype/archetype-common/2.0-alpha-4/archetype-common-2.0-alpha-4.jar
      Downloading: https://maven.atlassian.com/repository/public/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar
      Downloading: https://maven.atlassian.com/repository/public/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.jar
      24K downloaded  (maven-invoker-2.0.6.jar)
      Downloading: https://maven.atlassian.com/repository/public/commons-collections/commons-collections/3.2/commons-collections-3.2.jar
      25K downloaded  (jchardet-1.0.jar)
      81K downloaded  (commons-io-1.3.1.jar)
      229K downloaded  (archetype-common-2.0-alpha-4.jar)
      557K downloaded  (commons-collections-3.2.jar)
      306K downloaded  (dom4j-1.6.1.jar)
      [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] [archetype:generate]
      [INFO] Generating project in Batch mode
      [INFO] Archetype repository missing. Using the one from [com.atlassian.maven.archetypes:confluence-plugin-archetype:RELEASE -> https://maven.atlassian.com/public] found in catalog internal
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 37 seconds
      [INFO] Finished at: Tue May 27 11:28:17 PDT 2014
      [INFO] Final Memory: 57M/321M
      [INFO] ------------------------------------------------------------------------
      
      • Verify the plugin will build against an affected version
      yeah-yeah:test jclark$ cd test-plugin/
      
      yeah-yeah:test-plugin jclark$ cat pom.xml | grep confluence\.version
                  <version>${confluence.version}</version>
                          <productVersion>${confluence.version}</productVersion>
              <confluence.version>5.5.2</confluence.version>
      
      • Try to compile the plugin... it fails
      yeah-yeah:test-plugin jclark$ atlas-package
      Executing: /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/apache-maven/bin/mvn package -gs /usr/local/Cellar/atlassian-plugin-sdk/4.2.20/libexec/apache-maven/conf/settings.xml
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building test-plugin
      [INFO]    task-segment: [package]
      [INFO] ------------------------------------------------------------------------
      Downloading: http://repo1.maven.org/maven2/com/atlassian/refapp/atlassian-platform/2.20.0/atlassian-platform-2.20.0.pom
      [INFO] Unable to find resource 'com.atlassian.refapp:atlassian-platform:pom:2.20.0' in repository central (http://repo1.maven.org/maven2)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error building POM (may not be this project's POM).
      
      
      Project ID: com.atlassian.refapp:atlassian-platform
      
      Reason: POM 'com.atlassian.refapp:atlassian-platform' not found in repository: Unable to download the artifact from any repository
      
        com.atlassian.refapp:atlassian-platform:pom:2.20.0
      
      from the specified remote repositories:
        central (http://repo1.maven.org/maven2)
      
       for project com.atlassian.refapp:atlassian-platform
      
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3 seconds
      [INFO] Finished at: Tue May 27 11:28:54 PDT 2014
      [INFO] Final Memory: 44M/317M
      [INFO] ------------------------------------------------------------------------
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jclark@atlassian.com Joe Clark
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: