[jira] [Created] (JAMES-1690) Add tests when sending a mail

2016-02-15 Thread Antoine Duprat (JIRA)
Antoine Duprat created JAMES-1690:
-

 Summary: Add tests when sending a mail
 Key: JAMES-1690
 URL: https://issues.apache.org/jira/browse/JAMES-1690
 Project: James Server
  Issue Type: Improvement
  Components: SMTPServer
Reporter: Antoine Duprat


Add tests when sending a mail, as there's none yet



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Created] (JAMES-1689) Implement stress tests

2016-02-15 Thread Antoine Duprat (JIRA)
Antoine Duprat created JAMES-1689:
-

 Summary: Implement stress tests
 Key: JAMES-1689
 URL: https://issues.apache.org/jira/browse/JAMES-1689
 Project: James Server
  Issue Type: New Feature
Reporter: Antoine Duprat


Before releasing the new James version, we are willing to introduce stress-tests
over IMAP & SMTP protocols.

In order to achieve this task, we will use the Gatling 
(https://github.com/gatling/gatling)
stress tool.
Gatling is developed in Scala and built upon :

* Async Http Client and Netty for non blocking HTTP
* Akka for actions (requests, pauses, assertions, etc...) modeling and 
orchestration ...

Gatling core engine is actually protocol agnostic, the first part of the 
project will be to implement two news protocols : SMTP and IMAP. 
This includes implementing the asynchronous and non-blocking code for this and 
also designing the right API to write the tests scenarios.

The tests will be written in scala, and the scenario will be defined in a 
sub-task
before starting the implementation.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[13/15] james-project git commit: fixup! fixup! JAMES-1676 setMessages/update: moved json parsing

2016-02-15 Thread matthieu
fixup! fixup! JAMES-1676 setMessages/update: moved json parsing


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4df0105a
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4df0105a
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4df0105a

Branch: refs/heads/master
Commit: 4df0105abdf7362ce7237f123fe93470d5c2c13c
Parents: 6d05a81
Author: Fabien Vignon 
Authored: Fri Feb 12 14:55:48 2016 +0100
Committer: Fabien Vignon 
Committed: Fri Feb 12 14:55:48 2016 +0100

--
 server/protocols/jmap/doc/specs/spec/message.mdwn | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/4df0105a/server/protocols/jmap/doc/specs/spec/message.mdwn
--
diff --git a/server/protocols/jmap/doc/specs/spec/message.mdwn 
b/server/protocols/jmap/doc/specs/spec/message.mdwn
index a0b384a..647f193 100644
--- a/server/protocols/jmap/doc/specs/spec/message.mdwn
+++ b/server/protocols/jmap/doc/specs/spec/message.mdwn
@@ -244,17 +244,19 @@ The following errors may be returned instead of the 
*messageUpdates* response:
 `cannotCalculateChanges`: Returned if the server cannot calculate the changes 
from the state string given by the client. Usually due to the client's state 
being too old, or the server being unable to produce an update to an 
intermediate state when there are too many updates. The client MUST invalidate 
its Message cache. The error object MUST also include a `newState: String` 
property with the current state for the type.
 
 ### setMessages
-
-Not implemented
-
 
 The *setMessages* method encompasses:
 
 - Creating a draft message
+Not implemented
 - Sending a message
+Not implemented
 - Changing the flags of a message (unread/flagged status)
+
 - Adding/removing a message to/from mailboxes (moving a message)
+Not implemented
 - Deleting messages
+Not implemented
 
 It takes the following arguments:
 


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[05/15] james-project git commit: JAMES-1676 setMessages/update: moved json parsing

2016-02-15 Thread matthieu
JAMES-1676 setMessages/update: moved json parsing

introducing validator and validation results for UpdateMessagePatch and move 
parsing and validation logic out of SetMessageMethod
SetMessagesMethod: extracted updates processing to a class 
(SetMessagesUpdateProcessor)


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/35b62b23
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/35b62b23
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/35b62b23

Branch: refs/heads/master
Commit: 35b62b23a7ee21dc74161760a59bfbdce8593fca
Parents: 41aebb7
Author: Fabien Vignon 
Authored: Fri Feb 5 15:31:28 2016 +0100
Committer: Fabien Vignon 
Committed: Thu Feb 11 12:37:54 2016 +0100

--
 .../org/apache/james/jmap/MethodsModule.java|   2 +
 .../jmap/methods/SetMessagesMethodTest.java |  37 -
 .../james/jmap/methods/SetMessagesMethod.java   | 124 +-
 .../methods/SetMessagesUpdateProcessor.java | 163 +++
 .../methods/UpdateMessagePatchConverter.java|  58 +++
 .../methods/UpdateMessagePatchValidator.java|  78 +
 .../james/jmap/methods/ValidationResult.java|  69 
 .../apache/james/jmap/methods/Validator.java|  27 +++
 .../james/jmap/model/SetMessagesRequest.java|  22 ++-
 .../james/jmap/model/SetMessagesResponse.java   |  19 +++
 .../james/jmap/model/UpdateMessagePatch.java|  51 --
 .../UpdateMessagePatchValidatorTest.java|  76 +
 .../jmap/model/SetMessagesResponseTest.java |  95 +++
 .../jmap/model/UpdateMessagePatchTest.java  |  83 ++
 14 files changed, 762 insertions(+), 142 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/35b62b23/server/container/cassandra-guice/src/main/java/org/apache/james/jmap/MethodsModule.java
--
diff --git 
a/server/container/cassandra-guice/src/main/java/org/apache/james/jmap/MethodsModule.java
 
b/server/container/cassandra-guice/src/main/java/org/apache/james/jmap/MethodsModule.java
index 71e2dcd..27faf5a 100644
--- 
a/server/container/cassandra-guice/src/main/java/org/apache/james/jmap/MethodsModule.java
+++ 
b/server/container/cassandra-guice/src/main/java/org/apache/james/jmap/MethodsModule.java
@@ -29,6 +29,7 @@ import org.apache.james.jmap.methods.JmapResponseWriter;
 import org.apache.james.jmap.methods.JmapResponseWriterImpl;
 import org.apache.james.jmap.methods.Method;
 import org.apache.james.jmap.methods.SetMessagesMethod;
+import org.apache.james.jmap.methods.SetMessagesUpdateProcessor;
 import org.apache.james.mailbox.cassandra.CassandraId;
 
 import com.google.inject.AbstractModule;
@@ -52,6 +53,7 @@ public class MethodsModule extends AbstractModule {
 methods.addBinding().to(new 
TypeLiteral(){});
 methods.addBinding().to(new 
TypeLiteral(){});
 methods.addBinding().to(new 
TypeLiteral(){});
+bind(SetMessagesUpdateProcessor.class).to(new 
TypeLiteral(){});
 }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/35b62b23/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
--
diff --git 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
index c584f4c..97be3d4 100644
--- 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
@@ -31,6 +31,7 @@ import static org.hamcrest.Matchers.hasKey;
 import static org.hamcrest.Matchers.hasSize;
 import static org.hamcrest.Matchers.isEmptyOrNullString;
 import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.startsWith;
 import static org.hamcrest.collection.IsMapWithSize.aMapWithSize;
 import static org.hamcrest.collection.IsMapWithSize.anEmptyMap;
 
@@ -46,6 +47,7 @@ import 
org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
+import org.junit.Ignore;
 
 import com.google.common.base.Charsets;
 import com.jayway.restassured.RestAssured;
@@ -54,7 +56,6 @@ import com.jayway.restassured.http.ContentType;
 import 

[02/15] james-project git commit: JAMES-1676 add properties to SetError

2016-02-15 Thread matthieu
JAMES-1676 add properties to SetError

...according to jmap specification.
from: http://jmap.io/spec.html#updating-messages
<>


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/c4ee5576
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/c4ee5576
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/c4ee5576

Branch: refs/heads/master
Commit: c4ee5576c507efef17baa30595f96d319f12d796
Parents: 946586f
Author: Fabien Vignon 
Authored: Wed Feb 3 14:46:58 2016 +0100
Committer: Fabien Vignon 
Committed: Wed Feb 10 17:29:50 2016 +0100

--
 .../jmap/methods/SetMessagesMethodTest.java |  9 ++-
 .../org/apache/james/jmap/model/SetError.java   | 28 -
 .../apache/james/jmap/model/SetErrorTest.java   | 60 ++--
 3 files changed, 87 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/c4ee5576/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
--
diff --git 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
index 7dbb2f6..8941367 100644
--- 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
@@ -27,6 +27,7 @@ import static org.hamcrest.Matchers.empty;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasEntry;
 import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.Matchers.isEmptyOrNullString;
 import static org.hamcrest.collection.IsMapWithSize.aMapWithSize;
 import static org.hamcrest.collection.IsMapWithSize.anEmptyMap;
 
@@ -130,12 +131,14 @@ public abstract class SetMessagesMethodTest {
 .when()
 .post("/jmap")
 .then()
+.log().ifValidationFails()
 .statusCode(200)
 .body(NAME, equalTo("messagesSet"))
 .body(ARGUMENTS + ".destroyed", empty())
 .body(ARGUMENTS + ".notDestroyed", 
hasEntry(equalTo(unknownMailboxMessageId), Matchers.allOf(
 hasEntry("type", "anErrorOccurred"),
-hasEntry("description", "An error occurred while deleting 
message " + unknownMailboxMessageId)))
+hasEntry("description", "An error occurred while deleting 
message " + unknownMailboxMessageId),
+hasEntry(equalTo("properties"), isEmptyOrNullString(
 );
 }
 
@@ -152,12 +155,14 @@ public abstract class SetMessagesMethodTest {
 .when()
 .post("/jmap")
 .then()
+.log().ifValidationFails()
 .statusCode(200)
 .body(NAME, equalTo("messagesSet"))
 .body(ARGUMENTS + ".destroyed", empty())
 .body(ARGUMENTS + ".notDestroyed", hasEntry(equalTo(messageId), 
Matchers.allOf(
 hasEntry("type", "notFound"),
-hasEntry("description", "The message " + messageId + " 
can't be found")))
+hasEntry("description", "The message " + messageId + " 
can't be found"),
+hasEntry(equalTo("properties"), isEmptyOrNullString(
 );
 }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/c4ee5576/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/SetError.java
--
diff --git 
a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/SetError.java 
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/SetError.java
index da94af5..f52ad15 100644
--- 
a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/SetError.java
+++ 
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/SetError.java
@@ -19,14 +19,21 @@
 
 package org.apache.james.jmap.model;
 
+import static org.apache.james.jmap.model.MessageProperties.MessageProperty;
+
 import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Stream;
 
+import org.apache.james.util.streams.Collectors;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;

[07/15] james-project git commit: fixup! fixup! JAMES-1676 setMessages/update: moved json parsing

2016-02-15 Thread matthieu
fixup! fixup! JAMES-1676 setMessages/update: moved json parsing


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/6d05a816
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/6d05a816
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/6d05a816

Branch: refs/heads/master
Commit: 6d05a8168904503f1cb4e27229b81e40c31bead7
Parents: bec7624
Author: Fabien Vignon 
Authored: Fri Feb 12 11:14:35 2016 +0100
Committer: Fabien Vignon 
Committed: Fri Feb 12 11:14:35 2016 +0100

--
 .../james/jmap/methods/SetMessagesMethodTest.java   | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/6d05a816/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
--
diff --git 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
index b94fecd..23e9332 100644
--- 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
@@ -351,12 +351,13 @@ public abstract class SetMessagesMethodTest {
 embeddedElasticSearch.awaitForElasticSearch();
 
 String presumedMessageId = username + "|mailbox|1";
-with()
+given()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
 .body(String.format("[[\"setMessages\", {\"update\": {\"%s\" : 
{ \"isUnread\" : false } } }, \"#0\"]]", presumedMessageId))
 // When
+.when()
 .post("/jmap");
 // Then
 with()
@@ -407,12 +408,13 @@ public abstract class SetMessagesMethodTest {
 embeddedElasticSearch.awaitForElasticSearch();
 
 String presumedMessageId = username + "|mailbox|1";
-with()
+given()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
 .body(String.format("[[\"setMessages\", {\"update\": {\"%s\" : 
{ \"isUnread\" : true } } }, \"#0\"]]", presumedMessageId))
 // When
+.when()
 .post("/jmap");
 // Then
 with()
@@ -463,12 +465,13 @@ public abstract class SetMessagesMethodTest {
 embeddedElasticSearch.awaitForElasticSearch();
 
 String presumedMessageId = username + "|mailbox|1";
-with()
+given()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
 .body(String.format("[[\"setMessages\", {\"update\": {\"%s\" : 
{ \"isFlagged\" : true } } }, \"#0\"]]", presumedMessageId))
 // When
+.when()
 .post("/jmap");
 // Then
 with()
@@ -577,12 +580,13 @@ public abstract class SetMessagesMethodTest {
 embeddedElasticSearch.awaitForElasticSearch();
 
 String presumedMessageId = username + "|mailbox|1";
-with()
+given()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
 .body(String.format("[[\"setMessages\", {\"update\": {\"%s\" : 
{ \"isAnswered\" : true } } }, \"#0\"]]", presumedMessageId))
 // When
+.when()
 .post("/jmap");
 // Then
 with()


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[04/15] james-project git commit: JAMES-1676 setMessages: handle parsing error for each update request

2016-02-15 Thread matthieu
JAMES-1676 setMessages: handle parsing error for each update request


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/41aebb7b
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/41aebb7b
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/41aebb7b

Branch: refs/heads/master
Commit: 41aebb7b01d8feee85e148e90792b966518a4ebe
Parents: 958a96e
Author: Raphael Ouazana 
Authored: Fri Feb 5 10:40:23 2016 +0100
Committer: Fabien Vignon 
Committed: Wed Feb 10 17:47:25 2016 +0100

--
 .../jmap/methods/SetMessagesMethodTest.java |  6 +--
 .../james/jmap/methods/SetMessagesMethod.java   | 54 ++--
 .../james/jmap/model/SetMessagesRequest.java| 11 ++--
 3 files changed, 58 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/41aebb7b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
--
diff --git 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
index 04921b3..c584f4c 100644
--- 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
@@ -489,7 +489,6 @@ public abstract class SetMessagesMethodTest {
 }
 
 @Test
-@Ignore("Unable to deal with invalid types from SetMessages requests 
handler")
 public void setMessagesShouldRejectUpdateWhenPropertyHasWrongType() throws 
MailboxException {
 
jmapServer.serverProbe().createMailbox(MailboxConstants.USER_NAMESPACE, 
username, "mailbox");
 jmapServer.serverProbe().appendMessage(username, new 
MailboxPath(MailboxConstants.USER_NAMESPACE, username, "mailbox"),
@@ -504,7 +503,6 @@ public abstract class SetMessagesMethodTest {
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
 .body(String.format("[[\"setMessages\", {\"update\": {\"%s\" : 
{ \"isUnread\" : \"123\" } } }, \"#0\"]]", messageId))
-// Does not work, jackson throws InvalidFormatException way 
before SetMessageMethod can deal with !
 .when()
 .post("/jmap")
 .then()
@@ -513,8 +511,8 @@ public abstract class SetMessagesMethodTest {
 .body("[0][0]", equalTo("messagesSet"))
 .body("[0][1].notUpdated", hasKey(messageId))
 .body("[0][1].notUpdated[\""+messageId+"\"].type", 
equalTo("invalidProperties"))
-.body("[0][1].notUpdated[\""+messageId+"\"].properties", 
equalTo("isUnread"))
-.body("[0][1].notUpdated[\""+messageId+"\"].description", 
equalTo("invalid properties"))
+.body("[0][1].notUpdated[\""+messageId+"\"].properties[0]", 
equalTo("isUnread"))
+.body("[0][1].notUpdated[\""+messageId+"\"].description", 
startsWith("Can not construct instance of java.lang.Boolean from String value 
'123': only \"true\" or \"false\" recognized"))
 .body("[0][1].updated", hasSize(0));
 }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/41aebb7b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesMethod.java
--
diff --git 
a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesMethod.java
 
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesMethod.java
index c849718..d93b65a 100644
--- 
a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesMethod.java
+++ 
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMessagesMethod.java
@@ -19,19 +19,23 @@
 
 package org.apache.james.jmap.methods;
 
+import java.io.IOException;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.function.Consumer;
 import java.util.stream.Stream;
+
 import javax.inject.Inject;
 import javax.mail.Flags;
 
 import org.apache.james.jmap.exceptions.MessageNotFoundException;
+import org.apache.james.jmap.json.ObjectMapperFactory;
 import org.apache.james.jmap.model.ClientId;
 import org.apache.james.jmap.model.MessageId;
 import org.apache.james.jmap.model.MessageProperties;
+import org.apache.james.jmap.model.MessageProperties.MessageProperty;
 import 

[09/15] james-project git commit: JAMES-1685 Update scm in pom files

2016-02-15 Thread matthieu
JAMES-1685 Update scm in pom files


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/68d44389
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/68d44389
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/68d44389

Branch: refs/heads/master
Commit: 68d4438924cf53de5b1ae7f07c99f829e08f64f8
Parents: b1d500a
Author: Antoine Duprat 
Authored: Fri Feb 5 11:54:03 2016 +0100
Committer: Matthieu Baechler 
Committed: Fri Feb 12 13:47:07 2016 +0100

--
 mailbox/pom.xml| 5 -
 mailet/pom.xml | 6 --
 mpt/antlib/pom.xml | 6 --
 mpt/app/dependency-reduced-pom.xml | 5 -
 mpt/app/pom.xml| 6 --
 mpt/core/pom.xml   | 5 -
 mpt/mavenplugin/pom.xml| 6 --
 mpt/pom.xml| 6 --
 pom.xml| 6 +++---
 protocols/pom.xml  | 6 --
 server/pom.xml | 6 --
 11 files changed, 3 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/68d44389/mailbox/pom.xml
--
diff --git a/mailbox/pom.xml b/mailbox/pom.xml
index 02ece56..bbe217a 100644
--- a/mailbox/pom.xml
+++ b/mailbox/pom.xml
@@ -66,11 +66,6 @@
 kafka
 
 
-
-
scm:svn:http://svn.apache.org/repos/asf/james/mailbox/trunk
-
scm:svn:https://svn.apache.org/repos/asf/james/mailbox/trunk
-
http://svn.apache.org/viewcvs.cgi/james/mailbox/trunk?root=Apache-SVN
-
 
 JIRA
 http://issues.apache.org/jira/browse/MAILBOX

http://git-wip-us.apache.org/repos/asf/james-project/blob/68d44389/mailet/pom.xml
--
diff --git a/mailet/pom.xml b/mailet/pom.xml
index 32a6b8a..da12bd9 100644
--- a/mailet/pom.xml
+++ b/mailet/pom.xml
@@ -268,12 +268,6 @@
 http://issues.apache.org/jira/browse/MAILET
 
 
-
-
scm:svn:http://svn.apache.org/repos/asf/james/mailet/trunk
-
scm:svn:https://svn.apache.org/repos/asf/james/mailet/trunk
-
http://svn.apache.org/viewcvs.cgi/james/mailet/trunk/?root=Apache-SVN
-
-
 
 
 mailet-umbrella-website

http://git-wip-us.apache.org/repos/asf/james-project/blob/68d44389/mpt/antlib/pom.xml
--
diff --git a/mpt/antlib/pom.xml b/mpt/antlib/pom.xml
index cc00208..ff82fdd 100644
--- a/mpt/antlib/pom.xml
+++ b/mpt/antlib/pom.xml
@@ -38,12 +38,6 @@ scritable functional testing of ASCII based line protocols. 
This AntLib provides
 to the library requiring no extra coding.
 http://james.apache.org/mpt/antlib
 
-
-
scm:svn:http://svn.apache.org/repos/asf/james/mpt/trunk/antlib
-
scm:svn:https://rdon...@svn.apache.org/repos/asf/james/mpt/trunk/antlib
-
http://svn.apache.org/viewcvs.cgi/james/mpt/trunk/antlib?root=Apache-SVN
-
-
 
 
 ${project.groupId}

http://git-wip-us.apache.org/repos/asf/james-project/blob/68d44389/mpt/app/dependency-reduced-pom.xml
--
diff --git a/mpt/app/dependency-reduced-pom.xml 
b/mpt/app/dependency-reduced-pom.xml
index a463e9b..6156d59 100644
--- a/mpt/app/dependency-reduced-pom.xml
+++ b/mpt/app/dependency-reduced-pom.xml
@@ -12,11 +12,6 @@
 scriptable functional testing of ASCII based line protocols. This application 
provides easy executable
 interfaces to the MPT library.
   http://james.apache.org/mpt/app
-  
-
scm:svn:http://svn.apache.org/repos/asf/james/mpt/trunk/app
-
scm:svn:https://rdon...@svn.apache.org/repos/asf/james/mpt/trunk/app
-
http://svn.apache.org/viewcvs.cgi/james/mpt/trunk/app?root=Apache-SVN
-  
   
 
   

http://git-wip-us.apache.org/repos/asf/james-project/blob/68d44389/mpt/app/pom.xml
--
diff --git a/mpt/app/pom.xml b/mpt/app/pom.xml
index cb6d24e..f855e4d 100644
--- a/mpt/app/pom.xml
+++ b/mpt/app/pom.xml
@@ -38,12 +38,6 @@ scriptable functional testing of ASCII based line protocols. 
This application pr
 interfaces to the MPT library.
 http://james.apache.org/mpt/app
 
-
-
scm:svn:http://svn.apache.org/repos/asf/james/mpt/trunk/app
-
scm:svn:https://rdon...@svn.apache.org/repos/asf/james/mpt/trunk/app
-
http://svn.apache.org/viewcvs.cgi/james/mpt/trunk/app?root=Apache-SVN
-
-
 
 
 ${project.groupId}

http://git-wip-us.apache.org/repos/asf/james-project/blob/68d44389/mpt/core/pom.xml

[14/15] james-project git commit: JAMES-1675 update jmap spec with setMessage destroy

2016-02-15 Thread matthieu
JAMES-1675 update jmap spec with setMessage destroy


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/36009870
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/36009870
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/36009870

Branch: refs/heads/master
Commit: 36009870c7e27505cc02ed45c6165f33ab71ffb0
Parents: 4df0105
Author: Fabien Vignon 
Authored: Fri Feb 12 17:56:10 2016 +0100
Committer: Fabien Vignon 
Committed: Fri Feb 12 17:56:10 2016 +0100

--
 server/protocols/jmap/doc/specs/spec/message.mdwn | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/36009870/server/protocols/jmap/doc/specs/spec/message.mdwn
--
diff --git a/server/protocols/jmap/doc/specs/spec/message.mdwn 
b/server/protocols/jmap/doc/specs/spec/message.mdwn
index 647f193..727c874 100644
--- a/server/protocols/jmap/doc/specs/spec/message.mdwn
+++ b/server/protocols/jmap/doc/specs/spec/message.mdwn
@@ -256,7 +256,6 @@ The *setMessages* method encompasses:
 - Adding/removing a message to/from mailboxes (moving a message)
 Not implemented
 - Deleting messages
-Not implemented
 
 It takes the following arguments:
 


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[01/15] james-project git commit: JAMES-1676 Make a SetMessagesMethodTest fixture more robust

2016-02-15 Thread matthieu
Repository: james-project
Updated Branches:
  refs/heads/master b1d500a9a -> d3b49527c


JAMES-1676 Make a SetMessagesMethodTest fixture more robust

before upcoming changes in SetError class (ie properties added).


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/946586f4
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/946586f4
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/946586f4

Branch: refs/heads/master
Commit: 946586f4b331446dbd1a96a8e1b70db47035a93c
Parents: 538ed53
Author: Fabien Vignon 
Authored: Wed Feb 3 17:17:11 2016 +0100
Committer: Fabien Vignon 
Committed: Wed Feb 10 16:14:18 2016 +0100

--
 .../jmap/methods/SetMessagesMethodTest.java | 34 
 1 file changed, 21 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/946586f4/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
--
diff --git 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
index bbe2e57..7dbb2f6 100644
--- 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
@@ -42,6 +42,7 @@ import org.apache.james.jmap.api.access.AccessToken;
 import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
+import org.hamcrest.Matchers;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -49,7 +50,6 @@ import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
 import com.google.common.base.Charsets;
-import com.google.common.collect.ImmutableMap;
 import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.http.ContentType;
 
@@ -120,44 +120,50 @@ public abstract class SetMessagesMethodTest {
 
 @Test
 public void setMessagesShouldReturnNotDestroyedWhenUnknownMailbox() throws 
Exception {
+
+String unknownMailboxMessageId = username + "|unknown|12345";
 given()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
-.body("[[\"setMessages\", {\"destroy\": [\"" + username + 
"|unknown|1\"]}, \"#0\"]]")
+.body("[[\"setMessages\", {\"destroy\": [\"" + 
unknownMailboxMessageId + "\"]}, \"#0\"]]")
 .when()
 .post("/jmap")
 .then()
 .statusCode(200)
 .body(NAME, equalTo("messagesSet"))
 .body(ARGUMENTS + ".destroyed", empty())
-.body(ARGUMENTS + ".notDestroyed", hasEntry(username + 
"|unknown|1", 
-ImmutableMap.of("type", "anErrorOccurred",
-"description", "An error occurred while deleting 
message " + username + "|unknown|1")));
+.body(ARGUMENTS + ".notDestroyed", 
hasEntry(equalTo(unknownMailboxMessageId), Matchers.allOf(
+hasEntry("type", "anErrorOccurred"),
+hasEntry("description", "An error occurred while deleting 
message " + unknownMailboxMessageId)))
+);
 }
 
 @Test
 public void setMessagesShouldReturnNotDestroyedWhenNoMatchingMessage() 
throws Exception {
 
jmapServer.serverProbe().createMailbox(MailboxConstants.USER_NAMESPACE, 
username, "mailbox");
 
+String messageId = username + "|mailbox|12345";
 given()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
-.body("[[\"setMessages\", {\"destroy\": [\"" + username + 
"|mailbox|12345\"]}, \"#0\"]]")
+.body("[[\"setMessages\", {\"destroy\": [\"" + messageId + "\"]}, 
\"#0\"]]")
 .when()
 .post("/jmap")
 .then()
 .statusCode(200)
 .body(NAME, equalTo("messagesSet"))
 .body(ARGUMENTS + ".destroyed", empty())
-.body(ARGUMENTS + ".notDestroyed", hasEntry(username + 
"|mailbox|12345", 
-ImmutableMap.of("type", "notFound",
-"description", "The message " + username + 
"|mailbox|12345 can't be found")));
+.body(ARGUMENTS + ".notDestroyed", hasEntry(equalTo(messageId), 

[15/15] james-project git commit: Merge remote-tracking branch 'fabien/JAMES-1676'

2016-02-15 Thread matthieu
Merge remote-tracking branch 'fabien/JAMES-1676'


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/d3b49527
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/d3b49527
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/d3b49527

Branch: refs/heads/master
Commit: d3b49527ca1685a6df7955249a92df498775da97
Parents: 4d41921 3600987
Author: Matthieu Baechler 
Authored: Mon Feb 15 13:54:31 2016 +0100
Committer: Matthieu Baechler 
Committed: Mon Feb 15 13:54:31 2016 +0100

--
 .../org/apache/james/jmap/MethodsModule.java|   2 +
 .../jmap/methods/SetMessagesMethodTest.java | 378 ++-
 .../protocols/jmap/doc/specs/spec/message.mdwn  |   7 +-
 .../james/jmap/methods/SetMessagesMethod.java   |  14 +-
 .../methods/SetMessagesUpdateProcessor.java | 157 
 .../methods/UpdateMessagePatchConverter.java|  58 +++
 .../methods/UpdateMessagePatchValidator.java|  78 
 .../james/jmap/methods/ValidationResult.java|  69 
 .../apache/james/jmap/methods/Validator.java|  27 ++
 .../org/apache/james/jmap/model/SetError.java   |  28 +-
 .../james/jmap/model/SetMessagesRequest.java|  29 +-
 .../james/jmap/model/SetMessagesResponse.java   |  19 +
 .../james/jmap/model/UpdateMessagePatch.java| 146 +++
 .../UpdateMessagePatchValidatorTest.java|  76 
 .../apache/james/jmap/model/SetErrorTest.java   |  60 ++-
 .../jmap/model/SetMessagesRequestTest.java  |  20 +-
 .../jmap/model/SetMessagesResponseTest.java |  95 +
 .../jmap/model/UpdateMessagePatchTest.java  |  82 
 18 files changed, 1279 insertions(+), 66 deletions(-)
--



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[11/15] james-project git commit: News: Moving to GIT

2016-02-15 Thread matthieu
News: Moving to GIT


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/e90e8d7d
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/e90e8d7d
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/e90e8d7d

Branch: refs/heads/master
Commit: e90e8d7d8b29ada535dc8ac6e6cc74c5dce66ca0
Parents: ab67e8e
Author: Antoine Duprat 
Authored: Mon Feb 8 14:48:31 2016 +0100
Committer: Matthieu Baechler 
Committed: Fri Feb 12 13:49:06 2016 +0100

--
 src/site/xdoc/index.xml   |  4 
 src/site/xdoc/newsarchive.xml | 13 +
 2 files changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/e90e8d7d/src/site/xdoc/index.xml
--
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 6398ced..92962fc 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -389,6 +389,10 @@
 
   
 
+  Feb/2016 - 
+  Moving to GIT 
! All James projects has been migrated from SVN to GIT.
+  
+  
   Jan/2016 - 
   James modules merge 
into james-project Some of James modules were merged into 
james-project.
   

http://git-wip-us.apache.org/repos/asf/james-project/blob/e90e8d7d/src/site/xdoc/newsarchive.xml
--
diff --git a/src/site/xdoc/newsarchive.xml b/src/site/xdoc/newsarchive.xml
index 19a53bf..7086d0d 100644
--- a/src/site/xdoc/newsarchive.xml
+++ b/src/site/xdoc/newsarchive.xml
@@ -36,6 +36,19 @@
 

 
+ Feb 2016 - Moving to GIT !
+ All James projects has been migrated from SVN to GIT.
+ Here are the links to your favorite projects:
+   
+ https://git-wip-us.apache.org/repos/asf?p=james-project.git;>james-project
+ https://git-wip-us.apache.org/repos/asf?p=james-jdkim.git;>james-jdkim
+ https://git-wip-us.apache.org/repos/asf?p=james-jsieve.git;>james-jsieve
+ https://git-wip-us.apache.org/repos/asf?p=james-jspf.git;>james-jspf
+ https://git-wip-us.apache.org/repos/asf?p=james-mime4j.git;>james-mime4j
+ https://git-wip-us.apache.org/repos/asf?p=james-postage.git;>james-postage
+   
+ 
+
  Jan 2016 - James modules merge into 
james-project
  Some of James modules were merged into https://git-wip-us.apache.org/repos/asf?p=james-project.git;a=tree;>james-project.
  This change was done in order to speed up our development phase before 
the 3.0 release and as long as important changes are needed on the API.


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[08/15] james-project git commit: JAMES-1685 Replace SVN to GIT in site

2016-02-15 Thread matthieu
JAMES-1685 Replace SVN to GIT in site


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/f8348cd3
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/f8348cd3
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/f8348cd3

Branch: refs/heads/master
Commit: f8348cd38fc511d3d5e8dbb41949bf1804e4ff41
Parents: 68d4438
Author: Antoine Duprat 
Authored: Fri Feb 5 15:22:09 2016 +0100
Committer: Matthieu Baechler 
Committed: Fri Feb 12 13:47:07 2016 +0100

--
 mailbox/src/site/xdoc/index.xml |  2 +-
 mailbox/src/site/xdoc/source-code.xml   | 12 ++--
 protocols/src/site/xdoc/imap4.xml   |  2 +-
 protocols/src/site/xdoc/source-code.xml | 15 +++--
 server/src/site/xdoc/config-antispam.xml|  4 +-
 server/src/site/xdoc/config-cassandra.xml   |  2 +-
 server/src/site/xdoc/config-dnsservice.xml  |  2 +-
 server/src/site/xdoc/config-domainlist.xml  |  2 +-
 server/src/site/xdoc/config-elasticsearch.xml   |  2 +-
 server/src/site/xdoc/config-events.xml  |  2 +-
 server/src/site/xdoc/config-fetchmail.xml   |  2 +-
 server/src/site/xdoc/config-guice.xml   | 16 +++---
 server/src/site/xdoc/config-imap4.xml   |  2 +-
 server/src/site/xdoc/config-listmanager.xml |  4 +-
 server/src/site/xdoc/config-mailbox.xml |  2 +-
 server/src/site/xdoc/config-mailetcontainer.xml |  2 +-
 .../site/xdoc/config-mailrepositorystore.xml|  2 +-
 server/src/site/xdoc/config-pop3.xml|  2 +-
 server/src/site/xdoc/config-quota.xml   |  4 +-
 .../site/xdoc/config-recipientrewritetable.xml  |  2 +-
 server/src/site/xdoc/config-smtp-lmtp.xml   |  4 +-
 server/src/site/xdoc/config-system.xml  | 14 ++---
 server/src/site/xdoc/config-users.xml   |  2 +-
 server/src/site/xdoc/config.xml | 59 +++-
 server/src/site/xdoc/dev-build.xml  | 16 +++---
 server/src/site/xdoc/monitor-logging.xml|  2 +-
 src/site/xdoc/contribute.xml|  2 +-
 src/site/xdoc/guidelines.xml|  6 +-
 28 files changed, 88 insertions(+), 100 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/f8348cd3/mailbox/src/site/xdoc/index.xml
--
diff --git a/mailbox/src/site/xdoc/index.xml b/mailbox/src/site/xdoc/index.xml
index 1be4664..3abe9bc 100644
--- a/mailbox/src/site/xdoc/index.xml
+++ b/mailbox/src/site/xdoc/index.xml
@@ -52,7 +52,7 @@
 http://james.apache.org/server/3;>Apache James Server 3 
uses this library to implement its user mailboxes.
 Apache James Mailbox is tested and fully compatible with other Apache 
James libraries
such as the http://james.apache.org/imap;>Apache James 
IMAP 
-   (see https://svn.apache.org/repos/asf/james/trunk/mpt;>this 
link 
+   (see http://james.apache.org/mpt/index.html;>this link 
for the Mailbox/IMAP integration tests source code) 
   
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/f8348cd3/mailbox/src/site/xdoc/source-code.xml
--
diff --git a/mailbox/src/site/xdoc/source-code.xml 
b/mailbox/src/site/xdoc/source-code.xml
index 51cdd97..64a512f 100644
--- a/mailbox/src/site/xdoc/source-code.xml
+++ b/mailbox/src/site/xdoc/source-code.xml
@@ -42,20 +42,22 @@
   
 
 
-  The source can be checked out anonymously from SVN with the following 
command.
-  $ svn checkout 
http://svn.apache.org/repos/asf/james/trunk/mailbox james-mailbox
+  The source can be checked out anonymously from GIT with the following 
command.
+  $ git clone 
http://git-wip-us.apache.org/repos/asf/james-project.git
+  $ cd mailbox
 
 
 
-  Everyone can access the Subversion repository via HTTP, but 
Committers must checkout the Subversion repository via HTTPS.
-  $ svn checkout 
https://svn.apache.org/repos/asf/james/trunk/mailbox james-mailbox
+  Everyone can access the GIT repository via HTTP, but Committers must 
checkout the GIT repository via HTTPS.
+  $ git clone 
https://git-wip-us.apache.org/repos/asf/james-project.git
+  $ cd mailbox
 
 
   
 
   
 You can read a tutorial on how to build Apache James Server on http://james.apache.org/server/3/dev-build.html;>http://james.apache.org/server/3/dev-build.html.
-The SVN URLs and the project names must be adapted, but the 
requirements and process are the same and you can inspire
+The GIT URLs and the project names must be adapted, but the 
requirements and process are the same and you can inspire
from the build the Apache James Mailbox 

[06/15] james-project git commit: fixup! JAMES-1676 setMessages/update: moved json parsing

2016-02-15 Thread matthieu
fixup! JAMES-1676 setMessages/update: moved json parsing


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/bec76243
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/bec76243
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/bec76243

Branch: refs/heads/master
Commit: bec76243665ccc377fff33bfe322958c3520cfd1
Parents: 35b62b2
Author: Fabien Vignon 
Authored: Thu Feb 11 17:51:40 2016 +0100
Committer: Fabien Vignon 
Committed: Thu Feb 11 17:51:40 2016 +0100

--
 .../jmap/methods/SetMessagesMethodTest.java | 87 +---
 .../methods/SetMessagesUpdateProcessor.java | 20 ++---
 .../james/jmap/model/SetMessagesRequest.java|  2 +-
 .../jmap/model/UpdateMessagePatchTest.java  |  3 +-
 4 files changed, 49 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/bec76243/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
--
diff --git 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
index 97be3d4..b94fecd 100644
--- 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
@@ -31,7 +31,6 @@ import static org.hamcrest.Matchers.hasKey;
 import static org.hamcrest.Matchers.hasSize;
 import static org.hamcrest.Matchers.isEmptyOrNullString;
 import static org.hamcrest.Matchers.not;
-import static org.hamcrest.Matchers.startsWith;
 import static org.hamcrest.collection.IsMapWithSize.aMapWithSize;
 import static org.hamcrest.collection.IsMapWithSize.anEmptyMap;
 
@@ -47,6 +46,7 @@ import 
org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
+
 import org.junit.Ignore;
 
 import com.google.common.base.Charsets;
@@ -331,15 +331,13 @@ public abstract class SetMessagesMethodTest {
 }
 
 private ResponseSpecification 
getSetMessagesUpdateOKResponseAssertions(String messageId) {
-String responseHeaderPath = "[0][0]";
-String responseBodyBasePath = "[0][1]";
 ResponseSpecBuilder builder = new ResponseSpecBuilder()
 .expectStatusCode(200)
-.expectBody(responseHeaderPath, equalTo("messagesSet"))
-.expectBody(responseBodyBasePath +".updated", hasSize(1))
-.expectBody(responseBodyBasePath +".updated", 
contains(messageId))
-.expectBody(responseBodyBasePath +".error", 
isEmptyOrNullString())
-.expectBody(responseBodyBasePath +".notUpdated", 
not(hasKey(messageId)));
+.expectBody(NAME, equalTo("messagesSet"))
+.expectBody(ARGUMENTS + ".updated", hasSize(1))
+.expectBody(ARGUMENTS + ".updated", contains(messageId))
+.expectBody(ARGUMENTS + ".error", isEmptyOrNullString())
+.expectBody(ARGUMENTS + ".notUpdated", not(hasKey(messageId)));
 return builder.build();
 }
 
@@ -361,18 +359,17 @@ public abstract class SetMessagesMethodTest {
 // When
 .post("/jmap");
 // Then
-given()
+with()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
 .body("[[\"getMessages\", {\"ids\": [\"" + presumedMessageId + 
"\"]}, \"#0\"]]")
-.when()
 .post("/jmap")
 .then()
 .statusCode(200)
-.body("[0][0]", equalTo("messages"))
-.body("[0][1].list", hasSize(1))
-.body("[0][1].list[0].isUnread", equalTo(false))
+.body(NAME, equalTo("messages"))
+.body(ARGUMENTS + ".list", hasSize(1))
+.body(ARGUMENTS + ".list[0].isUnread", equalTo(false))
 .log().ifValidationFails();
 }
 
@@ -418,17 +415,16 @@ public abstract class SetMessagesMethodTest {
 // When
 .post("/jmap");
 // Then
-given()
+with()
 .accept(ContentType.JSON)
 .contentType(ContentType.JSON)
 .header("Authorization", accessToken.serialize())
 

[10/15] james-project git commit: News: James modules merge

2016-02-15 Thread matthieu
News: James modules merge


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/ab67e8ef
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/ab67e8ef
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/ab67e8ef

Branch: refs/heads/master
Commit: ab67e8efaaffc483c615289ab35b7b09cc1d2c2e
Parents: f8348cd
Author: Antoine Duprat 
Authored: Mon Feb 8 14:19:58 2016 +0100
Committer: Matthieu Baechler 
Committed: Fri Feb 12 13:47:15 2016 +0100

--
 src/site/xdoc/index.xml   | 4 
 src/site/xdoc/newsarchive.xml | 9 +
 2 files changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/ab67e8ef/src/site/xdoc/index.xml
--
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index af15f85..6398ced 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -389,6 +389,10 @@
 
   
 
+  Jan/2016 - 
+  James modules merge 
into james-project Some of James modules were merged into 
james-project.
+  
+  
   Oct/2015 - 
   Guice injection for 
Cassandra backend Guice injection is now available in a new Java 
project.
   

http://git-wip-us.apache.org/repos/asf/james-project/blob/ab67e8ef/src/site/xdoc/newsarchive.xml
--
diff --git a/src/site/xdoc/newsarchive.xml b/src/site/xdoc/newsarchive.xml
index 2512de1..19a53bf 100644
--- a/src/site/xdoc/newsarchive.xml
+++ b/src/site/xdoc/newsarchive.xml
@@ -34,6 +34,15 @@
 
   
 
+   
+
+ Jan 2016 - James modules merge into 
james-project
+ Some of James modules were merged into https://git-wip-us.apache.org/repos/asf?p=james-project.git;a=tree;>james-project.
+ This change was done in order to speed up our development phase before 
the 3.0 release and as long as important changes are needed on the API.
+ The modules merged are: james-server, apache-james-mailbox, 
apache-mailet, apache-james-mpt,  protocols
+
+   
+

 
  Oct 2015 - Guice injection for Cassandra 
backend


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[03/15] james-project git commit: JAMES-1676 Implement message updating feature in setMessages

2016-02-15 Thread matthieu
JAMES-1676 Implement message updating feature in setMessages


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/958a96e7
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/958a96e7
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/958a96e7

Branch: refs/heads/master
Commit: 958a96e71632c74670d1a0b74affd135192214d5
Parents: c4ee557
Author: Fabien Vignon 
Authored: Wed Feb 3 14:52:27 2016 +0100
Committer: Fabien Vignon 
Committed: Wed Feb 10 17:45:29 2016 +0100

--
 .../jmap/methods/SetMessagesMethodTest.java | 311 ++-
 .../james/jmap/methods/SetMessagesMethod.java   |  68 +++-
 .../james/jmap/model/SetMessagesRequest.java|  18 +-
 .../james/jmap/model/UpdateMessagePatch.java| 125 
 .../jmap/model/SetMessagesRequestTest.java  |  20 +-
 5 files changed, 507 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/958a96e7/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
--
diff --git 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
index 8941367..04921b3 100644
--- 
a/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/src/test/java/org/apache/james/jmap/methods/SetMessagesMethodTest.java
@@ -20,20 +20,22 @@
 package org.apache.james.jmap.methods;
 
 import static com.jayway.restassured.RestAssured.given;
+import static com.jayway.restassured.RestAssured.with;
 import static com.jayway.restassured.config.EncoderConfig.encoderConfig;
 import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.empty;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasEntry;
+import static org.hamcrest.Matchers.hasKey;
 import static org.hamcrest.Matchers.hasSize;
 import static org.hamcrest.Matchers.isEmptyOrNullString;
+import static org.hamcrest.Matchers.not;
 import static org.hamcrest.collection.IsMapWithSize.aMapWithSize;
 import static org.hamcrest.collection.IsMapWithSize.anEmptyMap;
 
 import java.io.ByteArrayInputStream;
 import java.util.Date;
-
 import javax.mail.Flags;
 
 import org.apache.james.backends.cassandra.EmbeddedCassandra;
@@ -41,19 +43,23 @@ import org.apache.james.jmap.JmapAuthentication;
 import org.apache.james.jmap.JmapServer;
 import org.apache.james.jmap.api.access.AccessToken;
 import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
+import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
+
+import com.google.common.base.Charsets;
+import com.jayway.restassured.RestAssured;
+import com.jayway.restassured.builder.ResponseSpecBuilder;
+import com.jayway.restassured.http.ContentType;
+import com.jayway.restassured.specification.ResponseSpecification;
 import org.hamcrest.Matchers;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Charsets;
-import com.jayway.restassured.RestAssured;
-import com.jayway.restassured.http.ContentType;
-
 public abstract class SetMessagesMethodTest {
 
 private static final String NAME = "[0][0]";
@@ -297,4 +303,297 @@ public abstract class SetMessagesMethodTest {
 .body(NAME, equalTo("messages"))
 .body(ARGUMENTS + ".list", hasSize(1));
 }
-}
+
+@Test
+public void 
setMessagesShouldReturnUpdatedIdAndNoErrorWhenIsUnreadPassedToFalse() throws 
MailboxException {
+// Given
+
jmapServer.serverProbe().createMailbox(MailboxConstants.USER_NAMESPACE, 
username, "mailbox");
+
+jmapServer.serverProbe().appendMessage(username, new 
MailboxPath(MailboxConstants.USER_NAMESPACE, username, "mailbox"),
+new ByteArrayInputStream("Subject: 
test\r\n\r\ntestmail".getBytes()), new Date(), false, new Flags());
+embeddedElasticSearch.awaitForElasticSearch();
+
+String presumedMessageId = username + "|mailbox|1";
+
+// When
+given()
+.accept(ContentType.JSON)
+.contentType(ContentType.JSON)
+.header("Authorization", accessToken.serialize())
+

[12/15] james-project git commit: News: JMAP implementation

2016-02-15 Thread matthieu
News: JMAP implementation


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4d419213
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4d419213
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4d419213

Branch: refs/heads/master
Commit: 4d41921307373176848932dc4ed92eba9fcedcb0
Parents: e90e8d7
Author: Raphael Ouazana 
Authored: Wed Feb 10 14:53:58 2016 +0100
Committer: Matthieu Baechler 
Committed: Fri Feb 12 13:51:01 2016 +0100

--
 src/site/xdoc/index.xml   | 4 
 src/site/xdoc/newsarchive.xml | 6 ++
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/4d419213/src/site/xdoc/index.xml
--
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 92962fc..a891d02 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -390,6 +390,10 @@
   
 
   Feb/2016 - 
+  JMAP 
implementation JMAP is being implemented into James.
+  
+  
+  Feb/2016 - 
   Moving to GIT 
! All James projects has been migrated from SVN to GIT.
   
   

http://git-wip-us.apache.org/repos/asf/james-project/blob/4d419213/src/site/xdoc/newsarchive.xml
--
diff --git a/src/site/xdoc/newsarchive.xml b/src/site/xdoc/newsarchive.xml
index 7086d0d..eb190b7 100644
--- a/src/site/xdoc/newsarchive.xml
+++ b/src/site/xdoc/newsarchive.xml
@@ -36,6 +36,12 @@
 

 
+ Feb 2016 - JMAP implementation
+ We are actively working on implementing JMAP protocol into James.
+ http://jmap.io;>JMAP is a transport-agnostic, stateless 
JSON-based API for synchronising a mail client with a mail server.
+ It allows to develop easily a mail client in a browser, without the 
pain of using a server to proxy IMAP commands.
+ Feel free to help us, you can see our advancement on the specification 
implementation into https://github.com/apache/james-project/tree/master/server/protocols/jmap/doc/specs;>jmap/doc
+ 
  Feb 2016 - Moving to GIT !
  All James projects has been migrated from SVN to GIT.
  Here are the links to your favorite projects:


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Commented] (JAMES-1642) Upgrading Geronimo JavaMail to prevent "Failure sending HELO command to SMTP server"

2016-02-15 Thread Matthieu Baechler (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15147085#comment-15147085
 ] 

Matthieu Baechler commented on JAMES-1642:
--

Hi [~xkylex], the switch is already merged into james master, could you try it 
and tell us if SMTP works ok ?

> Upgrading Geronimo JavaMail to prevent "Failure sending HELO command to SMTP 
> server"
> 
>
> Key: JAMES-1642
> URL: https://issues.apache.org/jira/browse/JAMES-1642
> Project: James Server
>  Issue Type: Bug
>  Components: Remote Delivery
>Affects Versions: Trunk
>Reporter: Kohei Nozaki
> Attachments: JAMES-1642.patch
>
>
> Some SMTP server always refuses mail relayed from James because of this 
> problem: https://issues.apache.org/jira/browse/GERONIMO-6547
> I've experienced it in the SMTP server running on {{eclipse.org}}. I tried to 
> subscribe some mailing list in it but it never accept confirm mail from 
> James. Replacing {{geronimo-javamail_1.4_mail-1.8.3.jar}} by 
> {{geronimo-javamail_1.4_mail-1.9.0-alpha-2.jar}} works like a charm.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org