Awesome, that'll work.  Thanks!

-Lon

On Mon, Oct 27, 2014 at 11:14 PM, Andrus Adamchik <and...@objectstyle.org>
wrote:

>
> > On Oct 28, 2014, at 12:46 AM, Lon Varscsak <lon.varsc...@gmail.com>
> wrote:
> >
> > Hey all,
> >
> > I'm using the cgen task to generate my class files, but I'm unsure of how
> > to tell it to build for several data maps.  I tried including multiple
> > <map> elements, but it only seems to execute for the final entry.
> >
> > Any thoughts?
> >
> > Thanks,
> >
> > Lon
>
> I'd suggest using multiple <execution> sections within the same plugin
> declaration. You can place properties either in the common "configuration"
> section, or into execution "configuration" sections:
>
> <plugin>
>     <groupId>org.apache.cayenne.plugins</groupId>
>     <artifactId>maven-cayenne-plugin</artifactId>
>
>     <!-- shared config part -->
>     <configuration>
>         <destDir>${project.basedir}/src/main/java</destDir>
>         <superPkg>org.example.model.auto</superPkg>
>     </configuration>
>
>     <executions>
>         <execution>
>             <id>map1</id>
>             <!-- Per execution config -->
>             <configuration>
>                 <map>${project.basedir}/src/main/resources/m1.map.xml</map>
>             </configuration>
>             <goals>
>                 <goal>cgen</goal>
>             </goals>
>         </execution>
>         <execution>
>             <id>map2</id>
>             <!-- Per execution config -->
>             <configuration>
>                 <map>${project.basedir}/src/main/resources/m2.map.xml</map>
>             </configuration>
>             <goals>
>                 <goal>cgen</goal>
>             </goals>
>         </execution>
>     </executions>
> </plugin>
>
> Andrus

Reply via email to