Think I see your point, the Ant task will still be the main (and most up-to-date) way to run Middlegen. In fact, the Maven plugin is simply calling the Ant task. If you want to keep full control of your build goals, you should probably keep your current setup.
Some advantages of the Maven plugin: - Dependencies: You only need to specify a dependency on the Middlegen plugin: ... <dependency> <groupId>middlegen</groupId> <artifactId>maven-middlegen-plugin</artifactId> <version>2.1</version> <type>plugin</type> </dependency> ... The plugin will download the files it needs itself (Middlegen jar files, velocity etc.). - Easier to run Middlegen several times on different databases/options. The Maven plugin has support for running Middlegen up to 50 times in one single build. This is configured via properties: maven.middlegen.run.0=true maven.middlegen.0.database.url=jdbc:hsqldb:${maven.src.dir}/hsqldb/airline maven.middlegen.run.1=true maven.middlegen.1.database.url=jdbc:mysql://localhost/test - No need to maintain a big maven.xml file with goals :) The main reason I added in the plugin was to make Middlegen easier to use for new users. We've had some complaints about the complexity of configuring and running Middlegen.. .eivind On Tue, 12 Oct 2004, Darren Hartford wrote: > Hi Eivand,all, > All of my J2EE projects are built with the Maven framework, but to-date I've only > used the ANT-based tasks for build instructions (i.e. use existing ANT > configurations in Maven). > > You've peaked my interest, but what would be gained for users, like me, by using the > Maven Middlegen plugin? > An example middlegen task/goal in Maven without plugin: > ========== > <goal name="middlegen:ejb"> > <taskdef name="middlegen" classname="middlegen.MiddlegenTask"> > <classpath> > <path refid="maven.dependency.classpath"/> > </classpath> > </taskdef> > > <middlegen > appname="${pom.artifactId}" > prefsdir="${basedir}" > gui="false" > databaseurl="jdbc:databaseblah" > driver="com.myJDBCDriver" > username="user" > password="password" > datasourceJNDIName="java:/JNDI-DS" > initialContextFactory="org.jnp.interfaces.NamingContextFactory" > providerURL="localhost:1099" > > > > <!-- > <table name="ATABLELISTINGIFYOUWANT" singular="Table" plural="Tables"/> > --> > > <cmp20 > destination="${basedir}/generated/middlegen" > mergedir="${basedir}/src/conf/middlegen" > package="${pom.package}.domain.ejb" > interfacepackage="${pom.package}.domain.interfaces" > pkclass="false" > dataobject="false" > valueobject="true" > viewtype="local" > readonly="false" > fkcmp="true" > guid="false" > sessionfacade="false" > > > <jboss/> > </cmp20> > </middlegen> > <attainGoal name="xdoclet:middlegen:ejb"/> > </goal> > ========= > > I know some people live and breath the maven.properties and project.properties > files, but I personally prefer keeping with the ANT-based goal/task kind of > configuration, as it is easy to find examples of ANT Tasks that can be easily > converted to Maven goals without the need of plugins nor in waiting for Maven > plugins to be kept up-to-date with their related project (a fault I have come across > in a couple of project/plugins outside of middlegen). > > Some people will definately enjoy the plugin, but in keeping with open-source > spirit, offering other solution(s) that already exists as well! > -D > > > -----Original Message----- > > From: Eivind Waaler [mailto:[EMAIL PROTECTED] > > Sent: Friday, October 08, 2004 9:32 AM > > To: [EMAIL PROTECTED] > > Subject: [Middlegen-user] Middlegen Maven Plugin > > > > > > We've released an initial version of the Middlegen Maven Plugin. For > > instructions go to this page: > > > > http://boss.bekk.no/boss/middlegen-maven > > > > Hope someone can test it out. Any feedback would be welcome, some > > questions I'd like answered: > > > > - What are sensible default values for properties? > > - How should the properties be arranged? > > - Are you missing any functionality? > > - Is there a need for all plugins? Currently Hibernate and CMP are > > supported. > > - Other things? > > > > I believe this is a good move to make Middlegen easier to use and > > generally more available. Once the plugin is good enough > > we'll try to get > > a link from the Maven site. > > > > .eivind > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > middlegen-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/middlegen-user > > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user