You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2020/10/02 08:02:02 UTC
[james-project] 02/05: JAMES-3395 revert package name to
'org.apache.james.examples' and jar name to examples. Make examples pom to
inherit from Apache pom.
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 4e2ad1aa6f5bdaa47aee32cab819428053ca9c0b
Author: Juhan Aasaru <Ju...@nortal.com>
AuthorDate: Thu Oct 1 10:45:33 2020 +0300
JAMES-3395 revert package name to 'org.apache.james.examples' and jar name to examples. Make examples pom to inherit from Apache pom.
---
README.adoc | 3 ++-
.../pages/distributed/extending/mail-processing.adoc | 4 ++--
examples/custom-listeners/pom.xml | 6 +++---
.../custom/listeners/SetCustomFlagOnBigMessages.java | 2 +-
.../custom-listeners/src/main/resources/listeners.xml | 2 +-
.../custom/listeners/SetCustomFlagOnBigMessagesTest.java | 6 +++---
examples/custom-mailets/pom.xml | 11 ++---------
.../examples}/custom/mailets/IsDelayedForMoreThan.java | 2 +-
.../examples}/custom/mailets/SendPromotionCode.java | 2 +-
.../src/main/resources/mailetcontainer.xml | 4 ++--
examples/pom.xml | 16 ++++++++++------
src/homepage/howTo/custom-listeners.html | 2 +-
src/homepage/howTo/mail-processing.html | 4 ++--
13 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/README.adoc b/README.adoc
index 1641073..1c4fec1 100644
--- a/README.adoc
+++ b/README.adoc
@@ -401,7 +401,8 @@ Beware : you will have concurrency issues if multiple containers are running on
== Develop on James
-James requires at least JDK 11 and maven 3.6.0 to build.
+James requires at least JDK 11 and Maven 3.6.0 to build.
+Some parts of James are written in Scala so one might need to enable Scala plugin in IDE.
=== How to run deployment Tests
diff --git a/docs/modules/servers/pages/distributed/extending/mail-processing.adoc b/docs/modules/servers/pages/distributed/extending/mail-processing.adoc
index 50ba94b..0dc3102 100644
--- a/docs/modules/servers/pages/distributed/extending/mail-processing.adoc
+++ b/docs/modules/servers/pages/distributed/extending/mail-processing.adoc
@@ -140,8 +140,8 @@ Then, we will write the *mailetcontainer.xml* file expressing the logic we want:
<processors>
<processor state="root" enableJmx="true">
<mailet match="All" class="PostmasterAlias"/>
- <mailet match="org.apache.examples.james.custom.mailets.IsDelayedForMoreThan=1 day"
- class="org.apache.examples.james.custom.mailets.SendPromotionCode">
+ <mailet match="org.apache.james.examples.custom.mailets.IsDelayedForMoreThan=1 day"
+ class="org.apache.james.examples.custom.mailets.SendPromotionCode">
<reason>Your email had been delayed for a long time. Because we are sorry about it, please find the
following promotion code.</reason>
<promotionCode>1542-2563-5469</promotionCode>
diff --git a/examples/custom-listeners/pom.xml b/examples/custom-listeners/pom.xml
index 8d049a6..93540fa 100644
--- a/examples/custom-listeners/pom.xml
+++ b/examples/custom-listeners/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <artifactId>james-examples</artifactId>
- <groupId>org.apache.examples.james</groupId>
+ <artifactId>examples</artifactId>
+ <groupId>org.apache.james.examples</groupId>
<version>3.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+
<artifactId>custom-listeners</artifactId>
<name>Apache James :: Examples :: Custom Listeners</name>
@@ -15,7 +16,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
diff --git a/examples/custom-listeners/src/main/java/org/apache/examples/james/custom/listeners/SetCustomFlagOnBigMessages.java b/examples/custom-listeners/src/main/java/org/apache/james/examples/custom/listeners/SetCustomFlagOnBigMessages.java
similarity index 98%
rename from examples/custom-listeners/src/main/java/org/apache/examples/james/custom/listeners/SetCustomFlagOnBigMessages.java
rename to examples/custom-listeners/src/main/java/org/apache/james/examples/custom/listeners/SetCustomFlagOnBigMessages.java
index 11e5f98..1d1b08d 100644
--- a/examples/custom-listeners/src/main/java/org/apache/examples/james/custom/listeners/SetCustomFlagOnBigMessages.java
+++ b/examples/custom-listeners/src/main/java/org/apache/james/examples/custom/listeners/SetCustomFlagOnBigMessages.java
@@ -17,7 +17,7 @@
* under the License. *
****************************************************************/
-package org.apache.examples.james.custom.listeners;
+package org.apache.james.examples.custom.listeners;
import javax.inject.Inject;
import javax.mail.Flags;
diff --git a/examples/custom-listeners/src/main/resources/listeners.xml b/examples/custom-listeners/src/main/resources/listeners.xml
index 81a84e4..0b87bad 100644
--- a/examples/custom-listeners/src/main/resources/listeners.xml
+++ b/examples/custom-listeners/src/main/resources/listeners.xml
@@ -20,6 +20,6 @@
<listeners>
<listener>
- <class>org.apache.examples.james.custom.listeners.SetCustomFlagOnBigMessages</class>
+ <class>org.apache.james.examples.custom.listeners.SetCustomFlagOnBigMessages</class>
</listener>
</listeners>
diff --git a/examples/custom-listeners/src/test/java/org/apache/examples/james/custom/listeners/SetCustomFlagOnBigMessagesTest.java b/examples/custom-listeners/src/test/java/org/apache/james/examples/custom/listeners/SetCustomFlagOnBigMessagesTest.java
similarity index 97%
rename from examples/custom-listeners/src/test/java/org/apache/examples/james/custom/listeners/SetCustomFlagOnBigMessagesTest.java
rename to examples/custom-listeners/src/test/java/org/apache/james/examples/custom/listeners/SetCustomFlagOnBigMessagesTest.java
index 989931e..8972fff 100644
--- a/examples/custom-listeners/src/test/java/org/apache/examples/james/custom/listeners/SetCustomFlagOnBigMessagesTest.java
+++ b/examples/custom-listeners/src/test/java/org/apache/james/examples/custom/listeners/SetCustomFlagOnBigMessagesTest.java
@@ -17,10 +17,10 @@
* under the License. *
****************************************************************/
-package org.apache.examples.james.custom.listeners;
+package org.apache.james.examples.custom.listeners;
-import static org.apache.examples.james.custom.listeners.SetCustomFlagOnBigMessages.BIG_MESSAGE;
-import static org.apache.examples.james.custom.listeners.SetCustomFlagOnBigMessages.ONE_MB;
+import static org.apache.james.examples.custom.listeners.SetCustomFlagOnBigMessages.BIG_MESSAGE;
+import static org.apache.james.examples.custom.listeners.SetCustomFlagOnBigMessages.ONE_MB;
import static org.assertj.core.api.Assertions.assertThat;
import java.nio.charset.StandardCharsets;
diff --git a/examples/custom-mailets/pom.xml b/examples/custom-mailets/pom.xml
index 8c2ed3a..dfceb5d 100644
--- a/examples/custom-mailets/pom.xml
+++ b/examples/custom-mailets/pom.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <artifactId>james-examples</artifactId>
- <groupId>org.apache.examples.james</groupId>
+ <artifactId>examples</artifactId>
+ <groupId>org.apache.james.examples</groupId>
<version>3.6.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -26,12 +26,6 @@
<artifactId>james-server-util</artifactId>
<version>${james.baseVersion}</version>
</dependency>
- <dependency>
- <groupId>${james.groupId}</groupId>
- <artifactId>testing-base</artifactId>
- <version>${james.baseVersion}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
@@ -39,7 +33,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
diff --git a/examples/custom-mailets/src/main/java/org/apache/examples/james/custom/mailets/IsDelayedForMoreThan.java b/examples/custom-mailets/src/main/java/org/apache/james/examples/custom/mailets/IsDelayedForMoreThan.java
similarity index 98%
rename from examples/custom-mailets/src/main/java/org/apache/examples/james/custom/mailets/IsDelayedForMoreThan.java
rename to examples/custom-mailets/src/main/java/org/apache/james/examples/custom/mailets/IsDelayedForMoreThan.java
index 8910fe1..aad8b37 100644
--- a/examples/custom-mailets/src/main/java/org/apache/examples/james/custom/mailets/IsDelayedForMoreThan.java
+++ b/examples/custom-mailets/src/main/java/org/apache/james/examples/custom/mailets/IsDelayedForMoreThan.java
@@ -17,7 +17,7 @@
* under the License. *
****************************************************************/
-package org.apache.examples.james.custom.mailets;
+package org.apache.james.examples.custom.mailets;
import java.time.Clock;
import java.time.Duration;
diff --git a/examples/custom-mailets/src/main/java/org/apache/examples/james/custom/mailets/SendPromotionCode.java b/examples/custom-mailets/src/main/java/org/apache/james/examples/custom/mailets/SendPromotionCode.java
similarity index 98%
rename from examples/custom-mailets/src/main/java/org/apache/examples/james/custom/mailets/SendPromotionCode.java
rename to examples/custom-mailets/src/main/java/org/apache/james/examples/custom/mailets/SendPromotionCode.java
index db0274e..4ad2b07 100644
--- a/examples/custom-mailets/src/main/java/org/apache/examples/james/custom/mailets/SendPromotionCode.java
+++ b/examples/custom-mailets/src/main/java/org/apache/james/examples/custom/mailets/SendPromotionCode.java
@@ -17,7 +17,7 @@
* under the License. *
****************************************************************/
-package org.apache.examples.james.custom.mailets;
+package org.apache.james.examples.custom.mailets;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
diff --git a/examples/custom-mailets/src/main/resources/mailetcontainer.xml b/examples/custom-mailets/src/main/resources/mailetcontainer.xml
index 811399b..4817d3f 100644
--- a/examples/custom-mailets/src/main/resources/mailetcontainer.xml
+++ b/examples/custom-mailets/src/main/resources/mailetcontainer.xml
@@ -33,8 +33,8 @@
<processor state="root" enableJmx="true">
<mailet match="All" class="PostmasterAlias"/>
- <mailet match="org.apache.examples.james.custom.mailets.IsDelayedForMoreThan=1 day"
- class="org.apache.examples.james.custom.mailets.SendPromotionCode">
+ <mailet match="org.apache.james.examples.custom.mailets.IsDelayedForMoreThan=1 day"
+ class="org.apache.james.examples.custom.mailets.SendPromotionCode">
<reason>Your email had been delayed for a long time. Because we are sorry about it, please find the
following promotion code.</reason>
<promotionCode>1542-2563-5469</promotionCode>
diff --git a/examples/pom.xml b/examples/pom.xml
index 2da7000..b6345b2 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -20,11 +20,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.examples.james</groupId>
- <version>3.6.0-SNAPSHOT</version>
+ <parent>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>23</version>
+ <relativePath></relativePath>
+ </parent>
<packaging>pom</packaging>
- <artifactId>james-examples</artifactId>
+ <groupId>org.apache.james.examples</groupId>
+ <artifactId>examples</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
<name>Apache James :: Examples</name>
@@ -35,9 +41,7 @@
<properties>
<james.groupId>org.apache.james</james.groupId>
- <james.baseVersion>3.6.0-SNAPSHOT</james.baseVersion>
-
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <james.baseVersion>${project.version}</james.baseVersion>
<maven.compiler.target>1.11</maven.compiler.target>
<maven.compiler.source>1.11</maven.compiler.source>
diff --git a/src/homepage/howTo/custom-listeners.html b/src/homepage/howTo/custom-listeners.html
index dd2d756..975c0d2 100644
--- a/src/homepage/howTo/custom-listeners.html
+++ b/src/homepage/howTo/custom-listeners.html
@@ -116,7 +116,7 @@ $ keytool -genkey -alias james -keyalg RSA -keystore conf/keystore
<pre><code>
<listeners>
<listener>
- <class>org.apache.examples.james.custom.listeners.SetCustomFlagOnBigMessages</class>
+ <class>org.apache.james.examples.custom.listeners.SetCustomFlagOnBigMessages</class>
</listener>
</listeners>
</code></pre>
diff --git a/src/homepage/howTo/mail-processing.html b/src/homepage/howTo/mail-processing.html
index 279e2d6..0662aee 100644
--- a/src/homepage/howTo/mail-processing.html
+++ b/src/homepage/howTo/mail-processing.html
@@ -183,8 +183,8 @@ public void init() throws MessagingException {
<processors>
<processor state="root" enableJmx="true">
<mailet match="All" class="PostmasterAlias"/>
- <mailet match="org.apache.examples.james.custom.mailets.IsDelayedForMoreThan=1 day"
- class="org.apache.examples.james.custom.mailets.SendPromotionCode">
+ <mailet match="org.apache.james.examples.custom.mailets.IsDelayedForMoreThan=1 day"
+ class="org.apache.james.examples.custom.mailets.SendPromotionCode">
<reason>Your email had been delayed for a long time. Because we are sorry about it, please find the
following promotion code.</reason>
<promotionCode>1542-2563-5469</promotionCode>
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org