svn commit: r1690000 - in /james/server/trunk/container: cli/src/main/java/org/apache/james/cli/ cli/src/main/java/org/apache/james/cli/probe/ cli/src/main/java/org/apache/james/cli/probe/impl/ cli/sr

2015-07-09 Thread btellier
Author: btellier
Date: Thu Jul  9 07:41:33 2015
New Revision: 169

URL: http://svn.apache.org/r169
Log:
JAMES-1584 Command to create a mailbox

Modified:

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagementMBean.java

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java?rev=169&r1=168&r2=169&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 Thu Jul  9 07:41:33 2015
@@ -228,6 +228,13 @@ public class ServerCmd {
 printUsage();
 System.exit(1);
 }
+} else if (CmdType.CREATEMAILBOX.equals(cmdType)) {
+if (cmdType.hasCorrectArguments(arguments.length)) {
+probe.createMailbox(arguments[1], arguments[2], 
arguments[3]);
+} else {
+printUsage();
+System.exit(1);
+}
 } else {
 System.err.println("Unrecognized command: " + cmdName + ".");
 printUsage();
@@ -292,7 +299,8 @@ public class ServerCmd {
 "listuserdomainmappings  %n" + //
 "listmappings%n" + //
 "copymailbox  %n" + //
-"deleteusermailboxes %n" //
+"deleteusermailboxes %n" + //
+"createmailbox   %n"
 );
 String usage = String.format("java %s --host  %n", 
ServerCmd.class.getName());
 hf.printHelp(usage, "", options, header);

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java?rev=169&r1=168&r2=169&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 Thu Jul  9 07:41:33 2015
@@ -191,4 +191,13 @@ public interface ServerProbe extends Clo
  * @throws Exception
  */
 void deleteUserMailboxesNames(String user) throws Exception;
+
+/**
+ * Create a mailbox
+ *
+ * @param namespace Namespace of the created mailbox
+ * @param user User of the created mailbox
+ * @param name Name of the created mailbox
+ */
+void createMailbox(String namespace, String user, String name);
 }

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java?rev=169&r1=168&r2=169&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
 Thu Jul  9 07:41:33 2015
@@ -198,4 +198,9 @@ public class JmxServerProbe implements S
 public void deleteUserMailboxesNames(String user) throws Exception {
 mailboxManagerManagement.deleteMailboxes(user);
 }
+
+@Override
+public void createMailbox(String namespace, String user, String name) {
+mailboxManagerManagement.createMailbox(namespace, user, name);
+}
 }

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java?rev=169&r1=168&r2=169&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java
 Thu Jul  9 07:41:33 2015
@@ -37,7 +3

svn commit: r1689999 - in /james/server/trunk: ./ container/cli/ container/cli/src/main/java/org/apache/james/cli/ container/cli/src/main/java/org/apache/james/cli/probe/ container/cli/src/main/java/o

2015-07-09 Thread btellier
Author: btellier
Date: Thu Jul  9 07:41:05 2015
New Revision: 168

URL: http://svn.apache.org/r168
Log:
JAMES-1584 Command to delete all mailboxes of a user

Added:
james/server/trunk/container/mailbox-adapter/src/test/
james/server/trunk/container/mailbox-adapter/src/test/java/
james/server/trunk/container/mailbox-adapter/src/test/java/org/
james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/
james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/

james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/

james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/

james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
Modified:
james/server/trunk/container/cli/pom.xml

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java
james/server/trunk/container/mailbox-adapter/pom.xml

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java

james/server/trunk/container/spring/src/main/resources/META-INF/org/apache/james/spring-server.xml
james/server/trunk/pom.xml

Modified: james/server/trunk/container/cli/pom.xml
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/pom.xml?rev=168&r1=1689998&r2=168&view=diff
==
--- james/server/trunk/container/cli/pom.xml (original)
+++ james/server/trunk/container/cli/pom.xml Thu Jul  9 07:41:05 2015
@@ -44,6 +44,10 @@
 james-server-spring
 
 
+org.apache.james
+james-server-mailbox-adapter
+
+
 commons-cli
 commons-cli
 

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java?rev=168&r1=1689998&r2=168&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 Thu Jul  9 07:41:05 2015
@@ -221,6 +221,13 @@ public class ServerCmd {
 printUsage();
 System.exit(1);
 }
+} else if (CmdType.DELETEUSERMAILBOXES.equals(cmdType)) {
+if (cmdType.hasCorrectArguments(arguments.length)) {
+probe.deleteUserMailboxesNames(arguments[1]);
+} else {
+printUsage();
+System.exit(1);
+}
 } else {
 System.err.println("Unrecognized command: " + cmdName + ".");
 printUsage();
@@ -284,7 +291,8 @@ public class ServerCmd {
 "removeregexmapping   %n" + //
 "listuserdomainmappings  %n" + //
 "listmappings%n" + //
-"copymailbox  %n" //
+"copymailbox  %n" + //
+"deleteusermailboxes %n" //
 );
 String usage = String.format("java %s --host  %n", 
ServerCmd.class.getName());
 hf.printHelp(usage, "", options, header);

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java?rev=168&r1=1689998&r2=168&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 Thu Jul  9 07:41:05 2015
@@ -23,164 +23,172 @@ import java.util.Collection;
 import java.util.Map;
 
 public interface ServerProbe extends Closeable {
-   /**
-* Add a user to this mail server.
-* 
-* @param userName
-*The name of the user being added.
-* @param password
-*The password of the user being added.
-* @throws Exception
-*/
-   public void addUser(String userName, String password) throws Exception;
-
-   /**
-* Delete a user from this mail server.
-* 
-* @param username
-*The name of the user b

svn commit: r1690001 - in /james/server/trunk/container/mailbox-adapter/src: main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java test/java/org/apache/james/adapter/mailbox/Mailbox

2015-07-09 Thread btellier
Author: btellier
Date: Thu Jul  9 07:42:15 2015
New Revision: 1690001

URL: http://svn.apache.org/r1690001
Log:
JAMES-1584 Tests for create mailbox command

Modified:

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java

james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java

Modified: 
james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java?rev=1690001&r1=169&r2=1690001&view=diff
==
--- 
james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java
 (original)
+++ 
james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java
 Thu Jul  9 07:42:15 2015
@@ -128,6 +128,7 @@ public class MailboxManagerManagement ex
 
 @Override
 public void createMailbox(String namespace, String user, String name) {
+Preconditions.checkArgument(namespace != null && user != null && name 
!= null, "Provided mailbox path components should not be null");
 try {
 MailboxSession session = mailboxManager.createSystemSession(user, 
log);
 mailboxManager.createMailbox(new MailboxPath(namespace, user, 
name), session);

Modified: 
james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java?rev=1690001&r1=169&r2=1690001&view=diff
==
--- 
james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
 (original)
+++ 
james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
 Thu Jul  9 07:42:15 2015
@@ -122,4 +122,35 @@ public class MailboxManagementTest {
 
assertThat(inMemoryMapperFactory.createMailboxMapper(session).list()).isEmpty();
 }
 
+@Test
+public void createMailboxShouldCreateAMailbox() throws Exception {
+
mailboxManagerManagement.createMailbox(MailboxConstants.USER_NAMESPACE, USER, 
"name");
+
assertThat(inMemoryMapperFactory.createMailboxMapper(session).list()).hasSize(1);
+
assertThat(inMemoryMapperFactory.createMailboxMapper(session).findMailboxByPath(new
 MailboxPath(MailboxConstants.USER_NAMESPACE, USER, "name"))).isNotNull();
+}
+
+@Test
+public void createMailboxShouldNotThrowIfMailboxAlreadyExist() throws 
Exception {
+MailboxPath path = new MailboxPath(MailboxConstants.USER_NAMESPACE, 
USER, "name");
+Mailbox mailbox = new SimpleMailbox(path, 
UID_VALIDITY);
+inMemoryMapperFactory.createMailboxMapper(session).save(mailbox);
+
mailboxManagerManagement.createMailbox(MailboxConstants.USER_NAMESPACE, USER, 
"name");
+
assertThat(inMemoryMapperFactory.createMailboxMapper(session).list()).containsExactly(mailbox);
+}
+
+@Test(expected = IllegalArgumentException.class)
+public void createMailboxShouldThrowOnNullNamespace() {
+mailboxManagerManagement.createMailbox(null, "", "");
+}
+
+@Test(expected = IllegalArgumentException.class)
+public void createMailboxShouldThrowOnNullUser() {
+mailboxManagerManagement.createMailbox("", null, "");
+}
+
+@Test(expected = IllegalArgumentException.class)
+public void createMailboxShouldThrowOnNullName() {
+mailboxManagerManagement.createMailbox("", "", null);
+}
+
 }



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



svn commit: r1690003 - in /james/server/trunk: ./ container/cli/ container/cli/src/main/java/org/apache/james/cli/ container/cli/src/main/java/org/apache/james/cli/probe/ container/cli/src/main/java/o

2015-07-09 Thread btellier
Author: btellier
Date: Thu Jul  9 07:43:20 2015
New Revision: 1690003

URL: http://svn.apache.org/r1690003
Log:
JAMES-1584 Command to delete a specific mailbox

Modified:
james/server/trunk/container/cli/pom.xml

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagementMBean.java

james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
james/server/trunk/pom.xml

Modified: james/server/trunk/container/cli/pom.xml
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/pom.xml?rev=1690003&r1=1690002&r2=1690003&view=diff
==
--- james/server/trunk/container/cli/pom.xml (original)
+++ james/server/trunk/container/cli/pom.xml Thu Jul  9 07:43:20 2015
@@ -41,11 +41,11 @@
 
 
 org.apache.james
-james-server-spring
+james-server-mailbox-adapter
 
 
 org.apache.james
-james-server-mailbox-adapter
+james-server-spring
 
 
 commons-cli

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java?rev=1690003&r1=1690002&r2=1690003&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 Thu Jul  9 07:43:20 2015
@@ -243,6 +243,13 @@ public class ServerCmd {
 printUsage();
 System.exit(1);
 }
+} else if (CmdType.DELETEMAILBOX.equals(cmdType)) {
+if (cmdType.hasCorrectArguments(arguments.length)) {
+probe.deleteMailbox(arguments[1], arguments[2], 
arguments[3]);
+} else {
+printUsage();
+System.exit(1);
+}
 } else {
 System.err.println("Unrecognized command: " + cmdName + ".");
 printUsage();
@@ -309,7 +316,8 @@ public class ServerCmd {
 "copymailbox  %n" + //
 "deleteusermailboxes %n" + //
 "createmailbox   %n" + //
-"listusermailboxes %n"
+"listusermailboxes %n" + //
+"deletemailbox   %n"
 );
 String usage = String.format("java %s --host  %n", 
ServerCmd.class.getName());
 hf.printHelp(usage, "", options, header);

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java?rev=1690003&r1=1690002&r2=1690003&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 Thu Jul  9 07:43:20 2015
@@ -184,7 +184,7 @@ public interface ServerProbe extends Clo
 void copyMailbox(String srcBean, String dstBean) throws Exception;
 
 /**
- * Return the name of all mailboxes belonging to #private:${user}
+ * Delete mailboxes Belonging to #private:${user}
  *
  * @param user Username of the user we want to list mailboxes on
  * @return Collection of the mailboxes names
@@ -208,4 +208,13 @@ public interface ServerProbe extends Clo
  * @return List of mailboxes belonging to the private namespace of a user
  */
 Collection listUserMailboxes(String user);
+
+/**
+ * Delete the given mailbox
+ *
+ * @param namespace Namespace of the mailbox to delete
+ * @param user User the mailbox to delete belongs to
+ * @param name Name of the mailbox to delete
+ */
+void deleteMailbox(String namespace, String user, String name);
 }

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli

svn commit: r1690002 - in /james/server/trunk/container: cli/src/main/java/org/apache/james/cli/ cli/src/main/java/org/apache/james/cli/probe/ cli/src/main/java/org/apache/james/cli/probe/impl/ cli/sr

2015-07-09 Thread btellier
Author: btellier
Date: Thu Jul  9 07:42:48 2015
New Revision: 1690002

URL: http://svn.apache.org/r1690002
Log:
JAMES-1584 Command to list all mailboxes of a user

Modified:

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java

james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java?rev=1690002&r1=1690001&r2=1690002&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 Thu Jul  9 07:42:48 2015
@@ -235,6 +235,14 @@ public class ServerCmd {
 printUsage();
 System.exit(1);
 }
+} else if (CmdType.LISTUSERMAILBOXES.equals(cmdType)) {
+if (cmdType.hasCorrectArguments(arguments.length)) {
+Collection mailboxes = 
probe.listUserMailboxes(arguments[1]);
+sCmd.print(mailboxes.toArray(new 
String[mailboxes.size()]), System.out);
+} else {
+printUsage();
+System.exit(1);
+}
 } else {
 System.err.println("Unrecognized command: " + cmdName + ".");
 printUsage();
@@ -300,7 +308,8 @@ public class ServerCmd {
 "listmappings%n" + //
 "copymailbox  %n" + //
 "deleteusermailboxes %n" + //
-"createmailbox   %n"
+"createmailbox   %n" + //
+"listusermailboxes %n"
 );
 String usage = String.format("java %s --host  %n", 
ServerCmd.class.getName());
 hf.printHelp(usage, "", options, header);

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java?rev=1690002&r1=1690001&r2=1690002&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
 Thu Jul  9 07:42:48 2015
@@ -200,4 +200,12 @@ public interface ServerProbe extends Clo
  * @param name Name of the created mailbox
  */
 void createMailbox(String namespace, String user, String name);
+
+/**
+ * List mailboxes belonging to the private namespace of a user
+ *
+ * @param user The given user
+ * @return List of mailboxes belonging to the private namespace of a user
+ */
+Collection listUserMailboxes(String user);
 }

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java?rev=1690002&r1=1690001&r2=1690002&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
 Thu Jul  9 07:42:48 2015
@@ -203,4 +203,9 @@ public class JmxServerProbe implements S
 public void createMailbox(String namespace, String user, String name) {
 mailboxManagerManagement.createMailbox(namespace, user, name);
 }
+
+@Override
+public Collection listUserMailboxes(String user) {
+return mailboxManagerManagement.listMailboxes(user);
+}
 }

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java?rev=1690002&r1=1690001&r2=1690002&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java
 (original)
+++ 
james/server/trunk/container/cli/src/mai

svn commit: r1690004 - in /james/server/trunk/container/cli: pom.xml src/main/java/org/apache/james/cli/ServerCmd.java src/test/java/org/apache/james/cli/ServerCmdTest.java

2015-07-09 Thread btellier
Author: btellier
Date: Thu Jul  9 07:43:50 2015
New Revision: 1690004

URL: http://svn.apache.org/r1690004
Log:
JAMES-1584 Refactor and test ServerCmd

Added:

james/server/trunk/container/cli/src/test/java/org/apache/james/cli/ServerCmdTest.java
Modified:
james/server/trunk/container/cli/pom.xml

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java

Modified: james/server/trunk/container/cli/pom.xml
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/pom.xml?rev=1690004&r1=1690003&r2=1690004&view=diff
==
--- james/server/trunk/container/cli/pom.xml (original)
+++ james/server/trunk/container/cli/pom.xml Thu Jul  9 07:43:50 2015
@@ -56,6 +56,12 @@
 junit
 test
 
+
+org.easymock
+easymock
+3.3.1
+test
+
 
 
 

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java?rev=1690004&r1=1690003&r2=1690004&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 Thu Jul  9 07:43:50 2015
@@ -18,6 +18,7 @@
  /
 package org.apache.james.cli;
 
+import com.google.common.annotations.VisibleForTesting;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
 import org.apache.commons.cli.HelpFormatter;
@@ -44,14 +45,20 @@ public class ServerCmd {
 private static final String HOST_OPT_SHORT = "h";
 private static final String PORT_OPT_LONG = "port";
 private static final String PORT_OPT_SHORT = "p";
-private static final int defaultPort = ;
-private static final Options options = new Options();
+private static final int DEFAULT_PORT = ;
+private static final Options OPTIONS = new Options();
+
+private ServerProbe probe;
 
 static {
 Option optHost = new Option(HOST_OPT_SHORT, HOST_OPT_LONG, true, "node 
hostname or ip address");
 optHost.setRequired(true);
-options.addOption(optHost);
-options.addOption(PORT_OPT_SHORT, PORT_OPT_LONG, true, "remote jmx 
agent port number");
+OPTIONS.addOption(optHost);
+OPTIONS.addOption(PORT_OPT_SHORT, PORT_OPT_LONG, true, "remote jmx 
agent port number");
+}
+
+public ServerCmd(ServerProbe probe) {
+this.probe = probe;
 }
 
 /**
@@ -63,206 +70,137 @@ public class ServerCmd {
  * @throws ParseException
  */
 public static void main(String[] args) throws IOException, 
InterruptedException, ParseException {
-
 long start = Calendar.getInstance().getTimeInMillis();
-
-CommandLineParser parser = new PosixParser();
-CommandLine cmd = null;
-
+CommandLine cmd = parseCommandLine(args);
+if (cmd.getArgs().length < 1) {
+failWithMessage("Missing argument for command.");
+}
 try {
-cmd = parser.parse(options, args);
-} catch (ParseException parseExcep) {
-System.err.println(parseExcep);
-printUsage();
-System.exit(1);
+new ServerCmd(new 
JmxServerProbe(cmd.getOptionValue(HOST_OPT_LONG), getPort(cmd)))
+.executeCommandLine(start, cmd);
+} catch (IOException ioe) {
+System.err.println("Error connecting to remote JMX agent!");
+ioe.printStackTrace();
+System.exit(3);
+} catch (Exception e) {
+failWithMessage("Error while executing command:" + e.getMessage());
 }
+System.exit(0);
+}
 
-// Verify arguments
-if (cmd.getArgs().length < 1) {
-System.err.println("Missing argument for command.");
+@VisibleForTesting
+static CommandLine parseCommandLine(String[] args) {
+try {
+CommandLineParser parser = new PosixParser();
+return parser.parse(OPTIONS, args);
+} catch (ParseException parseExcep) {
+System.err.println(parseExcep.getMessage());
 printUsage();
+parseExcep.printStackTrace(System.err);
 System.exit(1);
+return null;
 }
+}
 
-String host = cmd.getOptionValue(HOST_OPT_LONG);
-int port = defaultPort;
-
+private static int getPort(CommandLine cmd) throws ParseException {
 String portNum = cmd.getOptionValue(PORT_OPT_LONG);
 if (portNum != null) {
 try {
-port = Integer.parseInt(portNum);
+return Integer.parseInt(portN

svn commit: r1690005 - in /james/server/trunk/container: cli/ cli/src/main/java/org/apache/james/cli/ cli/src/main/java/org/apache/james/cli/exceptions/ cli/src/main/java/org/apache/james/cli/type/ cl

2015-07-09 Thread btellier
Author: btellier
Date: Thu Jul  9 07:44:34 2015
New Revision: 1690005

URL: http://svn.apache.org/r1690005
Log:
JAMES-1584 Improve error handling in CLI

Added:

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/exceptions/

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/exceptions/InvalidArgumentNumberException.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/exceptions/InvalidPortException.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/exceptions/JamesCliException.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/exceptions/MissingCommandException.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/exceptions/UnrecognizedCommandException.java
Modified:
james/server/trunk/container/cli/pom.xml

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java

james/server/trunk/container/cli/src/main/java/org/apache/james/cli/type/CmdType.java

james/server/trunk/container/cli/src/test/java/org/apache/james/cli/ServerCmdTest.java

james/server/trunk/container/cli/src/test/java/org/apache/james/cli/type/CmdTypeTest.java

james/server/trunk/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java

james/server/trunk/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java

Modified: james/server/trunk/container/cli/pom.xml
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/pom.xml?rev=1690005&r1=1690004&r2=1690005&view=diff
==
--- james/server/trunk/container/cli/pom.xml (original)
+++ james/server/trunk/container/cli/pom.xml Thu Jul  9 07:44:34 2015
@@ -28,7 +28,6 @@
 ../../pom.xml
 
 
-org.apache.james
 james-server-cli
 bundle
 
@@ -52,6 +51,11 @@
 commons-cli
 
 
+org.assertj
+assertj-core
+test
+
+
 junit
 junit
 test

Modified: 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java?rev=1690005&r1=1690004&r2=1690005&view=diff
==
--- 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 (original)
+++ 
james/server/trunk/container/cli/src/main/java/org/apache/james/cli/ServerCmd.java
 Thu Jul  9 07:44:34 2015
@@ -19,6 +19,7 @@
 package org.apache.james.cli;
 
 import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Joiner;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
 import org.apache.commons.cli.HelpFormatter;
@@ -26,13 +27,18 @@ import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 import org.apache.commons.cli.PosixParser;
+import org.apache.commons.lang.time.StopWatch;
+import org.apache.james.cli.exceptions.InvalidArgumentNumberException;
+import org.apache.james.cli.exceptions.InvalidPortException;
+import org.apache.james.cli.exceptions.JamesCliException;
+import org.apache.james.cli.exceptions.MissingCommandException;
+import org.apache.james.cli.exceptions.UnrecognizedCommandException;
 import org.apache.james.cli.probe.ServerProbe;
 import org.apache.james.cli.probe.impl.JmxServerProbe;
 import org.apache.james.cli.type.CmdType;
 
 import java.io.IOException;
 import java.io.PrintStream;
-import java.util.Calendar;
 import java.util.Collection;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -41,22 +47,24 @@ import java.util.Map.Entry;
  * Command line utility for managing various aspect of the James server.
  */
 public class ServerCmd {
-private static final String HOST_OPT_LONG = "host";
-private static final String HOST_OPT_SHORT = "h";
-private static final String PORT_OPT_LONG = "port";
-private static final String PORT_OPT_SHORT = "p";
-private static final int DEFAULT_PORT = ;
-private static final Options OPTIONS = new Options();
+public static final String HOST_OPT_LONG = "host";
+public static final String HOST_OPT_SHORT = "h";
+public static final String PORT_OPT_LONG = "port";
+public static final String PORT_OPT_SHORT = "p";
 
-private ServerProbe probe;
+private static final int DEFAULT_PORT = ;
 
-static {
+private static Options createOptions() {
+Options options = new Options();
 Option optHost = new Option(HOST_OPT_SHORT, HOST_OPT_LONG, true, "node 
hostname or ip address");
 optHost.setRequired(true);
-OPTIONS.addOption(optHost);
-OPTIONS.addOptio

[jira] [Resolved] (JAMES-1584) JMX should allow some basic admin tasks on mailboxes

2015-07-09 Thread Tellier Benoit (JIRA)

 [ 
https://issues.apache.org/jira/browse/JAMES-1584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tellier Benoit resolved JAMES-1584.
---
Resolution: Fixed

> JMX should allow some basic admin tasks on mailboxes
> 
>
> Key: JAMES-1584
> URL: https://issues.apache.org/jira/browse/JAMES-1584
> Project: James Server
>  Issue Type: New Feature
>Affects Versions: 3.0.0-beta5
>Reporter: Tellier Benoit
> Fix For: 3.0.0-beta5
>
>
> We want the following tasks to be performed :
>  - 1: Delete all mailboxes belonging to a user
>  - 2: Create mailboxes
>  - 3: List mailboxes belonging to a user
> Why ?
> We want to write a standalone MPT tool to validate our James deployement. ( 
> See MPT- ).
> MPT is given a docker name on a docker instance and should be allowed to 
> initialise James instance for tests. We can not re-instanciate docker 
> instance on each test ( as we want to validate behaviour of the given docker 
> instance so that we can use it ). Working directly on IMAP seems complicated. 
> And keeping track of all executed commands on MPT seems also complicated.
> Finaly, these commands corresponds to use cases :
>  - as an admin I want to delete mailboxes of user I just deleted
>  - I can write a script to automatically create user and create some of their 
> mailboxes.
> *Acceptance criteria* :
>  - Lauch a James server compiled with your changes. Using james CLI you 
> should be able to :
>   - list mailboxes belonging to a user
>   - create mailboxes
>   - delete all mailboxes belonging to a user
> *How to implement it ?*
> Stuff already exist for that (mailbox-adapter). It can be of course extended. 
> And wired to be accessible threw JMX.



--
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



Build failed in Jenkins: james-server-trunk #5308

2015-07-09 Thread Apache Jenkins Server
See 

Changes:

[btellier] JAMES-1584 Improve error handling in CLI

[btellier] JAMES-1584 Refactor and test ServerCmd

[btellier] JAMES-1584 Command to delete a specific mailbox

[btellier] JAMES-1584 Command to list all mailboxes of a user

[btellier] JAMES-1584 Tests for create mailbox command

[btellier] JAMES-1584 Command to create a mailbox

[btellier] JAMES-1584 Command to delete all mailboxes of a user

--
[...truncated 2601 lines...]
Archived 1 artifacts
Archive block size is 32768
Received 0 blocks and 3522 bytes
Compression is 0.0%
Took 26 ms
[JENKINS] Archiving 

 to 
org.apache.james/james-server-protocols-pop3/3.0.0-beta5-SNAPSHOT/james-server-protocols-pop3-3.0.0-beta5-SNAPSHOT.pom
Sending artifact delta relative to james-server-trunk » Apache James :: Server 
:: POP3 #5296
Archived 1 artifacts
Archive block size is 32768
Received 0 blocks and 5434 bytes
Compression is 0.0%
Took 43 ms
[JENKINS] Archiving 

 to 
org.apache.james/james-server-protocols-imap4/3.0.0-beta5-SNAPSHOT/james-server-protocols-imap4-3.0.0-beta5-SNAPSHOT.pom
Sending artifact delta relative to james-server-trunk » Apache James :: Server 
:: IMAP #5307
Archived 1 artifacts
Archive block size is 32768
Received 0 blocks and 3426 bytes
Compression is 0.0%
Took 26 ms
[JENKINS] Archiving 

 to 
org.apache.james.karaf/james-karaf-integration/3.0.0-beta5-SNAPSHOT/james-karaf-integration-3.0.0-beta5-SNAPSHOT.pom
Sending artifact delta relative to james-server-trunk » Apache James :: Karaf 
:: Integration tests #5296
Archived 1 artifacts
Archive block size is 32768
Received 0 blocks and 4618 bytes
Compression is 0.0%
Took 39 ms
[JENKINS] Archiving 

 to 
org.apache.james/james-server-data-api/3.0.0-beta5-SNAPSHOT/james-server-data-api-3.0.0-beta5-SNAPSHOT.pom
[JENKINS] Archiving 

 to 
org.apache.james/james-server-data-api/3.0.0-beta5-20150709.100756-1501/james-server-data-api-3.0.0-beta5-20150709.100756-1501.jar
[JENKINS] Archiving 

 to 
org.apache.james/james-server-data-api/3.0.0-beta5-20150709.100756-1501/james-server-data-api-3.0.0-beta5-20150709.100756-1501-tests.jar
[JENKINS] Archiving 

 to 
org.apache.james/james-server-data-api/3.0.0-beta5-20150709.100756-1501/james-server-data-api-3.0.0-beta5-20150709.100756-1501-sources.jar
[JENKINS] Archiving 

 to 
org.apache.james/james-server-data-api/3.0.0-beta5-20150709.100756-1501/james-server-data-api-3.0.0-beta5-20150709.100756-1501-test-sources.jar
Sending artifact delta relative to james-server-trunk » Apache James :: Server 
:: Data  :: API #5307
Archived 5 artifacts
Archive block size is 32768
Received 0 blocks and 67436 bytes
Compression is 0.0%
Took 46 ms
[JENKINS] Archiving 

 to 
org.apache.james/james-server-util/3.0.0-beta5-SNAPSHOT/james-server-util-3.0.0-beta5-SNAPSHOT.pom
Sending artifact delta relative to james-server-trunk » Apache James :: Server 
:: Common Utilities #5307
Archived 1 artifacts
Archive block size is 32768
Received 0 blocks and 2329 bytes
Compression is 0.0%
Took 37 ms
[JENKINS] Archiving 

 to 
org.apache.james/james-server-data-jcr/3.0.0-beta5-SNAPSHOT/james-server-data-jcr-3.0.0-beta5-SNAPSHOT.pom
Sending artifact delta relative to james-server-trunk » Apache James :: Server 
:: Data :: JCR Persistence #5296
Archived 1 artifacts
Archive block size is 32768
Received 0 blocks and 4328 bytes
Compression is 0.0%
Took 34 ms
[JENKINS] Archiving 

 to 
org.apache.james.karaf/james-karaf-distribution/3.0.0-beta5-SNAPSHOT/james-karaf-distribution-3.0.0-beta5-SNAPSHOT.pom
Sending artifact delta relative to james-server-trunk » Apache James :: Karaf 
:: James Server #5296
Archived 1 artifacts
Archive block size is 32768
Received 0 blocks and 6663 bytes
Compression is 0.0%
Took 0.39 sec
[JENKINS] Archiving 


Build failed in Jenkins: james-server-trunk » Apache James :: Server :: Mailbox Adapter #5308

2015-07-09 Thread Apache Jenkins Server
See 


Changes:

[btellier] JAMES-1584 Improve error handling in CLI

[btellier] JAMES-1584 Command to delete a specific mailbox

[btellier] JAMES-1584 Command to list all mailboxes of a user

[btellier] JAMES-1584 Tests for create mailbox command

[btellier] JAMES-1584 Command to create a mailbox

[btellier] JAMES-1584 Command to delete all mailboxes of a user

--
[INFO] 
[INFO] 
[INFO] Building Apache James :: Server :: Mailbox Adapter 3.0.0-beta5-SNAPSHOT
[INFO] 
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-api/0.6-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-api/0.6-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.8 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox/0.6-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox/0.6-SNAPSHOT/maven-metadata.xml
 (2 KB at 1.5 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox/0.6-SNAPSHOT/apache-james-mailbox-0.6-20150617.103315-750.pom
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox/0.6-SNAPSHOT/apache-james-mailbox-0.6-20150617.103315-750.pom
 (24 KB at 56.9 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-store/0.6-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-store/0.6-SNAPSHOT/maven-metadata.xml
 (2 KB at 1.5 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-core/0.8.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-core/0.8.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 1.7 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-core/0.8.0-SNAPSHOT/apache-mime4j-core-0.8.0-20150617.024907-738.pom
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-core/0.8.0-SNAPSHOT/apache-mime4j-core-0.8.0-20150617.024907-738.pom
 (3 KB at 7.6 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-project/0.8.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-project/0.8.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.7 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-project/0.8.0-SNAPSHOT/apache-mime4j-project-0.8.0-20150617.024837-740.pom
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-project/0.8.0-SNAPSHOT/apache-mime4j-project-0.8.0-20150617.024837-740.pom
 (8 KB at 65.7 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-dom/0.8.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-dom/0.8.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.9 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-dom/0.8.0-SNAPSHOT/apache-mime4j-dom-0.8.0-20150617.024927-735.pom
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-dom/0.8.0-SNAPSHOT/apache-mime4j-dom-0.8.0-20150617.024927-735.pom
 (4 KB at 2.6 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-maildir/0.6-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-maildir/0.6-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.8 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/assertj/assertj-core/3.0.0/assertj-core-3.0.0.pom
Downloaded: 
http://repo.maven.apache.org/maven2/org/assertj/assertj-core/3.0.0/assertj-core-3.0.0.pom
 (9 KB at 83.3 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-memory/0.6-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-james-mailbox-memory/0.6-SNAPSHOT/maven-metadata.xml
 (2 KB at 0.9 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-core/0.8.0-SNAPSHOT/apache-mime4j-core-0.8.0-20150617.024907-738.jar
Downloading: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-dom/0.8.0-SNAPSHOT/apache-mime4j-dom-0.8.0-20150617.024927-735.jar
Downloaded: 
http://repository.apache.org/snapshots/org/apache/james/apache-mime4j-core/0.8.0-SNAPSHOT/apache-mime4j-cor

Build failed in Jenkins: jdkim-trunk » Apache James :: jDKIM :: DomainKey Project #2435

2015-07-09 Thread Apache Jenkins Server
See 


--
maven3-agent.jar already up to date
maven3-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
<===[channel started
JENKINS REMOTING CAPACITY]===>   Executing Maven:  -B -f 

 -Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/1 -U clean 
deploy
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache James :: jDKIM :: DomainKey Project
[INFO] Apache James :: jDKIM
[INFO] Apache James :: jDKIM :: Mailets
[INFO] Apache James :: jDKIM :: Assembly
[INFO] 
[INFO] 
[INFO] Building Apache James :: jDKIM :: DomainKey Project 0.3-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ apache-jdkim-project 
---
[INFO] Deleting 

[TASKS] Scanning folder 
'
 for files matching the pattern '**/*.java' - excludes: main/**/*, 
mailets/**/*, assemble/**/*
[TASKS] Found 0 files to scan for tasks
Found 0 open tasks.
[TASKS] Computing warning deltas based on reference build #2416
log4j:WARN No appenders could be found for logger 
(org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.4:process (default) @ 
apache-jdkim-project ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (jar) @ apache-jdkim-project ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (test-jar) @ apache-jdkim-project ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ 
apache-jdkim-project ---
[WARNING] Failed to getClass for 
org.apache.maven.plugin.source.TestSourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:test-jar (attach-sources) @ 
apache-jdkim-project ---
[INFO] 
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ 
apache-jdkim-project ---
[INFO] 
[INFO] --- maven-install-plugin:2.5.1:install (default-install) @ 
apache-jdkim-project ---
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/apache-jdkim-project-0.3-SNAPSHOT.pom
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/apache-jdkim-project-0.3-SNAPSHOT-tests.jar
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/apache-jdkim-project-0.3-SNAPSHOT-site.xml
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ 
apache-jdkim-project ---
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata 
org.apache.james.jdkim:apache-jdkim-project:0.3-SNAPSHOT/maven-metadata.xml 
from/to apache.snapshots.https 
(https://repository.apache.org/content/repositories/snapshots): 
java.lang.RuntimeException: Could not generate DH keypair
[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache James :: jDKIM :: DomainKey Project  FAILURE [11.944s]
[INFO] Apache James :: jDKIM . SKIPPED
[INFO] Apache James :: jDKIM :: Mailets .. SKIPPED
[INFO] Apache James :: jDKIM :: Assembly . SKIPPED
[INFO] 

Build failed in Jenkins: jdkim-trunk #2435

2015-07-09 Thread Apache Jenkins Server
See 

--
Started by timer
Building remotely on ubuntu-6 (docker Ubuntu ubuntu) in workspace 

Updating http://svn.apache.org/repos/asf/james/jdkim/trunk at revision 
'2015-07-09T11:23:01.318 +'
At revision 1690064
no change for http://svn.apache.org/repos/asf/james/jdkim/trunk since the 
previous build
[locks-and-latches] Checking to see if we really have the locks
[locks-and-latches] Have all the locks, build can start
Parsing POMs
Downloaded artifact 
http://repository.apache.org/snapshots/org/apache/james/james-project/1.8.3-SNAPSHOT/maven-metadata.xml
maven3-agent.jar already up to date
maven3-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[trunk] $ /home/jenkins/tools/java/latest1.6/bin/java -Xmx2g -Xms256m 
-XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven3-agent.jar:/home/jenkins/tools/maven/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar
 org.jvnet.hudson.maven3.agent.Maven3Main 
/home/jenkins/tools/maven/apache-maven-3.0.4 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven3-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 46214
<===[channel started
JENKINS REMOTING CAPACITY]===>   Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/1 -U clean 
deploy
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache James :: jDKIM :: DomainKey Project
[INFO] Apache James :: jDKIM
[INFO] Apache James :: jDKIM :: Mailets
[INFO] Apache James :: jDKIM :: Assembly
[INFO] 
[INFO] 
[INFO] Building Apache James :: jDKIM :: DomainKey Project 0.3-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ apache-jdkim-project 
---
[INFO] Deleting 
[TASKS] Scanning folder ' 
for files matching the pattern '**/*.java' - excludes: main/**/*, mailets/**/*, 
assemble/**/*
[TASKS] Found 0 files to scan for tasks
Found 0 open tasks.
[TASKS] Computing warning deltas based on reference build #2416
log4j:WARN No appenders could be found for logger 
(org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.4:process (default) @ 
apache-jdkim-project ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (jar) @ apache-jdkim-project ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (test-jar) @ apache-jdkim-project ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ 
apache-jdkim-project ---
[WARNING] Failed to getClass for 
org.apache.maven.plugin.source.TestSourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:test-jar (attach-sources) @ 
apache-jdkim-project ---
[INFO] 
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ 
apache-jdkim-project ---
[INFO] 
[INFO] --- maven-install-plugin:2.5.1:install (default-install) @ 
apache-jdkim-project ---
[INFO] Installing  
to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/apache-jdkim-project-0.3-SNAPSHOT.pom
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/apache-jdkim-project-0.3-SNAPSHOT-tests.jar
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/apache-jdkim-project-0.3-SNAPSHOT-site.xml
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ 
apache-jdkim-project ---
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/james/jdkim/apache-jdkim-project/0.3-SNAPSHOT/maven-metada

Missing git repositories

2015-07-09 Thread Matthieu Baechler

Hi,

Now that Benoit Tellier is Commiter on James, we (Antoine, Benoit and 
me) managed to merge most of our work back into apache repositories.


We are working toward using github for our developments to add 
transparency to our process and have others people join our code reviews.


We are doing the switch right now but we discovered that there's two 
repositories missing from git.apache.org : james-mpt and james-project.


It bothers us as we have to manually push our modification into 
svn.apache.org _and_ our github repositories.


Is someone able to create those repositories on git.apache.org ?

Thanks for your help.

--
Matthieu Baechler

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



Build failed in Jenkins: james-mailet #2817

2015-07-09 Thread Apache Jenkins Server
See 

--
Started by timer
Building remotely on ubuntu-6 (docker Ubuntu ubuntu) in workspace 

Updating http://svn.apache.org/repos/asf/james/mailet/trunk at revision 
'2015-07-10T04:05:06.332 +'
U pom.xml
U 
standard/src/main/java/org/apache/james/transport/mailets/StripAttachment.java
U 
standard/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
U standard/pom.xml
At revision 1690199
no change for http://svn.apache.org/repos/asf/james/mailet/trunk since the 
previous build
Parsing POMs
Downloaded artifact 
http://repository.apache.org/snapshots/org/apache/james/james-project/1.8.3-SNAPSHOT/maven-metadata.xml
maven3-agent.jar already up to date
maven3-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[trunk] $ /home/jenkins/tools/java/latest1.6/bin/java -Xmx2g -Xms256m 
-XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven3-agent.jar:/home/jenkins/tools/maven/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar
 org.jvnet.hudson.maven3.agent.Maven3Main 
/home/jenkins/tools/maven/apache-maven-3.0.4 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven3-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 52431
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/1 clean deploy
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache James :: Mailets parent and aggregator
[INFO] Apache James :: Mailet API
[INFO] Apache James :: Basic Mailet Toolkit
[INFO] Apache James :: Mailetdocs Maven Plugin
[INFO] Apache James :: Crypto Mailets
[INFO] Apache James :: Standard Mailets
[INFO] Apache James :: AI Mailets
[INFO] 
[INFO] 
[INFO] Building Apache James :: Mailets parent and aggregator 2.5.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ apache-mailet ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.4:process (default) @ apache-mailet 
---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (jar) @ apache-mailet ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (test-jar) @ apache-mailet ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ apache-mailet ---
[WARNING] Failed to getClass for 
org.apache.maven.plugin.source.TestSourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:test-jar (attach-sources) @ apache-mailet 
---
[INFO] 
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ 
apache-mailet ---
[INFO] 
[INFO] --- apache-rat-plugin:0.8:check (default) @ apache-mailet ---
[INFO] Exclude: NOTICE.*
[INFO] Exclude: LICENSE.*
[INFO] Exclude: release.properties
[INFO] Exclude: dist/**/*
[INFO] Exclude: **/.*
[INFO] Exclude: .*/**/*
[INFO] Exclude: **/.*/**/*
[INFO] Exclude: **/LICENSE*
[INFO] Exclude: **/target/**
[INFO] Exclude: **/*.iml
[INFO] Exclude: src/site/**
[INFO] 
[INFO] --- maven-install-plugin:2.5.1:install (default-install) @ apache-mailet 
---
[INFO] Installing  
to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/apache-mailet-2.5.1-SNAPSHOT.pom
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/apache-mailet-2.5.1-SNAPSHOT-tests.jar
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/apache-mailet-2.5.1-SNAPSHOT-site.xml
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ apache-mailet ---
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata 
org.apache.james:ap

Build failed in Jenkins: james-mailet » Apache James :: Mailets parent and aggregator #2817

2015-07-09 Thread Apache Jenkins Server
See 


--
maven3-agent.jar already up to date
maven3-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 

 -Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/1 clean 
deploy
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache James :: Mailets parent and aggregator
[INFO] Apache James :: Mailet API
[INFO] Apache James :: Basic Mailet Toolkit
[INFO] Apache James :: Mailetdocs Maven Plugin
[INFO] Apache James :: Crypto Mailets
[INFO] Apache James :: Standard Mailets
[INFO] Apache James :: AI Mailets
[INFO] 
[INFO] 
[INFO] Building Apache James :: Mailets parent and aggregator 2.5.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ apache-mailet ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.4:process (default) @ apache-mailet 
---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (jar) @ apache-mailet ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (test-jar) @ apache-mailet ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ apache-mailet ---
[WARNING] Failed to getClass for 
org.apache.maven.plugin.source.TestSourceJarMojo
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:test-jar (attach-sources) @ apache-mailet 
---
[INFO] 
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ 
apache-mailet ---
[INFO] 
[INFO] --- apache-rat-plugin:0.8:check (default) @ apache-mailet ---
[INFO] Exclude: NOTICE.*
[INFO] Exclude: LICENSE.*
[INFO] Exclude: release.properties
[INFO] Exclude: dist/**/*
[INFO] Exclude: **/.*
[INFO] Exclude: .*/**/*
[INFO] Exclude: **/.*/**/*
[INFO] Exclude: **/LICENSE*
[INFO] Exclude: **/target/**
[INFO] Exclude: **/*.iml
[INFO] Exclude: src/site/**
[INFO] 
[INFO] --- maven-install-plugin:2.5.1:install (default-install) @ apache-mailet 
---
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/apache-mailet-2.5.1-SNAPSHOT.pom
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/apache-mailet-2.5.1-SNAPSHOT-tests.jar
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/apache-mailet-2.5.1-SNAPSHOT-site.xml
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ apache-mailet ---
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/james/apache-mailet/2.5.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata 
org.apache.james:apache-mailet:2.5.1-SNAPSHOT/maven-metadata.xml from/to 
apache.snapshots.https 
(https://repository.apache.org/content/repositories/snapshots): 
java.lang.RuntimeException: Could not generate DH keypair

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



Re: Missing git repositories

2015-07-09 Thread Eric Charles

Thx for the work Matthieu and team.

To get the repo, you should open a INFRA ticket on 
https://issues.apache.org/jira/browse/INFRA


On 2015-07-09 17:52, Matthieu Baechler wrote:

Hi,

Now that Benoit Tellier is Commiter on James, we (Antoine, Benoit and 
me) managed to merge most of our work back into apache repositories.


We are working toward using github for our developments to add 
transparency to our process and have others people join our code reviews.


We are doing the switch right now but we discovered that there's two 
repositories missing from git.apache.org : james-mpt and james-project.


It bothers us as we have to manually push our modification into 
svn.apache.org _and_ our github repositories.


Is someone able to create those repositories on git.apache.org ?

Thanks for your help.



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