I don't know what to say. I am not using package substitution right now, so can't verify that it works, with or without maven. If it is working when you use the xdoclet plugin and the properties mentioned below, then for sure it _has_ to work when you just use the raw xdoclet xml stuff in maven.xml. All the plugin is doing is translating the stuff in the property file to the equivalent tasks. You can look at the plugin.jelly in the xdoclet plugin and see how it does it. If it's not working when you use the xml form, but working with the plugin, all I can suggest is that there is an error in how you are formatting it or something else simple. As to your last bit about trying to use the properties when using the goals and raw xml in maven.xml, keep in mind that those properties are only know about by the xdoclet plugin. They will have zero effect when you use the tasks directly in maven.xml.


Darren Hartford wrote:

Hi Colin,
Thanks, I have tried something similar from couple of other sites, using Maven.Xml with multiple goals (which looks perfect for my scenario!).
===
<preGoal name="java:compile">
<attainGoal name="gen-entity1"/>
<attainGoal name="gen-entity2"/>
</preGoal>
===
So off to an excellent start! Now for a problem:

I am having an issue with Substitutions - the following in maven.xml doesn't seem to work:
===
<goal name="gen-entity1">
<mkdir dir="${target.expejb.primary.dd.dir}"/>
<ejbdoclet
...snip...
<packageSubstitution packages="ejb" substituteWith="interfaces"/>
====

I have the following in project.properties, and when building normally from maven without goals this works fine but NOT when using goals:
maven.xdoclet.ejbdoclet.packageSubstitution.0=true
maven.xdoclet.ejbdoclet.packageSubstitution.0.packages=ejb
maven.xdoclet.ejbdoclet.packageSubstitution.0.substituteWith=interfaces

maven.xdoclet.ejbdoclet.localhomeinterface.0=true
maven.xdoclet.ejbdoclet.localhomeinterface.0.packageSubstitution.0=true
maven.xdoclet.ejbdoclet.localhomeinterface.0.packageSubstitution.0.packages=entity
maven.xdoclet.ejbdoclet.localhomeinterface.0.packageSubstitution.0.substituteWith=entity.interfaces

I tried copying the above to maven.properties to see if maybe had to add it for goal-specifics, but doesn't seem to work. Suggestions/help from anyone please? So close to moving from Ant to Maven....

thanky,
-D



-----Original Message-----
From: Colin Sampaleanu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 10, 2003 11:41 AM
To: Turbine Maven Users List
Subject: Re: build xdoclet w/ multiple entities, different properties,
same project?


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to