Discussion:
[Middlegen-user] Middlegen Maven Plugin
Eivind Waaler
2004-10-08 11:35:13 UTC
Permalink
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
M.-Leander Reimer
2004-10-08 12:30:38 UTC
Permalink
Hi Eivind,

I am getting a

Forbidden
You don't have permission to access /maven/ on this server.

when trying to access http://boss.bekk.no/maven/ or any subdirectory
like http://boss.bekk.no/maven/middlegen/plugins/

Have you changed much to the original Maven plugin there used to be in
CVS?? I am successfully using the old plugin with Maven 1.0 so I am
willing to test the new plugin with our current project.


Cheers,
Leander
Post by Eivind Waaler
We've released an initial version of the Middlegen Maven Plugin. For
http://boss.bekk.no/boss/middlegen-maven
Hope someone can test it out. Any feedback would be welcome, some
- 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
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Eivind Waaler
2004-10-08 13:14:48 UTC
Permalink
Hi, I have not changed much with respect to the cmp support. Only added a
few more fields and created some documentation for it.

Most of the work was related to adding Hibernate support.

Would be sweet if you could test it out, just to verify that it's working.
The plugin can be downloaded directly with this link:

http://boss.bekk.no/maven/middlegen/plugins/maven-middlegen-plugin-2.1.jar

The directories on the webserver do not allow browsing it seems. I'll try
to get this fixed too.

You could of course also just get it from cvs and build it yourself.

Thanks for your interest :)
.eivind
Post by M.-Leander Reimer
Hi Eivind,
I am getting a
Forbidden
You don't have permission to access /maven/ on this server.
when trying to access http://boss.bekk.no/maven/ or any subdirectory
like http://boss.bekk.no/maven/middlegen/plugins/
Have you changed much to the original Maven plugin there used to be in
CVS?? I am successfully using the old plugin with Maven 1.0 so I am
willing to test the new plugin with our current project.
Cheers,
Leander
Post by Eivind Waaler
We've released an initial version of the Middlegen Maven Plugin. For
http://boss.bekk.no/boss/middlegen-maven
Hope someone can test it out. Any feedback would be welcome, some
- 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
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
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Darren Hartford
2004-10-12 16:59:16 UTC
Permalink
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-----
Sent: Friday, October 08, 2004 9:32 AM
Subject: [Middlegen-user] Middlegen Maven Plugin
We've released an initial version of the Middlegen Maven Plugin. For
http://boss.bekk.no/boss/middlegen-maven
Hope someone can test it out. Any feedback would be welcome, some
- 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
Eivind Waaler
2004-10-13 05:28:36 UTC
Permalink
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
Post by Darren Hartford
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?
==========
<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-----
Sent: Friday, October 08, 2004 9:32 AM
Subject: [Middlegen-user] Middlegen Maven Plugin
We've released an initial version of the Middlegen Maven Plugin. For
http://boss.bekk.no/boss/middlegen-maven
Hope someone can test it out. Any feedback would be welcome, some
- 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
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Darren Hartford
2004-10-13 11:19:41 UTC
Permalink
Ahh, very good points! The ability to run multiple middlegen(s) from a smaller properties file is definately better than behomoth maven.xml files and the plugin would be definately is easier for users just getting started. If something like MEVENIDE gets up to speed (an Eclipse plugin for Maven), maven plugins like this would be even more valuable.
-D
-----Original Message-----
Sent: Wednesday, October 13, 2004 3:27 AM
Subject: RE: [Middlegen-user] Middlegen Maven Plugin
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.
- Dependencies: You only need to specify a dependency on the Middlegen
...
<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
maven.middlegen.run.0=true
maven.middlegen.0.database.url=jdbc:hsqldb:${maven.src.dir}/hs
qldb/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
Post by Darren Hartford
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).
Post by Darren Hartford
You've peaked my interest, but what would be gained for
users, like me, by using the Maven Middlegen plugin?
Post by Darren Hartford
==========
<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"
Post by Darren Hartford
providerURL="localhost:1099"
<!--
<table name="ATABLELISTINGIFYOUWANT"
singular="Table" plural="Tables"/>
Post by Darren Hartford
-->
<cmp20
destination="${basedir}/generated/middlegen"
mergedir="${basedir}/src/conf/middlegen"
package="${pom.package}.domain.ejb"
interfacepackage="${pom.package}.domain.interfaces"
Post by Darren Hartford
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).
Post by Darren Hartford
Some people will definately enjoy the plugin, but in
keeping with open-source spirit, offering other solution(s)
that already exists as well!
Post by Darren Hartford
-D
Loading...