You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Farrukh Najmi (JIRA)" <ji...@apache.org> on 2012/06/29 14:17:43 UTC

[jira] [Updated] (IMAGING-85) Rename src/test/data directory to src/test/resources to comply with maven conventions

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

Farrukh Najmi updated IMAGING-85:
---------------------------------

    Description: 
Currently established maven convention is not being following because test resources being placed under src/test/data instead of src/test/resources directory. This causes problems is maven-jar-plugin and possibly other situations. Proposed patch for IMAGING-84 will not work until the proposed fix for this issues is addressed.

The proposed fix is to rename src/test/data to src/test/resources and apply the following patch to fix test code that setsup path for test data files:

{code}
Index: src/test/java/org/apache/commons/imaging/ImagingTestConstants.java
===================================================================
--- src/test/java/org/apache/commons/imaging/ImagingTestConstants.java  (revision 1354112)
+++ src/test/java/org/apache/commons/imaging/ImagingTestConstants.java  (working copy)
@@ -24,12 +24,12 @@
 
     static final File PHIL_HARVEY_TEST_IMAGE_FOLDER = new File(
             FilenameUtils
-                    .separatorsToSystem("src\\test\\data\\images\\exif\\philHarvey\\"));
+                    .separatorsToSystem("src\\test\\resources\\images\\exif\\philHarvey\\"));
 
     static final File SOURCE_FOLDER = new File("src");
     static final File TEST_SOURCE_FOLDER = new File(SOURCE_FOLDER, "test");
     static final File TEST_DATA_SOURCE_FOLDER = new File(TEST_SOURCE_FOLDER,
-            "data");
+            "resources");
     static final File TEST_IMAGE_FOLDER = new File(TEST_DATA_SOURCE_FOLDER,
             "images");
 }
{code}

  was:
Currently established maven convention is not being following because test resources being placed under src/test/data instead of src/test/resources directory. This causes problems is maven-jar-plugin and possibly other situations. Proposed patch for SANSELAN-82 will not work until the proposed fix for this issues is addressed.

The proposed fix is to rename src/test/data to src/test/resources and apply the following patch to fix test code that setsup path for test data files:

{code}
Index: src/test/java/org/apache/commons/imaging/ImagingTestConstants.java
===================================================================
--- src/test/java/org/apache/commons/imaging/ImagingTestConstants.java  (revision 1354112)
+++ src/test/java/org/apache/commons/imaging/ImagingTestConstants.java  (working copy)
@@ -24,12 +24,12 @@
 
     static final File PHIL_HARVEY_TEST_IMAGE_FOLDER = new File(
             FilenameUtils
-                    .separatorsToSystem("src\\test\\data\\images\\exif\\philHarvey\\"));
+                    .separatorsToSystem("src\\test\\resources\\images\\exif\\philHarvey\\"));
 
     static final File SOURCE_FOLDER = new File("src");
     static final File TEST_SOURCE_FOLDER = new File(SOURCE_FOLDER, "test");
     static final File TEST_DATA_SOURCE_FOLDER = new File(TEST_SOURCE_FOLDER,
-            "data");
+            "resources");
     static final File TEST_IMAGE_FOLDER = new File(TEST_DATA_SOURCE_FOLDER,
             "images");
 }
{code}

    
> Rename src/test/data directory to src/test/resources to comply with maven conventions
> -------------------------------------------------------------------------------------
>
>                 Key: IMAGING-85
>                 URL: https://issues.apache.org/jira/browse/IMAGING-85
>             Project: Commons Imaging
>          Issue Type: Improvement
>            Reporter: Farrukh Najmi
>         Attachments: SANSELAN-83-patch.txt
>
>
> Currently established maven convention is not being following because test resources being placed under src/test/data instead of src/test/resources directory. This causes problems is maven-jar-plugin and possibly other situations. Proposed patch for IMAGING-84 will not work until the proposed fix for this issues is addressed.
> The proposed fix is to rename src/test/data to src/test/resources and apply the following patch to fix test code that setsup path for test data files:
> {code}
> Index: src/test/java/org/apache/commons/imaging/ImagingTestConstants.java
> ===================================================================
> --- src/test/java/org/apache/commons/imaging/ImagingTestConstants.java  (revision 1354112)
> +++ src/test/java/org/apache/commons/imaging/ImagingTestConstants.java  (working copy)
> @@ -24,12 +24,12 @@
>  
>      static final File PHIL_HARVEY_TEST_IMAGE_FOLDER = new File(
>              FilenameUtils
> -                    .separatorsToSystem("src\\test\\data\\images\\exif\\philHarvey\\"));
> +                    .separatorsToSystem("src\\test\\resources\\images\\exif\\philHarvey\\"));
>  
>      static final File SOURCE_FOLDER = new File("src");
>      static final File TEST_SOURCE_FOLDER = new File(SOURCE_FOLDER, "test");
>      static final File TEST_DATA_SOURCE_FOLDER = new File(TEST_SOURCE_FOLDER,
> -            "data");
> +            "resources");
>      static final File TEST_IMAGE_FOLDER = new File(TEST_DATA_SOURCE_FOLDER,
>              "images");
>  }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira