commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1416652 - in /commons/proper/email/trunk: ./ src/java/ src/main/ src/main/java/ src/main/resources/ src/resources/ src/test/attachments/ src/test/eml/ src/test/html/ src/test/images/ src/test/java/ src/test/java/org/ src/test/java/org/apac...
Date Mon, 03 Dec 2012 20:16:11 GMT
Author: tn
Date: Mon Dec  3 20:16:07 2012
New Revision: 1416652

URL: http://svn.apache.org/viewvc?rev=1416652&view=rev
Log:
[EMAIL-122] Upgrade to 1.5 source compat, move to standard maven directory layout.

Added:
    commons/proper/email/trunk/src/main/
    commons/proper/email/trunk/src/main/java/
      - copied from r1416251, commons/proper/email/trunk/src/java/
    commons/proper/email/trunk/src/main/resources/
      - copied from r1416251, commons/proper/email/trunk/src/resources/
    commons/proper/email/trunk/src/test/java/
    commons/proper/email/trunk/src/test/java/org/
      - copied from r1416251, commons/proper/email/trunk/src/test/org/
    commons/proper/email/trunk/src/test/resources/
    commons/proper/email/trunk/src/test/resources/attachments/
      - copied from r1416251, commons/proper/email/trunk/src/test/attachments/
    commons/proper/email/trunk/src/test/resources/eml/
      - copied from r1416251, commons/proper/email/trunk/src/test/eml/
    commons/proper/email/trunk/src/test/resources/html/
      - copied from r1416251, commons/proper/email/trunk/src/test/html/
    commons/proper/email/trunk/src/test/resources/images/
      - copied from r1416251, commons/proper/email/trunk/src/test/images/
Removed:
    commons/proper/email/trunk/src/java/
    commons/proper/email/trunk/src/resources/
    commons/proper/email/trunk/src/test/attachments/
    commons/proper/email/trunk/src/test/eml/
    commons/proper/email/trunk/src/test/html/
    commons/proper/email/trunk/src/test/images/
    commons/proper/email/trunk/src/test/org/
Modified:
    commons/proper/email/trunk/pom.xml
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/EmailLiveTest.java
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/HtmlEmailTest.java
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceFileResolverTest.java
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceUrlResolverTest.java
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/util/MimeMessageParserTest.java

Modified: commons/proper/email/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/pom.xml?rev=1416652&r1=1416651&r2=1416652&view=diff
==============================================================================
--- commons/proper/email/trunk/pom.xml (original)
+++ commons/proper/email/trunk/pom.xml Mon Dec  3 20:16:07 2012
@@ -246,8 +246,8 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <maven.compile.source>1.4</maven.compile.source>
-        <maven.compile.target>1.4</maven.compile.target>
+        <maven.compile.source>1.5</maven.compile.source>
+        <maven.compile.target>1.5</maven.compile.target>
         <commons.componentid>email</commons.componentid>
         <commons.jira.id>EMAIL</commons.jira.id>
         <commons.jira.pid>12310474</commons.jira.pid>
@@ -257,21 +257,6 @@
     </properties> 
 
     <build>
-        <sourceDirectory>src/java</sourceDirectory>
-        <resources>
-            <resource>
-                <directory>src/resources</directory>
-            </resource>
-        </resources>
-        <testSourceDirectory>src/test</testSourceDirectory>
-        <testResources>
-            <testResource>
-                <directory>src/test</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </testResource>
-        </testResources>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/EmailLiveTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/EmailLiveTest.java?rev=1416652&r1=1416251&r2=1416652&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/EmailLiveTest.java (original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/EmailLiveTest.java Mon
Dec  3 20:16:07 2012
@@ -142,7 +142,7 @@ public class EmailLiveTest extends BaseE
         MultiPartEmail email = (MultiPartEmail) create(MultiPartEmail.class);
         email.setSubject("TestMultiPartMail");
         email.setMsg("This is a test mail ... :-)");
-        email.attach(new File("./src/test/attachments/logo.pdf"));
+        email.attach(new File("./src/test/resources/attachments/logo.pdf"));
 
         EmailUtils.writeMimeMessage( new File("./target/test-emails/multipart.eml"), send(email).getMimeMessage());
     }
@@ -164,10 +164,10 @@ public class EmailLiveTest extends BaseE
         String cid;
 
         URL url = new URL(EmailConfiguration.TEST_URL);
-        File imageFile = new File("./src/test/images/asf_logo_wide.gif");
+        File imageFile = new File("./src/test/resources/images/asf_logo_wide.gif");
 
         EmailAttachment attachment = new EmailAttachment();
-        File attachmentFile = new File("./src/test/attachments/logo.pdf");
+        File attachmentFile = new File("./src/test/resources/attachments/logo.pdf");
         attachment.setName("logo.pdf");
         attachment.setDescription("The official Apache logo");
         attachment.setPath(attachmentFile.getAbsolutePath());
@@ -266,7 +266,7 @@ public class EmailLiveTest extends BaseE
     {
         // use a simple HTML page with one image 
 
-        File htmlFile = new File("./src/test/html/www.apache.org.html");
+        File htmlFile = new File("./src/test/resources/html/www.apache.org.html");
         String htmlMsg1 = FileUtils.readFileToString(htmlFile);
 
         ImageHtmlEmail email = (ImageHtmlEmail) create(ImageHtmlEmail.class);

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/HtmlEmailTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/HtmlEmailTest.java?rev=1416652&r1=1416251&r2=1416652&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/HtmlEmailTest.java (original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/HtmlEmailTest.java Mon
Dec  3 20:16:07 2012
@@ -659,7 +659,7 @@ public class HtmlEmailTest extends BaseE
 
     private void assertCorrectContentType(String picture, String contentType) throws Exception
{
         HtmlEmail htmlEmail = createDefaultHtmlEmail();
-        String cid = htmlEmail.embed(new File("./src/test/images/" + picture), "Apache Logo");
+        String cid = htmlEmail.embed(new File("./src/test/resources/images/" + picture),
"Apache Logo");
         String htmlMsg = "<html><img src=\"cid:" + cid + "\"><html>";
         htmlEmail.setHtmlMsg(htmlMsg);
         htmlEmail.buildMimeMessage();

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceFileResolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceFileResolverTest.java?rev=1416652&r1=1416251&r2=1416652&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceFileResolverTest.java
(original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceFileResolverTest.java
Mon Dec  3 20:16:07 2012
@@ -44,10 +44,10 @@ public class DataSourceFileResolverTest 
 
     public void testResolvingFileLenient() throws Exception
     {
-        DataSourceResolver dataSourceResolver = new DataSourceFileResolver(new File("./src/test"),
true);
+        DataSourceResolver dataSourceResolver = new DataSourceFileResolver(new File("./src/test/resources"),
true);
         assertTrue(toByteArray(dataSourceResolver.resolve("images/asf_logo_wide.gif")).length
== IMG_SIZE);
         assertTrue(toByteArray(dataSourceResolver.resolve("./images/asf_logo_wide.gif")).length
== IMG_SIZE);
-        assertTrue(toByteArray(dataSourceResolver.resolve("../test/images/asf_logo_wide.gif")).length
== IMG_SIZE);
+        assertTrue(toByteArray(dataSourceResolver.resolve("../resources/images/asf_logo_wide.gif")).length
== IMG_SIZE);
         assertNull(toByteArray(dataSourceResolver.resolve("/images/does-not-exist.gif")));
         assertNull(dataSourceResolver.resolve("./images/does-not-exist.gif"));
     }
@@ -55,7 +55,7 @@ public class DataSourceFileResolverTest 
     public void testResolvingFileNonLenient() throws Exception
     {
         DataSourceResolver dataSourceResolver = new DataSourceFileResolver(new File("."),
false);
-        assertNotNull(dataSourceResolver.resolve("./src/test/images/asf_logo_wide.gif"));
+        assertNotNull(dataSourceResolver.resolve("./src/test/resources/images/asf_logo_wide.gif"));
 
         try
         {

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceUrlResolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceUrlResolverTest.java?rev=1416652&r1=1416251&r2=1416652&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceUrlResolverTest.java
(original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/resolver/DataSourceUrlResolverTest.java
Mon Dec  3 20:16:07 2012
@@ -49,7 +49,7 @@ public class DataSourceUrlResolverTest e
      */
     public void testResolvingFilesLenient() throws Exception
     {
-        DataSourceResolver dataSourceResolver = new DataSourceUrlResolver(new File("./src/test").toURI().toURL(),
true);
+        DataSourceResolver dataSourceResolver = new DataSourceUrlResolver(new File("./src/test/resources").toURI().toURL(),
true);
         assertTrue(toByteArray(dataSourceResolver.resolve("images/asf_logo_wide.gif")).length
== IMG_SIZE);
         assertTrue(toByteArray(dataSourceResolver.resolve("./images/asf_logo_wide.gif")).length
== IMG_SIZE);
         assertNull(dataSourceResolver.resolve("./images/does-not-exist.gif"));

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/util/MimeMessageParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/util/MimeMessageParserTest.java?rev=1416652&r1=1416251&r2=1416652&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/util/MimeMessageParserTest.java
(original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/util/MimeMessageParserTest.java
Mon Dec  3 20:16:07 2012
@@ -48,7 +48,7 @@ public class MimeMessageParserTest
     public void testParseSimpleEmail() throws Exception
     {
         Session session = Session.getDefaultInstance(new Properties());
-        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/eml/simple.eml"));
+        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/resources/eml/simple.eml"));
         MimeMessageParser mimeMessageParser = new MimeMessageParser(message);
 
         mimeMessageParser.parse();
@@ -71,7 +71,7 @@ public class MimeMessageParserTest
     public void testParseSimpleReplyEmail() throws Exception
     {
         Session session = Session.getDefaultInstance(new Properties());
-        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/eml/simple-reply.eml"));
+        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/resources/eml/simple-reply.eml"));
         MimeMessageParser mimeMessageParser = new MimeMessageParser(message);
 
         mimeMessageParser.parse();
@@ -95,7 +95,7 @@ public class MimeMessageParserTest
     {
         DataSource dataSource;
         Session session = Session.getDefaultInstance(new Properties());
-        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/eml/html-attachment.eml"));
+        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/resources/eml/html-attachment.eml"));
         MimeMessageParser mimeMessageParser = new MimeMessageParser(message);
 
         mimeMessageParser.parse();
@@ -135,7 +135,7 @@ public class MimeMessageParserTest
     {
         DataSource dataSource;
         Session session = Session.getDefaultInstance(new Properties());
-        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/eml/multipart-report.eml"));
+        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/resources/eml/multipart-report.eml"));
         MimeMessageParser mimeMessageParser = new MimeMessageParser(message);
 
         mimeMessageParser.parse();
@@ -172,7 +172,7 @@ public class MimeMessageParserTest
     {
         DataSource dataSource;
         Session session = Session.getDefaultInstance(new Properties());
-        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/eml/attachment-only.eml"));
+        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/resources/eml/attachment-only.eml"));
         MimeMessageParser mimeMessageParser = new MimeMessageParser(message);
 
         mimeMessageParser.parse();
@@ -208,7 +208,7 @@ public class MimeMessageParserTest
     public void testParseNoHeaderSeperatorWithOutOfMemory() throws Exception
     {
         Session session = Session.getDefaultInstance(new Properties());
-        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/eml/outofmemory-no-header-seperation.eml"));
+        MimeMessage message = MimeMessageUtils.createMimeMessage(session, new File("./src/test/resources/eml/outofmemory-no-header-seperation.eml"));
         MimeMessageParser mimeMessageParser = new MimeMessageParser(message);
 
         mimeMessageParser.parse();



Mime
View raw message