Hi,

I'm currently optimizing my build process of a pretty large project
built with flexmojos. In this project I have several model-swcs that
are generated by the generate goal. In order to make my model work
with BlazeDS instead of GraniteDS I created a set of templates to use.
Currently every model project contains a copy of all templates. In
order to maintain the tempates in one place I created a jar-project
containing the templates and define a plugin dependency to that
project. Now I tried to configure flexmojos to use the templates from
the classpath as the generator does when not overriding the templates.
Unfortunately the code in
org.sonatype.flexmojos.generator.granitedsv2d2d0.GraniteDsGenerator
explicitly treats the parameter as a file-name and this makes it
impossible to reference resources from the classpath.


    private String getStringByIndex( String[] a, int index )
    {
        String s = a == null ? null : ( a.length < index + 1 ? null :
a[index] );
        return s == null ? null : new File( s ).toURI().toString();
    }


Changing this function to something like the following, would enable
me to simplyfy my project greatly:


    private String getStringByIndex( String[] a, int index )
    {
        String s = a == null ? null : ( a.length < index + 1 ? null :
a[index] );
                if((s != null) && (s.indexOf("class:") == 0) {
                        return s;
                } else {
            return s == null ? null : new File( s ).toURI().toString();
                }
    }

Unfortunately I updated my custom flexmojos repostory but am currently
not able to build at all because of missing depencency on the flex-sdk
4.5.1.21328 so I can't test or deploy my changes.
Could you please do one of the following:

1. Tell me how to get the dependency
2. Apply my changes for me
3. Do any other changes that allow me to use templates from the classpath.

Chris

Chris

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos

http://flexmojos.sonatype.org/

Reply via email to