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

External developers are unable to compile plugins against Confluence 4.2

    XMLWordPrintable

Details

    Description

      The Confluence 4.2 jar exposes a dependency on the javax.resource:connector artifact, which is not available via any public maven repository due to licensing restrictions.

      This makes it difficult for an external developer to build plugins against Confluence 4.2, as they may not have this artifact in their local maven repository. Atlassian developers are unaffected by this problem because we can keep the artifact within the private Atlassian repository without breaking any re-distribution rules.

      Trying to compile a Confluence plugin against Confluence 4.2 with a clean maven repo generates the following error:

      6694K downloaded  (confluence-4.2.jar)
      Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/confluence/confluence-upgrade/4.2/confluence-upgrade-4.2.jar
      99K downloaded  (crowd-api-2.4.0-rc1.jar)
      Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/crowd/crowd-integration-client-rest/2.4.0-rc1/crowd-integration-client-rest-2.4.0-rc1.jar
      26K downloaded  (confluence-upgrade-4.2.jar)
      Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/confluence/confluence-bucket/4.2/confluence-bucket-4.2.jar
      60K downloaded  (crowd-integration-client-rest-2.4.0-rc1.jar)
      117K downloaded  (confluence-bucket-4.2.jar)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Unable to execute mojo
      
      Embedded error: Missing:
      ----------
      1) javax.resource:connector:jar:1.5
      
        Try downloading the file manually from the project website.
      
        Then, install it using the command: 
            mvn install:install-file -DgroupId=javax.resource -DartifactId=connector -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file
      
        Alternatively, if you host your own repository you can deploy the file there: 
            mvn deploy:deploy-file -DgroupId=javax.resource -DartifactId=connector -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
      
        Path to dependency: 
        	1) com.atlassian.confluence.ext:newcode-macro-plugin:atlassian-plugin:2.0.13-SNAPSHOT
        	2) com.atlassian.confluence:confluence:jar:4.2
        	3) hibernate:hibernate:jar:2.1.8-atlassian-12
        	4) javax.resource:connector:jar:1.5
      
      ----------
      1 required artifact is missing.
      
      for artifact: 
        com.atlassian.confluence.ext:newcode-macro-plugin:atlassian-plugin:2.0.13-SNAPSHOT
      
      from the specified remote repositories:
        atlassian-plugin-sdk (file:///Users/jaysee/Dev/atlassian-plugin-sdk-3.9.2/repository),
        central (http://repo1.maven.org/maven2),
        atlassian-public (https://m2proxy.atlassian.com/repository/public)
      
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 34 seconds
      [INFO] Finished at: Mon Jun 04 14:21:16 PDT 2012
      [INFO] Final Memory: 55M/110M
      [INFO] ------------------------------------------------------------------------
      

      This is a pretty unpleasant experience for external developers - they now must find a copy of the connector jar and install it manually in their local maven repo. For someone who is unfamiliar with maven, this may even prove to be an insurmountable obstacle without assistance.

      Confluence 4.1 did not have this problem.

      How can we fix this?

      Attachments

        Issue Links

          Activity

            People

              richatkins Richard Atkins
              jclark@atlassian.com Joe Clark
              Votes:
              8 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: