Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-85

Rename src/test/data directory to src/test/resources to comply with maven conventions

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Later
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      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:

      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");
       }
      

        Attachments

        1. SANSELAN-83-patch.txt
          1.0 kB
          Farrukh Najmi

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                farrukhnajmi Farrukh Najmi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: