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

Please add versioned dependency to javax.mail

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a bug
    • Medium
    • None
    • 2.10
    • None

    Description

      Hello,

      The mail.jar distributed with JavaMail API 1.4 does not contain sun.mail.pop3.POP3Message that is referenced in Confluence 2.10 source. At my company we use internal Maven proxy when compiling Confluence, which uses Atlassian Maven repository as a remote backend, but it also contains some 3rd party stuff such as the JavaMail API so no local deployment is necessary. We have version 1.4.1 of the javax.mail.mail installed. In confluence-2.10-source/confluence-project/confluence/pom.xml the following dependency is defined:

      <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      </dependency>

      Since no version is specified, Maven picks up the latest version of the artifact in can find, and in this case it's 1.4.1. Since there's no sun.mail.pop3.POP3Message class in the jar, Confluence compilation will fail. I patched the pom.xml like this:

      <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.3.3</version>
      </dependency>

      And now it picks up the version 1.3.3 which is also installed on our local repository and this version contains POP3Message class. Now Confluence is built successfully. I think it would be great if Confluence was shipped with a pom.xml that refers to known working version of the 1.3.x series of Java MailApi by default. http://confluence.atlassian.com/display/DOC/Building+Confluence+From+Source+Code would need updating, though, instead of referring to version 1.x.x you should use the exactly same version there as what's defined in the POM.

      Attachments

        Activity

          People

            Unassigned Unassigned
            744135a9a5ef Tuomas Jormola
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: