Mohamed,
You have to specify 2 templates for beans, a base GSP and a non-base GSP.
Your pom.xml posted above only shows 1 GSP for the base; notice that
Christopher's pom.xml lists two. That's the reason why it works for him and
doesn't work for you. The first entry under <beanTemplate/> is the base GSP
and the second is the non-base. They use the same tag:
<beanTemplate>
<bean>${basedir}/src/main/resources/beanBaseCustom.gsp</bean>
<bean>${basedir}/src/main/resources/beanCustom.gsp</bean>
</beanTemplate>
For my projects, I specify them the way Christopher does. The approach of
using the <beanTemplate/> and other *Template tags does not allow you to
specify remote interface GSPs, which I need. Only the <templates/> tag will
let you do that. My recommendation would be to change your configuration to
match his.
Hope this helps,
Bryan Turner
On Tue, Apr 26, 2011 at 7:01 AM, Christofer Dutz <
[email protected]> wrote:
> Well I used to specify the templates differently ... mabe this helps:
>
>
> http://dev.c-ware.de/confluence/display/PUBLIC/Flexmojos+generated+AS3+model+with+Enum+support+using+BlazeDS
>
> I used:
> <templates>
>
>
> <base-bean-template>${basedir}/src/main/template/beanBase.gsp</base-bean-template>
>
> <bean-template>${basedir}/src/main/template/bean.gsp</bean-template>
> </templates>
>
> in my project (Prior to FM4)
>
> Chris
>
>
> 2011/4/26 Mohamed KARAMI <[email protected]>:
> > I have an issue with Flexmojo version 3.8 (3.2 worked well), i have this
> > error :
> > [INFO] [flexmojos:generate {execution: generate-dto}]
> > [INFO] Flexmojos 3.8
> > [INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
> > [INFO] flexmojos 3.8 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] FATAL ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] 1
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Trace
> > java.lang.ArrayIndexOutOfBoundsException: 1
> > at
> >
> org.sonatype.flexmojos.generator.SimpleGeneratorMojo.setUp(SimpleGeneratorMojo.java:298)
> > at
> >
> org.sonatype.flexmojos.generator.SimpleGeneratorMojo.execute(SimpleGeneratorMojo.java:199)
> > at
> >
> org.sonatype.flexmojos.generator.GeneratorMojo.execute(GeneratorMojo.java:49)
> > at
> >
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> > at
> > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:585)
> > at
> > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > at
> > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> > at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > My pom :
> >
> > <plugin>
> > <groupId>org.sonatype.flexmojos</groupId>
> > <artifactId>flexmojos-maven-plugin</artifactId>
> > <version>3.8</version>
> > <extensions>true</extensions>
> > <executions>
> > <execution>
> > <id>generate-dto</id>
> > <goals>
> > <goal>generate</goal>
> > </goals>
> > <configuration>
> > <beanTemplate>
> >
> > <bean>${basedir}/src/main/resources/beanBaseCustom.gsp</bean>
> >
> > </beanTemplate>
> > </configuration>
> > </execution>
> > <execution>
> > <id>generate-flexbuilder-config</id>
> > <goals>
> > <goal>flexbuilder</goal>
> > </goals>
> > <phase>initialize</phase>
> > </execution>
> > </executions>
> > </plugin>
> >
> > Any ideas!
> >
> > --
> > 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/
> >
>
> --
> 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/
>
--
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/