From 72e066f8370dfce32fcc2603844265616dbace15 Mon Sep 17 00:00:00 2001 From: Lukas Steiger Date: Fri, 5 Apr 2019 17:35:20 +0200 Subject: [PATCH] Require Bundle javax.mail When working with Emails in a plugin, a `MessagingException`must be caught. Include the bundle that contains this exception by default. ```java IMailerService mailerService = getService(IMailerService.class); MailSender sender = mailerService.getDefaultSender(); if (mailerService.isMailEnabled()) { try { for (String mailAddress : mailAddresses) { mailerService.sendMail(sender, mailAddress, "subject", "body", null); } } catch (MessagingException e) { throw new TeamRepositoryException(e.getMessage()); } ``` --- .../resources/archetype-resources/plugin/META-INF/MANIFEST.MF | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF b/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF index 94fd8c0..b3f4d11 100644 --- a/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF +++ b/src/main/resources/archetype-resources/plugin/META-INF/MANIFEST.MF @@ -14,6 +14,7 @@ Require-Bundle: com.hp.hpl.jena, javax.xml.stream, javax.xml, + javax.mail, org.apache.log4j, com.ibm.icu, org.apache.commons.codec,