maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Funk (JIRA)" <>
Subject [jira] Commented: (ARCHETYPE-25) images gif/jpgs etc seem to get corrupted when copied by archetype
Date Wed, 08 Mar 2006 17:15:23 GMT
    [ ] 

Chris Funk commented on ARCHETYPE-25:

I think it is a bit more complicated than that.

I did the following primitive hack to the process template method and still have the same
issue, it seems there might be something about copying images out of a jar resource.  Don't
know didn't spend too much time on it:

if (template.endsWith(".jpg") || template.endsWith(".gif")) {
            try {
                template = ARCHETYPE_RESOURCES + "/" + template;
                InputStream is = getStream(template, Thread.currentThread()
                OutputStream os = new FileOutputStream(f);
                int ch; // the buffer
                while ((ch = != -1) {

            } catch (Exception e) {
                getLogger().error("Could not copy image " + e.getMessage());

this had the exact same result

> images gif/jpgs etc seem to get corrupted when copied by archetype
> ------------------------------------------------------------------
>          Key: ARCHETYPE-25
>          URL:
>      Project: Maven Archetype
>         Type: Bug

>   Components: maven-archetype-plugin
>  Environment: windows XP
>     Reporter: Chris Funk
>     Assignee: Jason van Zyl
>     Priority: Minor

> I created a web archetype to include images in the src/main/webapp directory.
> They seem to copy over correctly and there size is reatined, but oddly the images view
as blank when displayed in browser or image viewer.
> I double checked to make sure the images I was using were ok and manually copied them
over and everything worked fine.  I have the images in the resources section in archetype.xml.
 Could be an encoding issue?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message