This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch release in repository https://gitbox.apache.org/repos/asf/commons-email.git
The following commit(s) were added to refs/heads/release by this push: new d57fa16 Documentation for Jakarta vs. Javax. d57fa16 is described below commit d57fa1651d7efbbab8258e4cb49a139fa8a97f45 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Mar 2 17:44:04 2024 -0500 Documentation for Jakarta vs. Javax. --- pom.xml | 1 + src/site/xdoc/index.xml | 10 ++++++++++ src/site/xdoc/userguide.xml | 23 +++++++++++++++++++---- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 05b92f8..f9f791c 100644 --- a/pom.xml +++ b/pom.xml @@ -84,6 +84,7 @@ <commons.rc.version>RC1</commons.rc.version> <commons.bc.version>1.5</commons.bc.version> <commons.releaseNotesLocation>${commons.parent.dir}/RELEASE-NOTES.txt</commons.releaseNotesLocation> + <commons.siteOutputDirectory>${basedir}/target/site</commons.siteOutputDirectory> <!-- override the default commons encoding property --> <commons.encoding>UTF-8</commons.encoding> <mockito-core.version>5.10.0</mockito-core.version> diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index dfa7789..5f76965 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -27,6 +27,16 @@ Commons Email aims to provide a API for sending email. It is built on top of the Java Mail API, which it aims to simplify. </p> + <p> + The component is split into the following Maven modules (JAR files) + </p> + <ul> + <li><a href="commons-email2-bom/index.html">commons-email2-bom</a>: Specifies a Bill of Material Maven POM.</li> + <li><a href="commons-email2-core/index.html">commons-email2-core</a>: Contains core classes.</li> + <li><a href="commons-email2-distribution/index.html">commons-email2-distribution</a>: Builds the zip and tar gz distribution files.</li> + <li><a href="commons-email2-jakarta/index.html">commons-email2-jakarta</a>: Contains Jakarta-specific classes.</li> + <li><a href="commons-email2-javax/index.html">commons-email2-javax</a>: Contains Javax-specific classes.</li> + </ul> <p> Some of the mail classes that are provided are as follows: <ul> diff --git a/src/site/xdoc/userguide.xml b/src/site/xdoc/userguide.xml index 9232580..9ee2c57 100644 --- a/src/site/xdoc/userguide.xml +++ b/src/site/xdoc/userguide.xml @@ -23,6 +23,12 @@ </properties> <body> + <section name="Using Jakarta or Javax packages"> + <p> + You first need to decide whether you are using classes from the <code>commons-email2-jakarta</code> or <code>commons-email2-javax</code> module. + The example assume you are importing classes from one of these two modules. + </p> + </section> <section name="A simple text email"> <p> Our first example will create a basic email message to "John Doe" and @@ -65,7 +71,9 @@ email.send(); </p> <source> <![CDATA[ -import org.apache.commons.mail.*; +import org.apache.commons.mail2.jakarta.*; +// or: +import org.apache.commons.mail2.javax.*; ... // Create the attachment @@ -100,7 +108,9 @@ import org.apache.commons.mail.*; </p> <source> <![CDATA[ -import org.apache.commons.mail.*; +import org.apache.commons.mail2.jakarta.*; +// or: +import org.apache.commons.mail2.javax.*; ... // Create the attachment @@ -138,7 +148,10 @@ import org.apache.commons.mail.*; </p> <source> <![CDATA[ -import org.apache.commons.mail.HtmlEmail; +import org.apache.commons.mail2.jakarta.*; +// or: +import org.apache.commons.mail2.javax.*; + ... // Create the email message @@ -183,7 +196,9 @@ import org.apache.commons.mail.HtmlEmail; </p> <source> <![CDATA[ -import org.apache.commons.mail.HtmlEmail; +import org.apache.commons.mail2.jakarta.*; +// or: +import org.apache.commons.mail2.javax.*; ... // load your HTML email template