You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sa...@apache.org on 2014/11/25 22:59:18 UTC
svn commit: r1641709 [2/2] - in
/geronimo/javamail/trunk/geronimo-javamail_1.4: ./
geronimo-javamail_1.4_mail/ geronimo-javamail_1.4_provider/
geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/issues/
geronimo-javamail_1.4_provi...
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/MailServer.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/MailServer.java?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/MailServer.java (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/MailServer.java Tue Nov 25 21:59:17 2014
@@ -0,0 +1,583 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.javamail.testserver;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Semaphore;
+
+import javax.mail.Flags;
+import javax.mail.internet.MimeMessage;
+import javax.net.ssl.SSLSocketFactory;
+
+import org.apache.commons.configuration.DefaultConfigurationBuilder;
+import org.apache.james.dnsservice.api.DNSService;
+import org.apache.james.domainlist.api.DomainListException;
+import org.apache.james.domainlist.api.mock.SimpleDomainList;
+import org.apache.james.filesystem.api.mock.MockFileSystem;
+import org.apache.james.imap.encode.main.DefaultImapEncoderFactory;
+import org.apache.james.imap.encode.main.DefaultLocalizer;
+import org.apache.james.imap.main.DefaultImapDecoderFactory;
+import org.apache.james.imap.processor.main.DefaultImapProcessorFactory;
+import org.apache.james.imapserver.netty.IMAPServer;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.MessageManager;
+import org.apache.james.mailbox.acl.GroupMembershipResolver;
+import org.apache.james.mailbox.acl.MailboxACLResolver;
+import org.apache.james.mailbox.acl.SimpleGroupMembershipResolver;
+import org.apache.james.mailbox.acl.UnionMailboxACLResolver;
+import org.apache.james.mailbox.inmemory.InMemoryMailboxSessionMapperFactory;
+import org.apache.james.mailbox.model.MailboxConstants;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mailbox.store.Authenticator;
+import org.apache.james.mailbox.store.StoreMailboxManager;
+import org.apache.james.mailrepository.mock.MockMailRepositoryStore;
+import org.apache.james.pop3server.netty.POP3Server;
+import org.apache.james.protocols.lib.PortUtil;
+import org.apache.james.protocols.lib.mock.MockProtocolHandlerLoader;
+import org.apache.james.queue.api.MailQueue;
+import org.apache.james.queue.api.MailQueue.MailQueueItem;
+import org.apache.james.queue.api.MailQueueFactory;
+import org.apache.james.queue.file.FileMailQueueFactory;
+import org.apache.james.rrt.api.RecipientRewriteTable;
+import org.apache.james.rrt.api.RecipientRewriteTableException;
+import org.apache.james.smtpserver.netty.SMTPServer;
+import org.apache.james.user.api.UsersRepositoryException;
+import org.apache.james.user.lib.mock.MockUsersRepository;
+import org.apache.mailet.HostAddress;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+//James based POP3 or IMAP or SMTP server (for unittesting only)
+public class MailServer {
+
+ private POP3Server pop3Server;
+ private IMAPServer imapServer;
+ private SMTPServer smtpServer;
+ private AlterableDNSServer dnsServer;
+ private final MockUsersRepository usersRepository = new MockUsersRepository();
+ private final MockFileSystem fileSystem = new MockFileSystem();
+ private MockProtocolHandlerLoader protocolHandlerChain;
+ private StoreMailboxManager<Long> mailboxManager;
+
+ private MockMailRepositoryStore store;
+ private DNSService dnsService;
+ private MailQueueFactory queueFactory;
+ private MailQueue queue;
+ private final Semaphore sem = new Semaphore(0);
+
+ public void ensureMsgCount(final int count) throws InterruptedException {
+ sem.acquire(count);
+ }
+
+ private class Fetcher extends Thread {
+
+ private final MailQueue queue;
+ private final MessageManager mailbox;
+ private final MailboxSession session;
+
+ Fetcher(final MailQueue queue, final MessageManager mailbox, final MailboxSession session) {
+ super();
+ this.queue = queue;
+ this.mailbox = mailbox;
+ this.session = session;
+ }
+
+ @Override
+ public void run() {
+ while (true) {
+ try {
+ System.out.println("Await new mail ...");
+ final MailQueueItem item = queue.deQueue();
+ System.out.println("got it");
+ final MimeMessage msg = item.getMail().getMessage();
+ final ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ msg.writeTo(bout);
+ mailbox.appendMessage(new ByteArrayInputStream(bout.toByteArray()), new Date(), session, true, new Flags());
+ item.done(true);
+ sem.release();
+ System.out.println("mail copied over");
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return;
+ }
+ }
+ }
+
+ }
+
+ public MailServer() {
+ super();
+ try {
+ usersRepository.addUser("serveruser", "serverpass");
+ } catch (final UsersRepositoryException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ public void start(final SmtpTestConfiguration smtpConfig, final Pop3TestConfiguration pop3Config, final ImapTestConfiguration imapConfig)
+ throws Exception {
+ setUpServiceManager();
+
+ imapServer = new IMAPServer();
+
+ imapServer.setImapEncoder(DefaultImapEncoderFactory.createDefaultEncoder(new DefaultLocalizer(), false));
+ imapServer.setImapDecoder(DefaultImapDecoderFactory.createDecoder());
+
+ pop3Server = new POP3Server();
+ pop3Server.setProtocolHandlerLoader(protocolHandlerChain);
+
+ smtpServer = new SMTPServer() {
+ @Override
+ protected java.lang.Class<? extends org.apache.james.protocols.lib.handler.HandlersPackage> getJMXHandlersPackage() {
+ return RefinedJMXHandlersLoader.class;
+ };
+
+ };
+ smtpServer.setProtocolHandlerLoader(protocolHandlerChain);
+ smtpServer.setDNSService(dnsServer);
+
+ imapServer.setFileSystem(fileSystem);
+ pop3Server.setFileSystem(fileSystem);
+ smtpServer.setFileSystem(fileSystem);
+
+ final Logger log = LoggerFactory.getLogger("Mock");
+
+ imapServer.setLog(log);
+ pop3Server.setLog(log);
+ smtpServer.setLog(log);
+
+ final MailboxPath mailboxPath = new MailboxPath(MailboxConstants.USER_NAMESPACE, "serveruser", "INBOX");
+ final MailboxSession session = mailboxManager.login("serveruser", "serverpass", LoggerFactory.getLogger("Test"));
+
+ if (!mailboxManager.mailboxExists(mailboxPath, session)) {
+ mailboxManager.createMailbox(mailboxPath, session);
+ }
+
+ imapServer.setImapProcessor(DefaultImapProcessorFactory.createXListSupportingProcessor(mailboxManager, null, null));//new StoreSubscriptionManager(new InMemoryMailboxSessionMapperFactory()), null));
+
+ //setupTestMails(session, mailboxManager.getMailbox(mailboxPath, session));
+
+ new Fetcher(queue, mailboxManager.getMailbox(mailboxPath, session), session).start();
+
+ smtpConfig.init();
+ pop3Config.init();
+ imapConfig.init();
+
+ smtpServer.configure(smtpConfig);
+ pop3Server.configure(pop3Config);
+ imapServer.configure(imapConfig);
+
+ smtpServer.init();
+ pop3Server.init();
+ imapServer.init();
+
+ }
+
+ public void stop() throws Exception {
+
+ if (protocolHandlerChain != null) {
+ protocolHandlerChain.dispose();
+ }
+
+ if (imapServer != null) {
+ imapServer.destroy();
+ }
+
+ if (pop3Server != null) {
+ pop3Server.destroy();
+ }
+
+ if (smtpServer != null) {
+ smtpServer.destroy();
+ }
+
+ }
+
+ /* protected void setupTestMailsx(MailboxSession session, MessageManager mailbox) throws MailboxException {
+ mailbox.appendMessage(new ByteArrayInputStream(content), new Date(), session, true, new Flags());
+ byte[] content2 = ("EMPTY").getBytes();
+ mailbox.appendMessage(new ByteArrayInputStream(content2), new Date(), session, true, new Flags());
+ }*/
+
+ protected void setUpServiceManager() throws Exception {
+ protocolHandlerChain = new MockProtocolHandlerLoader();
+ protocolHandlerChain.put("usersrepository", usersRepository);
+
+ final InMemoryMailboxSessionMapperFactory factory = new InMemoryMailboxSessionMapperFactory();
+ final MailboxACLResolver aclResolver = new UnionMailboxACLResolver();
+ final GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver();
+ mailboxManager = new StoreMailboxManager<Long>(factory, new Authenticator() {
+
+ public boolean isAuthentic(final String userid, final CharSequence passwd) {
+ try {
+ return usersRepository.test(userid, passwd.toString());
+ } catch (final UsersRepositoryException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+ }, aclResolver, groupMembershipResolver);
+ mailboxManager.init();
+
+ protocolHandlerChain.put("mailboxmanager", mailboxManager);
+
+ protocolHandlerChain.put("fileSystem", fileSystem);
+
+ //smtp
+ dnsServer = new AlterableDNSServer();
+ store = new MockMailRepositoryStore();
+ protocolHandlerChain.put("mailStore", store);
+ protocolHandlerChain.put("dnsservice", dnsServer);
+ protocolHandlerChain.put("org.apache.james.smtpserver.protocol.DNSService", dnsService);
+
+ protocolHandlerChain.put("recipientrewritetable", new RecipientRewriteTable() {
+
+ public void addRegexMapping(final String user, final String domain, final String regex) throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void removeRegexMapping(final String user, final String domain, final String regex)
+ throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void addAddressMapping(final String user, final String domain, final String address)
+ throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void removeAddressMapping(final String user, final String domain, final String address)
+ throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void addErrorMapping(final String user, final String domain, final String error) throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void removeErrorMapping(final String user, final String domain, final String error)
+ throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public Collection<String> getUserDomainMappings(final String user, final String domain) throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void addMapping(final String user, final String domain, final String mapping) throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void removeMapping(final String user, final String domain, final String mapping) throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public Map<String, Collection<String>> getAllMappings() throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void addAliasDomainMapping(final String aliasDomain, final String realDomain) throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public void removeAliasDomainMapping(final String aliasDomain, final String realDomain) throws RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+
+ public Collection<String> getMappings(final String user, final String domain) throws ErrorMappingException,
+ RecipientRewriteTableException {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+ });
+
+ protocolHandlerChain.put("org.apache.james.smtpserver.protocol.DNSService", dnsService);
+
+ final FileMailQueueFactory ff = new FileMailQueueFactory();// MockMailQueueFactory();
+ ff.setFileSystem(fileSystem);
+ queueFactory = ff;
+
+ queue = queueFactory.getQueue(MailQueueFactory.SPOOL);
+ protocolHandlerChain.put("mailqueuefactory", queueFactory);
+ protocolHandlerChain.put("domainlist", new SimpleDomainList() {
+
+ @Override
+ public String getDefaultDomain() {
+ return "localhost";
+ }
+
+ @Override
+ public String[] getDomains() throws DomainListException {
+ return new String[] { "localhost" };
+ }
+
+ @Override
+ public boolean containsDomain(final String serverName) {
+ return "localhost".equals(serverName);
+ }
+ });
+
+ }
+
+ /**
+ * @return the queue
+ */
+ public MailQueue getQueue() {
+ return queue;
+ }
+
+ public static File getAbsoluteFilePathFromClassPath(final String fileNameFromClasspath) {
+
+ File configFile = null;
+ final URL configURL = MailServer.class.getClassLoader().getResource(fileNameFromClasspath);
+ if (configURL != null) {
+ try {
+ configFile = new File(URLDecoder.decode(configURL.getFile(), "UTF-8"));
+ } catch (final UnsupportedEncodingException e) {
+ return null;
+ }
+
+ if (configFile.exists() && configFile.canRead()) {
+ return configFile;
+ } else {
+
+ System.out.println("Cannot read from {}, maybe the file does not exists? " + configFile.getAbsolutePath());
+ }
+
+ } else {
+ System.out.println("Failed to load " + fileNameFromClasspath);
+ }
+
+ return null;
+
+ }
+
+ public static abstract class AbstractTestConfiguration extends DefaultConfigurationBuilder {
+
+ private final int listenerPort = PortUtil.getNonPrivilegedPort();
+
+ /**
+ * @return the listenerPort
+ */
+ public int getListenerPort() {
+ return listenerPort;
+ }
+
+ public AbstractTestConfiguration enableSSL(final boolean enableStartTLS, final boolean enableSSL) {
+ addProperty("tls.[@startTLS]", enableStartTLS);
+ addProperty("tls.[@socketTLS]", enableSSL);
+ addProperty("tls.keystore", "file://" + getAbsoluteFilePathFromClassPath("dummykeystore.jks").getAbsolutePath());
+ addProperty("tls.secret", "123456");
+ addProperty("tls.provider", "org.bouncycastle.jce.provider.BouncyCastleProvider");
+ return this;
+ }
+
+ public void init() {
+ addProperty("[@enabled]", true);
+ addProperty("bind", "127.0.0.1:" + this.listenerPort);
+ addProperty("connectiontimeout", "360000");
+ //addProperty("jmxName", getServertype().name()+"on"+this.listenerPort);
+
+ }
+
+ }
+
+ public static class Pop3TestConfiguration extends AbstractTestConfiguration {
+
+ @Override
+ public void init() {
+ super.init();
+
+ addProperty("helloName", "pop3 on port " + getListenerPort());
+
+ addProperty("handlerchain.[@coreHandlersPackage]", RefinedCoreCmdHandlerLoader.class.getName());
+
+ }
+
+ }
+
+ public static class ImapTestConfiguration extends AbstractTestConfiguration {
+
+ @Override
+ public void init() {
+ super.init();
+
+ addProperty("helloName", "imap on port " + getListenerPort());
+
+ }
+
+ }
+
+ public static class SmtpTestConfiguration extends AbstractTestConfiguration {
+
+ @Override
+ public void init() {
+ super.init();
+ addProperty("handlerchain.handler[@class]", RefinedSmtpCoreCmdHandlerLoader.class.getName());
+
+ }
+
+ public SmtpTestConfiguration setRequireAuth(final boolean requireAuth) {
+
+ addProperty("authRequired", requireAuth);
+ return this;
+ }
+
+ public SmtpTestConfiguration setHeloEhloEnforcement(final boolean heloEhloEnforcement) {
+
+ addProperty("heloEhloEnforcement", heloEhloEnforcement);
+ return this;
+ }
+
+ }
+
+ public static class DummySocketFactory extends SSLSocketFactory {
+
+ @Override
+ public Socket createSocket(final String host, final int port) throws IOException, UnknownHostException {
+ throw new IOException("dummy socket factory");
+ }
+
+ @Override
+ public Socket createSocket(final InetAddress host, final int port) throws IOException {
+ throw new IOException("dummy socket factory");
+ }
+
+ @Override
+ public Socket createSocket(final String host, final int port, final InetAddress localHost, final int localPort) throws IOException,
+ UnknownHostException {
+ throw new IOException("dummy socket factory");
+ }
+
+ @Override
+ public Socket createSocket(final InetAddress address, final int port, final InetAddress localAddress, final int localPort)
+ throws IOException {
+ throw new IOException("dummy socket factory");
+ }
+
+ @Override
+ public Socket createSocket(final Socket arg0, final String arg1, final int arg2, final boolean arg3) throws IOException {
+ throw new IOException("dummy socket factory");
+ }
+
+ @Override
+ public String[] getDefaultCipherSuites() {
+ return new String[0];
+ }
+
+ @Override
+ public String[] getSupportedCipherSuites() {
+ return new String[0];
+ }
+
+ }
+
+ private final class AlterableDNSServer implements DNSService {
+
+ private InetAddress localhostByName = null;
+
+ public Collection<String> findMXRecords(final String hostname) {
+ final List<String> res = new ArrayList<String>();
+ if (hostname == null) {
+ return res;
+ }
+ if ("james.apache.org".equals(hostname)) {
+ res.add("nagoya.apache.org");
+ }
+ return res;
+ }
+
+ public Iterator<HostAddress> getSMTPHostAddresses(final String domainName) {
+ throw new UnsupportedOperationException("Unimplemented mock service");
+ }
+
+ public InetAddress[] getAllByName(final String host) throws UnknownHostException {
+ return new InetAddress[] { getByName(host) };
+ }
+
+ public InetAddress getByName(final String host) throws UnknownHostException {
+ if (getLocalhostByName() != null) {
+ if ("127.0.0.1".equals(host)) {
+ return getLocalhostByName();
+ }
+ }
+
+ if ("0.0.0.0".equals(host)) {
+ return InetAddress.getByName("0.0.0.0");
+ }
+
+ if ("james.apache.org".equals(host)) {
+ return InetAddress.getByName("james.apache.org");
+ }
+
+ if ("abgsfe3rsf.de".equals(host)) {
+ throw new UnknownHostException();
+ }
+
+ if ("128.0.0.1".equals(host) || "192.168.0.1".equals(host) || "127.0.0.1".equals(host) || "127.0.0.0".equals(host)
+ || "255.0.0.0".equals(host) || "255.255.255.255".equals(host)) {
+ return InetAddress.getByName(host);
+ }
+
+ throw new UnsupportedOperationException("getByName not implemented in mock for host: " + host);
+ }
+
+ public Collection<String> findTXTRecords(final String hostname) {
+ final List<String> res = new ArrayList<String>();
+ if (hostname == null) {
+ return res;
+ }
+
+ if ("2.0.0.127.bl.spamcop.net.".equals(hostname)) {
+ res.add("Blocked - see http://www.spamcop.net/bl.shtml?127.0.0.2");
+ }
+ return res;
+ }
+
+ public InetAddress getLocalhostByName() {
+ return localhostByName;
+ }
+
+ public void setLocalhostByName(final InetAddress localhostByName) {
+ this.localhostByName = localhostByName;
+ }
+
+ public String getHostName(final InetAddress addr) {
+ return addr.getHostName();
+ }
+
+ public InetAddress getLocalHost() throws UnknownHostException {
+ return InetAddress.getLocalHost();
+ }
+ }
+
+}
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedCoreCmdHandlerLoader.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedCoreCmdHandlerLoader.java?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedCoreCmdHandlerLoader.java (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedCoreCmdHandlerLoader.java Tue Nov 25 21:59:17 2014
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.javamail.testserver;
+
+
+
+public class RefinedCoreCmdHandlerLoader extends org.apache.james.pop3server.core.CoreCmdHandlerLoader {
+
+ public RefinedCoreCmdHandlerLoader() {
+ super();
+ getHandlers().add(ApopCmdHandler.class.getName());
+
+ }
+
+
+
+}
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedJMXHandlersLoader.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedJMXHandlersLoader.java?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedJMXHandlersLoader.java (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedJMXHandlersLoader.java Tue Nov 25 21:59:17 2014
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.javamail.testserver;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.james.protocols.lib.handler.HandlersPackage;
+import org.apache.james.smtpserver.jmx.CommandHandlerResultJMXMonitor;
+import org.apache.james.smtpserver.jmx.ConnectHandlerResultJMXMonitor;
+import org.apache.james.smtpserver.jmx.HookResultJMXMonitor;
+//import org.apache.james.smtpserver.jmx.LineHandlerResultJMXMonitor;
+
+public class RefinedJMXHandlersLoader implements HandlersPackage {
+
+ private final List<String> handlers = new ArrayList<String>();
+
+ public RefinedJMXHandlersLoader() {
+ handlers.add(ConnectHandlerResultJMXMonitor.class.getName());
+ handlers.add(CommandHandlerResultJMXMonitor.class.getName());
+ //handlers.add(LineHandlerResultJMXMonitor.class.getName());
+ handlers.add(HookResultJMXMonitor.class.getName());
+ }
+
+ /**
+ * @see org.apache.james.protocols.api.handler.HandlersPackage#getHandlers()
+ */
+ public List<String> getHandlers() {
+ return handlers;
+ }
+
+}
+
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedSmtpCoreCmdHandlerLoader.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedSmtpCoreCmdHandlerLoader.java?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedSmtpCoreCmdHandlerLoader.java (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/testserver/RefinedSmtpCoreCmdHandlerLoader.java Tue Nov 25 21:59:17 2014
@@ -0,0 +1,146 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.javamail.testserver;
+
+ /****************************************************************
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.james.protocols.api.handler.CommandDispatcher;
+import org.apache.james.protocols.api.handler.CommandHandlerResultLogger;
+import org.apache.james.protocols.lib.handler.HandlersPackage;
+import org.apache.james.protocols.smtp.core.ExpnCmdHandler;
+import org.apache.james.protocols.smtp.core.HeloCmdHandler;
+import org.apache.james.protocols.smtp.core.HelpCmdHandler;
+import org.apache.james.protocols.smtp.core.NoopCmdHandler;
+import org.apache.james.protocols.smtp.core.PostmasterAbuseRcptHook;
+import org.apache.james.protocols.smtp.core.QuitCmdHandler;
+import org.apache.james.protocols.smtp.core.ReceivedDataLineFilter;
+import org.apache.james.protocols.smtp.core.RsetCmdHandler;
+import org.apache.james.protocols.smtp.core.VrfyCmdHandler;
+import org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler;
+import org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler;
+import org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension;
+import org.apache.james.protocols.smtp.core.esmtp.StartTlsCmdHandler;
+import org.apache.james.protocols.smtp.core.log.HookResultLogger;
+import org.apache.james.smtpserver.AddDefaultAttributesMessageHook;
+import org.apache.james.smtpserver.AuthRequiredToRelayRcptHook;
+import org.apache.james.smtpserver.DataLineJamesMessageHookHandler;
+import org.apache.james.smtpserver.JamesDataCmdHandler;
+import org.apache.james.smtpserver.JamesMailCmdHandler;
+import org.apache.james.smtpserver.JamesRcptCmdHandler;
+import org.apache.james.smtpserver.JamesWelcomeMessageHandler;
+import org.apache.james.smtpserver.SendMailHandler;
+import org.apache.james.smtpserver.SenderAuthIdentifyVerificationRcptHook;
+import org.apache.james.smtpserver.UsersRepositoryAuthHook;
+
+/**
+ * This class represent the base command handlers which are shipped with james.
+ */
+public class RefinedSmtpCoreCmdHandlerLoader implements HandlersPackage {
+
+ private final String COMMANDDISPATCHER = CommandDispatcher.class.getName();
+ private final String AUTHCMDHANDLER = AuthCmdHandler.class.getName();
+ private final String DATACMDHANDLER = JamesDataCmdHandler.class.getName();
+ private final String EHLOCMDHANDLER = EhloCmdHandler.class.getName();
+ private final String EXPNCMDHANDLER = ExpnCmdHandler.class.getName();
+ private final String HELOCMDHANDLER = HeloCmdHandler.class.getName();
+ private final String HELPCMDHANDLER = HelpCmdHandler.class.getName();
+ private final String MAILCMDHANDLER = JamesMailCmdHandler.class.getName();
+ private final String NOOPCMDHANDLER = NoopCmdHandler.class.getName();
+ private final String QUITCMDHANDLER = QuitCmdHandler.class.getName();
+ private final String RCPTCMDHANDLER = JamesRcptCmdHandler.class.getName();
+ private final String RSETCMDHANDLER = RsetCmdHandler.class.getName();
+ private final String VRFYCMDHANDLER = VrfyCmdHandler.class.getName();
+ private final String MAILSIZEHOOK = MailSizeEsmtpExtension.class.getName();
+ private final String WELCOMEMESSAGEHANDLER = JamesWelcomeMessageHandler.class.getName();
+ private final String USERSREPOSITORYAUTHHANDLER = UsersRepositoryAuthHook.class.getName();
+ private final String POSTMASTERABUSEHOOK = PostmasterAbuseRcptHook.class.getName();
+ private final String AUTHREQUIREDTORELAY = AuthRequiredToRelayRcptHook.class.getName();
+ private final String SENDERAUTHIDENTITYVERIFICATION = SenderAuthIdentifyVerificationRcptHook.class.getName();
+ private final String RECEIVEDDATALINEFILTER = ReceivedDataLineFilter.class.getName();
+ private final String DATALINEMESSAGEHOOKHANDLER = DataLineJamesMessageHookHandler.class.getName();
+ private final String STARTTLSHANDLER = StartTlsCmdHandler.class.getName();
+
+ // MessageHooks
+ private final String ADDDEFAULTATTRIBUTESHANDLER = AddDefaultAttributesMessageHook.class.getName();
+ private final String SENDMAILHANDLER = SendMailHandler.class.getName();
+
+ // logging stuff
+ private final String COMMANDHANDLERRESULTLOGGER = CommandHandlerResultLogger.class.getName();
+ private final String HOOKRESULTLOGGER = HookResultLogger.class.getName();
+
+ private final List<String> commands = new LinkedList<String>();
+
+ public RefinedSmtpCoreCmdHandlerLoader() {
+ // Insert the base commands in the Map
+ commands.add(WELCOMEMESSAGEHANDLER);
+ commands.add(COMMANDDISPATCHER);
+ commands.add(AUTHCMDHANDLER);
+ commands.add(DATACMDHANDLER);
+ commands.add(EHLOCMDHANDLER);
+ commands.add(EXPNCMDHANDLER);
+ commands.add(HELOCMDHANDLER);
+ commands.add(HELPCMDHANDLER);
+ commands.add(MAILCMDHANDLER);
+ commands.add(NOOPCMDHANDLER);
+ commands.add(QUITCMDHANDLER);
+ commands.add(RCPTCMDHANDLER);
+ commands.add(RSETCMDHANDLER);
+ commands.add(VRFYCMDHANDLER);
+ commands.add(MAILSIZEHOOK);
+ commands.add(USERSREPOSITORYAUTHHANDLER);
+ commands.add(AUTHREQUIREDTORELAY);
+ commands.add(SENDERAUTHIDENTITYVERIFICATION);
+ commands.add(POSTMASTERABUSEHOOK);
+ commands.add(RECEIVEDDATALINEFILTER);
+ commands.add(DATALINEMESSAGEHOOKHANDLER);
+ commands.add(STARTTLSHANDLER);
+ // Add the default messageHooks
+ commands.add(ADDDEFAULTATTRIBUTESHANDLER);
+ commands.add(SENDMAILHANDLER);
+
+ // Add logging stuff
+ commands.add(COMMANDHANDLERRESULTLOGGER);
+ commands.add(HOOKRESULTLOGGER);
+ }
+
+ /**
+ * @see org.apache.james.protocols.api.handler.HandlersPackage#getHandlers()
+ */
+ public List<String> getHandlers() {
+ return commands;
+ }
+}
+
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportTest.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportTest.java?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportTest.java (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/java/org/apache/geronimo/javamail/transport/smtp/SMTPTransportTest.java Tue Nov 25 21:59:17 2014
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.javamail.transport.smtp;
+
+import java.util.Properties;
+
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+
+import org.apache.geronimo.javamail.testserver.AbstractProtocolTest;
+
+public class SMTPTransportTest extends AbstractProtocolTest {
+
+ public void testSSLEnable() throws Exception {
+
+
+ smtpConf.enableSSL(false, false);
+
+ start();
+
+ Properties props = new Properties();
+ props.setProperty("mail.transport.protocol", "smtp");
+ props.setProperty("mail.smtp.port", String.valueOf(smtpConf.getListenerPort()));
+ props.setProperty("mail.debug", "true");
+
+ Session jmsession = Session.getInstance(props);
+ Transport t = jmsession.getTransport();
+ t.connect();
+
+ MimeMessage msg = new MimeMessage(jmsession);
+ msg.setFrom(new InternetAddress("test@apache.org"));
+ msg.setSubject("Hi!");
+ msg.setText("All your base are belong to us");
+
+
+ t.sendMessage(msg, new InternetAddress[]{new InternetAddress("testto@apache.org")});
+
+ }
+
+
+}
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/dummykeystore.jks
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/dummykeystore.jks?rev=1641709&view=auto
==============================================================================
Binary file - no diff available.
Propchange: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/dummykeystore.jks
------------------------------------------------------------------------------
svn:mime-type = application/x-java-keystore
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/encoded_filename_ÄÜÖ(test).pdf
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/encoded_filename_A%CC%88U%CC%88O%CC%88%28test%29.pdf?rev=1641709&view=auto
==============================================================================
Binary file - no diff available.
Propchange: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/encoded_filename_ÄÜÖ(test).pdf
------------------------------------------------------------------------------
svn:mime-type = application/pdf
Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/multipart.msg
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/multipart.msg?rev=1641709&r1=1641708&r2=1641709&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/multipart.msg (original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/multipart.msg Tue Nov 25 21:59:17 2014
@@ -1,19 +1,19 @@
-Date: Sat, 11 Oct 2008 00:48:01 +0200 (CEST)
-From: test@localhost
-To: test@localhost
-Message-ID: urn:uuid:219365EB848AD9CACB1223678880948
-Subject: Test
-MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="----=_Part_0_6727097.1223678881682"
-
-------=_Part_0_6727097.1223678881682
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-
-First part
-------=_Part_0_6727097.1223678881682
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-
-Second part
-------=_Part_0_6727097.1223678881682--
+Date: Sat, 11 Oct 2008 00:48:01 +0200 (CEST)
+From: from@localhost
+To: serveruser@localhost
+Message-ID: urn:uuid:219365EB848AD9CACB1223678880948
+Subject: Test
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="----=_Part_0_6727097.1223678881682"
+
+------=_Part_0_6727097.1223678881682
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+First part
+------=_Part_0_6727097.1223678881682
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+Second part
+------=_Part_0_6727097.1223678881682--
Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/simple.msg
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/simple.msg?rev=1641709&r1=1641708&r2=1641709&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/simple.msg (original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/messages/simple.msg Tue Nov 25 21:59:17 2014
@@ -1,11 +1,11 @@
-Date: Sat, 11 Oct 2008 00:48:01 +0200 (CEST)
-From: test@localhost
-To: test@localhost
-Subject: Test Foo
-MIME-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-
-Foo Bar
-
-
+Date: Sat, 11 Oct 2008 00:48:01 +0200 (CEST)
+From: from@localhost
+To: serveruser@localhost
+Subject: Test Foo
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+Foo Bar
+
+
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/pdf-test.pdf
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/pdf-test.pdf?rev=1641709&view=auto
==============================================================================
Binary file - no diff available.
Propchange: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/test/resources/pdf-test.pdf
------------------------------------------------------------------------------
svn:mime-type = application/pdf
Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml?rev=1641709&r1=1641708&r2=1641709&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml (original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/pom.xml Tue Nov 25 21:59:17 2014
@@ -1,33 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
-<!-- $Rev$ $Date$ -->
+<!-- $Rev$ $Date: 2014-07-20 09:36:35 +0200 (So, 20. Jul 2014)
+ $ -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.geronimo.genesis</groupId>
<artifactId>genesis-java5-flava</artifactId>
- <version>2.0</version>
+ <version>2.2</version>
</parent>
<groupId>org.apache.geronimo.javamail</groupId>
@@ -35,7 +29,7 @@
<name>Geronimo JavaMail 1.4</name>
<packaging>pom</packaging>
- <version>1.8.5-SNAPSHOT</version>
+ <version>1.9.0-SNAPSHOT</version>
<description>
Geronimmo JavaMail Bundle.
@@ -48,16 +42,16 @@
</scm>
<properties>
- <siteId>javamail/${artifactId}</siteId>
+ <siteId>javamail/${project.artifactId}</siteId>
<projectName>Apache Geronimo Javamail Bundle</projectName>
</properties>
- <url>http://geronimo.apache.org/maven/${siteId}/${version}</url>
+ <url>http://geronimo.apache.org/maven/${siteId}/${project.version}</url>
<distributionManagement>
<site>
<id>apache-website</id>
- <url>${site.deploy.url}/maven/${siteId}/${version}</url>
+ <url>${site.deploy.url}/maven/${siteId}/${project.version}</url>
</site>
</distributionManagement>
@@ -86,7 +80,7 @@
<dependency>
<groupId>org.apache.geronimo.javamail</groupId>
<artifactId>geronimo-javamail_1.4_provider</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
@@ -104,12 +98,66 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>1.0.1</version>
+ <version>2.3</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.18</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.3</version>
+ <configuration>
+ <stagingDirectory>${staging.directory}</stagingDirectory>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-markdown</artifactId>
+ <version>1.3</version>
+ </dependency>
+ </dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>
+
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>src/**/*</include>
+ <include>pom.xml</include>
+ </includes>
+ <excludes>
+ <exclude>**/*/MANIFEST.MF</exclude>
+ <exclude>.git</exclude>
+ <exclude>.gitignore</exclude>
+ <exclude>.idea</exclude>
+ <exclude>*.iws</exclude>
+ <exclude>*.iml</exclude>
+ <exclude>*.ipr</exclude>
+ <exclude>**/src/test/resources/**/*.bodystructure</exclude>
+ <exclude>**/src/test/resources/**/*.msg</exclude>
+ <exclude>**/resources/OSGI-INF/providers/**/*</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
@@ -126,9 +174,9 @@
<version>[1.5,)</version>
</requireJavaVersion>
- <!-- Allow any Maven >= 2.0.5 -->
+ <!-- Allow any Maven >= 2.0.7 -->
<requireMavenVersion>
- <version>[2.0.5,)</version>
+ <version>[2.0.7,)</version>
</requireMavenVersion>
</rules>
</configuration>
@@ -143,4 +191,84 @@
<module>geronimo-javamail_1.4_mail</module>
</modules>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <configuration>
+ <xmlOutput>true</xmlOutput>
+ <!-- Optional directory to put findbugs xdoc xml report -->
+ <xmlOutputDirectory>target/site</xmlOutputDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>3.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9.1</version>
+ <configuration>
+ <notimestamp>true</notimestamp>
+ <show>private</show>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>javadoc</report>
+ </reports>
+ </reportSet>
+ <reportSet>
+ <inherited>false</inherited>
+ <reports>
+ <report>aggregate</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.18</version>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <formats>
+ <format>html</format>
+ </formats>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>versions-maven-plugin</artifactId>
+ <version>2.1</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>dependency-updates-report</report>
+ <report>plugin-updates-report</report>
+ <report>property-updates-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+
</project>
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/apt/privacy-policy.apt
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/apt/privacy-policy.apt?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/apt/privacy-policy.apt (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/apt/privacy-policy.apt Tue Nov 25 21:59:17 2014
@@ -0,0 +1,52 @@
+ ----
+ Privacy Policy
+ -----
+ Olivier Lamy
+ -----
+ 2013-11-13
+ -----
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+Privacy Policy
+
+ Information about your use of this website is collected using server access logs and a tracking cookie. The
+ collected information consists of the following:
+
+ [[1]] The IP address from which you access the website;
+
+ [[2]] The type of browser and operating system you use to access our site;
+
+ [[3]] The date and time you access our site;
+
+ [[4]] The pages you visit; and
+
+ [[5]] The addresses of pages from where you followed a link to our site.
+
+ []
+
+ Part of this information is gathered using a tracking cookie set by the
+ {{{http://www.google.com/analytics/}Google Analytics}} service and handled by Google as described in their
+ {{{http://www.google.com/privacy.html}privacy policy}}. See your browser documentation for instructions on how to
+ disable the cookie if you prefer not to share this data with Google.
+
+ We use the gathered information to help us make our site more useful to visitors and to better understand how and
+ when our site is used. We do not track or collect personally identifiable information or associate gathered data
+ with any personally identifying information from other sources.
+
+ By using this website, you consent to the collection of this data in the manner and for the purpose described above.
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/markdown/index.md
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/markdown/index.md?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/markdown/index.md (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/markdown/index.md Tue Nov 25 21:59:17 2014
@@ -0,0 +1,35 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+# Geronimo JavaMail 1.4
+
+Geronimo JavaMail 1.4
+
+## Get started
+
+Just get it from maven
+
+### Core
+
+<pre class="prettyprint linenums"><![CDATA[
+<dependency>
+ <groupId>org.apache.geronimo.javamail</groupId>
+ <artifactId>geronimo-javamail_1.4_provider</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+</dependency>
+]]></pre>
\ No newline at end of file
Added: geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/site.xml
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/site.xml?rev=1641709&view=auto
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/site.xml (added)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/site.xml Tue Nov 25 21:59:17 2014
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project name="Apache Johnzon"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/DECORATION/1.0.1"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.1
+ http://maven.apache.org/xsd/decoration-1.0.1.xsd">
+ <bannerLeft>
+ <name>Geronimo JavaMail</name>
+ <alt>Geronimo JavaMail</alt>
+ <href>/index.html</href>
+ </bannerLeft>
+ <bannerRight>
+ <src>http://geronimo.apache.org/images/topleft_logo_437x64.gif</src>
+ <href>http://geronimo.apache.org/</href>
+ </bannerRight>
+
+ <custom>
+ <fluidoSkin>
+ <topBarEnabled>true</topBarEnabled>
+ <sideBarEnabled>true</sideBarEnabled>
+ <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled>
+ </fluidoSkin>
+ </custom>
+
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.3.0</version>
+ </skin>
+
+ <body>
+
+ <head>
+
+ <script type="text/javascript">
+
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-3211522-15', 'apache.org');
+ ga('send', 'pageview');
+
+ </script>
+
+ </head>
+
+ <menu name="User Guide">
+ <item name="Home" href="/index.html"/>
+ </menu>
+
+ <menu ref="reports" inherit="bottom"/>
+
+ <menu name="ASF">
+ <item name="How Apache Works" href="http://www.apache.org/foundation/how-it-works.html"/>
+ <item name="Foundation" href="http://www.apache.org/foundation/"/>
+ <item name="Sponsoring Apache" href="http://www.apache.org/foundation/sponsorship.html"/>
+ <item name="Thanks" href="http://www.apache.org/foundation/thanks.html"/>
+ </menu>
+
+ <footer>
+ <div class="row span16"><div>Apache Geronimo, Apache, the Apache feather logo, and the Apache Johnzon project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+ <a href="${project.url}/privacy-policy.html">Privacy Policy</a>
+ </div>
+ </footer>
+
+ </body>
+</project>
Propchange: geronimo/javamail/trunk/geronimo-javamail_1.4/src/site/site.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain