You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Darren Hartford <dh...@ghsinc.com> on 2003/02/10 17:33:33 UTC

build xdoclet w/ multiple entities, different properties, same project?

Hi all,
First, very much a newbie but so far am very impressed with using Maven over Ant, great work!!

I am using Maven to build xDoclet/Jboss EJB's and have come across a scenario that I am stuck on.  I have one project that has multiple entity beans.  Some of these entity beans require different datasources (i.e. different properties).  Here is the properties from my project.properties file:

maven.xdoclet.ejbdoclet.jboss.0=true
# maven.xdoclet.ejbdoclet.jboss.0.version=3.0.3 - comment out as nextline works
maven.xdoclet.ejbdoclet.jboss.Version=3.0.3
maven.xdoclet.ejbdoclet.jboss.0.datasource=java:/MYDS1-DS
#maven.xdoclet.ejbdoclet.jboss.0.datasource=java:/MYDS2-DS - other datasource
maven.xdoclet.ejbdoclet.jboss.0.typemapping=mySQL
#maven.xdoclet.ejbdoclet.jboss.0.typemapping=MSSQL - just incase different datasource is different typemapping
maven.xdoclet.ejbdoclet.jboss.0.destDir=./target/xdoclet/ejb/META-INF
maven.xdoclet.ejbdoclet.jboss.0.createTable=true

I have a different entity bean from the same project that needs to map to a different datasource (MYDS2-DS).  I would like everything to be built and show all source files/changes/javadoc/etc within one view, as it is now as one singular project.  Please help with some examples to share with everyone, this would make my life and I'm sure other peoples a lot easier! :-)

/src/java/com/mydomain/projectname/entity1/*Bean.java --> MYDS1-DS

/src/java/com/mydomain/projectname/entity2/*Bean.java --> MYDS2-DS

thanks in advance!
-D

Re: build xdoclet w/ multiple entities, different properties, same project?

Posted by Colin Sampaleanu <co...@exis.com>.
You may be best off  just skipping the use of the xdoclet plugin at this 
point. Search this list (look for xdoclet) for some posts from me from a 
few weeks ago on why I think the xdoclet plugin provides less value than 
just using xdoclet directly in maven.xml. If you do the latter, then you 
can call xdoclet once for each group of beans, as needed...


Darren Hartford wrote:

>Hi all,
>First, very much a newbie but so far am very impressed with using Maven over Ant, great work!!
>
>I am using Maven to build xDoclet/Jboss EJB's and have come across a scenario that I am stuck on.  I have one project that has multiple entity beans.  Some of these entity beans require different datasources (i.e. different properties).  Here is the properties from my project.properties file:
>
>maven.xdoclet.ejbdoclet.jboss.0=true
># maven.xdoclet.ejbdoclet.jboss.0.version=3.0.3 - comment out as nextline works
>maven.xdoclet.ejbdoclet.jboss.Version=3.0.3
>maven.xdoclet.ejbdoclet.jboss.0.datasource=java:/MYDS1-DS
>#maven.xdoclet.ejbdoclet.jboss.0.datasource=java:/MYDS2-DS - other datasource
>maven.xdoclet.ejbdoclet.jboss.0.typemapping=mySQL
>#maven.xdoclet.ejbdoclet.jboss.0.typemapping=MSSQL - just incase different datasource is different typemapping
>maven.xdoclet.ejbdoclet.jboss.0.destDir=./target/xdoclet/ejb/META-INF
>maven.xdoclet.ejbdoclet.jboss.0.createTable=true
>
>I have a different entity bean from the same project that needs to map to a different datasource (MYDS2-DS).  I would like everything to be built and show all source files/changes/javadoc/etc within one view, as it is now as one singular project.  Please help with some examples to share with everyone, this would make my life and I'm sure other peoples a lot easier! :-)
>
>/src/java/com/mydomain/projectname/entity1/*Bean.java --> MYDS1-DS
>
>/src/java/com/mydomain/projectname/entity2/*Bean.java --> MYDS2-DS
>
>thanks in advance!
>-D
>  
>