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

2012-06-29 Thread Farrukh Najmi (JIRA)

 [ 
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);
 +

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

2012-06-28 Thread Farrukh Najmi (JIRA)

[ 
https://issues.apache.org/jira/browse/IMAGING-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403075#comment-13403075
 ] 

Farrukh Najmi commented on IMAGING-85:
--

Loading test resources from classpath is not uncommon. Consider the simplicity 
of the following code junit test that uses spring framework.

{code}
@Test
public void testGetImageMetadataCommonsImaging() {

InputStream is = null;
try {
PathMatchingResourcePatternResolver resolver = new 
PathMatchingResourcePatternResolver();
Resource[] resources = 
resolver.getResources(classpath:images/iptc/1/Oregon Scientific DS6639 - 
DSC_0307 - iptc added with irfanview.jpg);
Resource res = resources[0];
URL url = res.getURL();
is = url.openStream();

Map params = new HashMap();
JpegImageMetadata metadata = (JpegImageMetadata) 
Imaging.getMetadata(is, Oregon Scientific DS6639 - DSC_0307 - iptc added with 
irfanview.jpg);
JpegPhotoshopMetadata psMetadata = metadata.getPhotoshop();
List oldRecords = psMetadata.photoshopApp13Data.getRecords();

for (int j = 0; j  oldRecords.size(); j++) {
IptcRecord record = (IptcRecord) oldRecords.get(j);
System.err.println(Key:  + record.iptcType.getName() +  (0x
+ Integer.toHexString(record.iptcType.getType())
+ ), value:  + record.value);
}

} catch (ImageReadException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} finally {
if (null != is) {
try {
is.close();
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
}
}
}

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

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




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

2012-06-28 Thread Farrukh Najmi (JIRA)

[ 
https://issues.apache.org/jira/browse/IMAGING-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403075#comment-13403075
 ] 

Farrukh Najmi edited comment on IMAGING-85 at 6/28/12 1:02 PM:
---

Loading test resources from classpath is not uncommon. Consider the simplicity 
of the following code junit test that uses spring framework.

{code}

@Test
public void testGetImageMetadataCommonsImaging() {

InputStream is = null;
try {
PathMatchingResourcePatternResolver resolver = new 
PathMatchingResourcePatternResolver();
Resource[] resources = 
resolver.getResources(classpath:images/iptc/1/Oregon Scientific DS6639 - 
DSC_0307 - iptc added with irfanview.jpg);
Resource res = resources[0];
URL url = res.getURL();
is = url.openStream();

Map params = new HashMap();
JpegImageMetadata metadata = (JpegImageMetadata) 
Imaging.getMetadata(is, Oregon Scientific DS6639 - DSC_0307 - iptc added with 
irfanview.jpg);
JpegPhotoshopMetadata psMetadata = metadata.getPhotoshop();
List oldRecords = psMetadata.photoshopApp13Data.getRecords();

for (int j = 0; j  oldRecords.size(); j++) {
IptcRecord record = (IptcRecord) oldRecords.get(j);
System.err.println(Key:  + record.iptcType.getName() +  (0x
+ Integer.toHexString(record.iptcType.getType())
+ ), value:  + record.value);
}

} catch (ImageReadException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} finally {
if (null != is) {
try {
is.close();
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
}
}
}

}
{code}

  was (Author: farrukhnajmi):
Loading test resources from classpath is not uncommon. Consider the 
simplicity of the following code junit test that uses spring framework.

{code}
@Test
public void testGetImageMetadataCommonsImaging() {

InputStream is = null;
try {
PathMatchingResourcePatternResolver resolver = new 
PathMatchingResourcePatternResolver();
Resource[] resources = 
resolver.getResources(classpath:images/iptc/1/Oregon Scientific DS6639 - 
DSC_0307 - iptc added with irfanview.jpg);
Resource res = resources[0];
URL url = res.getURL();
is = url.openStream();

Map params = new HashMap();
JpegImageMetadata metadata = (JpegImageMetadata) 
Imaging.getMetadata(is, Oregon Scientific DS6639 - DSC_0307 - iptc added with 
irfanview.jpg);
JpegPhotoshopMetadata psMetadata = metadata.getPhotoshop();
List oldRecords = psMetadata.photoshopApp13Data.getRecords();

for (int j = 0; j  oldRecords.size(); j++) {
IptcRecord record = (IptcRecord) oldRecords.get(j);
System.err.println(Key:  + record.iptcType.getName() +  (0x
+ Integer.toHexString(record.iptcType.getType())
+ ), value:  + record.value);
}

} catch (ImageReadException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} finally {
if (null != is) {
try {
is.close();
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
}
}
}

}
{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 SANSELAN-82 will not work until the 

[jira] [Commented] (IMAGING-84) Generate tests.jar so client projects can leverage test image data easily

2012-06-28 Thread Farrukh Najmi (JIRA)

[ 
https://issues.apache.org/jira/browse/IMAGING-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403077#comment-13403077
 ] 

Farrukh Najmi commented on IMAGING-84:
--

Using test data is not always the only reason to have a tests.jar artifact from 
a project. Another reason is when a project extends another project then it may 
want to also the base project's test classes as part of its own test suite. Do 
you see a downside to the project producing a tests.jar artifact?

Also, please see my comment on IMAGING-83 on why I think it is not unusual to 
load test data from the classpath in junit tests.


 Generate tests.jar so client projects can leverage test image data easily
 -

 Key: IMAGING-84
 URL: https://issues.apache.org/jira/browse/IMAGING-84
 Project: Commons Imaging
  Issue Type: Improvement
  Components: Build
Affects Versions: 0.97
Reporter: Farrukh Najmi
Priority: Minor
 Attachments: SANSELAN-82-patch.txt


 Client projects of commons-imaging need test image data and commons-imaging 
 already has a pretty good set. 
 The simple patch below can be applied to pom.xml to generate 
 commons-imaging-xxx-tests.jar in addition to commons-imaging-xxx.jar to allow 
 client projects to leverage the test data.
 {code}
 Index: pom.xml
 ===
 --- pom.xml (revision 1354112)
 +++ pom.xml (working copy)
 @@ -89,6 +89,14 @@
/plugin
plugin
  artifactIdmaven-jar-plugin/artifactId
 +executions
 +  execution
 +goals
 +  goaltest-jar/goal
 +/goals
 +  /execution
 +/executions
 +
  configuration
archive
  manifestEntries
 {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




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

2012-06-28 Thread Farrukh Najmi (JIRA)

[ 
https://issues.apache.org/jira/browse/IMAGING-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403075#comment-13403075
 ] 

Farrukh Najmi edited comment on IMAGING-85 at 6/28/12 1:27 PM:
---

Loading test resources from classpath is not uncommon. Consider the simplicity 
of the following code junit test that uses spring framework.
Feel free to close the issue if you and other dev team members are still -1 on 
this.

{code}

@Test
public void testGetImageMetadataCommonsImaging() {

InputStream is = null;
try {
PathMatchingResourcePatternResolver resolver = new 
PathMatchingResourcePatternResolver();
Resource[] resources = 
resolver.getResources(classpath:images/iptc/1/Oregon Scientific DS6639 - 
DSC_0307 - iptc added with irfanview.jpg);
Resource res = resources[0];
URL url = res.getURL();
is = url.openStream();

Map params = new HashMap();
JpegImageMetadata metadata = (JpegImageMetadata) 
Imaging.getMetadata(is, Oregon Scientific DS6639 - DSC_0307 - iptc added with 
irfanview.jpg);
JpegPhotoshopMetadata psMetadata = metadata.getPhotoshop();
List oldRecords = psMetadata.photoshopApp13Data.getRecords();

for (int j = 0; j  oldRecords.size(); j++) {
IptcRecord record = (IptcRecord) oldRecords.get(j);
System.err.println(Key:  + record.iptcType.getName() +  (0x
+ Integer.toHexString(record.iptcType.getType())
+ ), value:  + record.value);
}

} catch (ImageReadException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} finally {
if (null != is) {
try {
is.close();
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
}
}
}

}
{code}

  was (Author: farrukhnajmi):
Loading test resources from classpath is not uncommon. Consider the 
simplicity of the following code junit test that uses spring framework.

{code}

@Test
public void testGetImageMetadataCommonsImaging() {

InputStream is = null;
try {
PathMatchingResourcePatternResolver resolver = new 
PathMatchingResourcePatternResolver();
Resource[] resources = 
resolver.getResources(classpath:images/iptc/1/Oregon Scientific DS6639 - 
DSC_0307 - iptc added with irfanview.jpg);
Resource res = resources[0];
URL url = res.getURL();
is = url.openStream();

Map params = new HashMap();
JpegImageMetadata metadata = (JpegImageMetadata) 
Imaging.getMetadata(is, Oregon Scientific DS6639 - DSC_0307 - iptc added with 
irfanview.jpg);
JpegPhotoshopMetadata psMetadata = metadata.getPhotoshop();
List oldRecords = psMetadata.photoshopApp13Data.getRecords();

for (int j = 0; j  oldRecords.size(); j++) {
IptcRecord record = (IptcRecord) oldRecords.get(j);
System.err.println(Key:  + record.iptcType.getName() +  (0x
+ Integer.toHexString(record.iptcType.getType())
+ ), value:  + record.value);
}

} catch (ImageReadException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
} finally {
if (null != is) {
try {
is.close();
} catch (IOException ex) {

Logger.getLogger(ImageCatalogerTest.class.getName()).log(Level.SEVERE, null, 
ex);
}
}
}

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

[jira] [Comment Edited] (IMAGING-84) Generate tests.jar so client projects can leverage test image data easily

2012-06-28 Thread Farrukh Najmi (JIRA)

[ 
https://issues.apache.org/jira/browse/IMAGING-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403077#comment-13403077
 ] 

Farrukh Najmi edited comment on IMAGING-84 at 6/28/12 1:27 PM:
---

Using test data is not always the only reason to have a tests.jar artifact from 
a project. Another reason is when a project extends another project then it may 
want to also the base project's test classes as part of its own test suite. Do 
you see a downside to the project producing a tests.jar artifact?

Also, please see my comment on IMAGING-85 on why I think it is not unusual to 
load test data from the classpath in junit tests.

Feel free to close the issue if you and other dev team members are still -1 on 
this.


  was (Author: farrukhnajmi):
Using test data is not always the only reason to have a tests.jar artifact 
from a project. Another reason is when a project extends another project then 
it may want to also the base project's test classes as part of its own test 
suite. Do you see a downside to the project producing a tests.jar artifact?

Also, please see my comment on IMAGING-83 on why I think it is not unusual to 
load test data from the classpath in junit tests.

  
 Generate tests.jar so client projects can leverage test image data easily
 -

 Key: IMAGING-84
 URL: https://issues.apache.org/jira/browse/IMAGING-84
 Project: Commons Imaging
  Issue Type: Improvement
  Components: Build
Affects Versions: 0.97
Reporter: Farrukh Najmi
Priority: Minor
 Attachments: SANSELAN-82-patch.txt


 Client projects of commons-imaging need test image data and commons-imaging 
 already has a pretty good set. 
 The simple patch below can be applied to pom.xml to generate 
 commons-imaging-xxx-tests.jar in addition to commons-imaging-xxx.jar to allow 
 client projects to leverage the test data.
 {code}
 Index: pom.xml
 ===
 --- pom.xml (revision 1354112)
 +++ pom.xml (working copy)
 @@ -89,6 +89,14 @@
/plugin
plugin
  artifactIdmaven-jar-plugin/artifactId
 +executions
 +  execution
 +goals
 +  goaltest-jar/goal
 +/goals
 +  /execution
 +/executions
 +
  configuration
archive
  manifestEntries
 {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




[jira] [Created] (SANSELAN-82) Generate tests.jar so client projects can leverage test image data easily

2012-06-26 Thread Farrukh Najmi (JIRA)
Farrukh Najmi created SANSELAN-82:
-

 Summary: Generate tests.jar so client projects can leverage test 
image data easily
 Key: SANSELAN-82
 URL: https://issues.apache.org/jira/browse/SANSELAN-82
 Project: Commons Sanselan
  Issue Type: Improvement
  Components: Build
Affects Versions: 0.97
Reporter: Farrukh Najmi
Priority: Minor
 Fix For: 1.0


Client projects of commons-imaging need test image data and commons-imaging 
already has a pretty good set. 

The simple patch below can be applied to pom.xml to generate 
commons-imaging-xxx-tests.jar in addition to commons-imaging-xxx.jar to allow 
client projects to leverage the test data.

{code}
Index: pom.xml
===
--- pom.xml (revision 1354112)
+++ pom.xml (working copy)
@@ -89,6 +89,14 @@
   /plugin
   plugin
 artifactIdmaven-jar-plugin/artifactId
+executions
+  execution
+goals
+  goaltest-jar/goal
+/goals
+  /execution
+/executions
+
 configuration
   archive
 manifestEntries
{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




[jira] [Updated] (SANSELAN-82) Generate tests.jar so client projects can leverage test image data easily

2012-06-26 Thread Farrukh Najmi (JIRA)

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

Farrukh Najmi updated SANSELAN-82:
--

Attachment: SANSELAN-82-patch.txt

Proposed patch to address this issue.

 Generate tests.jar so client projects can leverage test image data easily
 -

 Key: SANSELAN-82
 URL: https://issues.apache.org/jira/browse/SANSELAN-82
 Project: Commons Sanselan
  Issue Type: Improvement
  Components: Build
Affects Versions: 0.97
Reporter: Farrukh Najmi
Priority: Minor
 Fix For: 1.0

 Attachments: SANSELAN-82-patch.txt


 Client projects of commons-imaging need test image data and commons-imaging 
 already has a pretty good set. 
 The simple patch below can be applied to pom.xml to generate 
 commons-imaging-xxx-tests.jar in addition to commons-imaging-xxx.jar to allow 
 client projects to leverage the test data.
 {code}
 Index: pom.xml
 ===
 --- pom.xml (revision 1354112)
 +++ pom.xml (working copy)
 @@ -89,6 +89,14 @@
/plugin
plugin
  artifactIdmaven-jar-plugin/artifactId
 +executions
 +  execution
 +goals
 +  goaltest-jar/goal
 +/goals
 +  /execution
 +/executions
 +
  configuration
archive
  manifestEntries
 {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




[jira] [Created] (SANSELAN-83) Rename src/test/data directory to src/test/resources to comply with maven conventions

2012-06-26 Thread Farrukh Najmi (JIRA)
Farrukh Najmi created SANSELAN-83:
-

 Summary: Rename src/test/data directory to src/test/resources to 
comply with maven conventions
 Key: SANSELAN-83
 URL: https://issues.apache.org/jira/browse/SANSELAN-83
 Project: Commons Sanselan
  Issue Type: Improvement
Reporter: Farrukh Najmi


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 mavn-jar-plugin and possibly other 
situations. 

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




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

2012-06-26 Thread Farrukh Najmi (JIRA)

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

Farrukh Najmi updated SANSELAN-83:
--

Attachment: SANSELAN-83-patch.txt

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

 Key: SANSELAN-83
 URL: https://issues.apache.org/jira/browse/SANSELAN-83
 Project: Commons Sanselan
  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 mavn-jar-plugin and possibly other 
 situations. 
 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




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

2012-06-26 Thread Farrukh Najmi (JIRA)

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

Farrukh Najmi updated SANSELAN-83:
--

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. 

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 mavn-jar-plugin and possibly other 
situations. 

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: SANSELAN-83
 URL: https://issues.apache.org/jira/browse/SANSELAN-83
 Project: Commons Sanselan
  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. 
 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: 

[jira] [Comment Edited] (SANSELAN-82) Generate tests.jar so client projects can leverage test image data easily

2012-06-26 Thread Farrukh Najmi (JIRA)

[ 
https://issues.apache.org/jira/browse/SANSELAN-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13401644#comment-13401644
 ] 

Farrukh Najmi edited comment on SANSELAN-82 at 6/26/12 9:00 PM:


Proposed patch to address this issue. Note that builds with proposed patch will 
not include test images until SANSELAN-83 is addressed.

  was (Author: farrukhnajmi):
Proposed patch to address this issue.
  
 Generate tests.jar so client projects can leverage test image data easily
 -

 Key: SANSELAN-82
 URL: https://issues.apache.org/jira/browse/SANSELAN-82
 Project: Commons Sanselan
  Issue Type: Improvement
  Components: Build
Affects Versions: 0.97
Reporter: Farrukh Najmi
Priority: Minor
 Fix For: 1.0

 Attachments: SANSELAN-82-patch.txt


 Client projects of commons-imaging need test image data and commons-imaging 
 already has a pretty good set. 
 The simple patch below can be applied to pom.xml to generate 
 commons-imaging-xxx-tests.jar in addition to commons-imaging-xxx.jar to allow 
 client projects to leverage the test data.
 {code}
 Index: pom.xml
 ===
 --- pom.xml (revision 1354112)
 +++ pom.xml (working copy)
 @@ -89,6 +89,14 @@
/plugin
plugin
  artifactIdmaven-jar-plugin/artifactId
 +executions
 +  execution
 +goals
 +  goaltest-jar/goal
 +/goals
 +  /execution
 +/executions
 +
  configuration
archive
  manifestEntries
 {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




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

2012-06-26 Thread Farrukh Najmi (JIRA)

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

Farrukh Najmi updated SANSELAN-83:
--

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

  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. 

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: SANSELAN-83
 URL: https://issues.apache.org/jira/browse/SANSELAN-83
 Project: Commons Sanselan
  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 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,