You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Moritz Petersen <mo...@gmx.co.uk> on 2003/11/15 10:08:14 UTC

XDoclet, Struts and Maven: Where to start?

Hi List,

I need to work with the XDoclet Maven Plugin to generate 
struts-config.xml. Does anyone else have experience with that? I took a 
look at the XDoclet and XDoclet-Maven-Plugin, as well as in the 
xdoclet-apache-module source code, but did not find real pointers how 
to start. Is there a tutorial or HOW-TO out there?

What I need to know is, how to configure the webdoclet-module to 
generate the struts-config.xml file.

Any help will be highly appreciated. Thank you,

Moritz.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: XDoclet, Struts and Maven: Where to start? SOLUTION

Posted by Moritz Petersen <ko...@moritzpetersen.de>.
With the help of Marc, I finally found the problem. To let others know 
what I did wrong, here's the solution for working with webdoclet / 
strustsconfigxml:

- Check the plugin.jelly of xdoclet plugin (you'll see how the 
properties are processed, search for the subtask, for example 
"strutsconfigxml").
- Check the plugin.properties of xdoclet plugin (you'll see some 
properties already defined).
- Check the dependencies in your project. Mine are (among others):


		<dependency>
			<artifactId>xdoclet</artifactId>
			<groupId>xdoclet</groupId>
			<version>1.2b4</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<artifactId>xdoclet-ejb-module</artifactId>
			<groupId>xdoclet</groupId>
			<version>1.2b4</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<artifactId>xdoclet-apache-module</artifactId>
			<groupId>xdoclet</groupId>
			<version>1.2b4</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<artifactId>xdoclet-web-module</artifactId>
			<groupId>xdoclet</groupId>
			<version>1.2b4</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<artifactId>xdoclet-xdoclet-module</artifactId>
			<groupId>xdoclet</groupId>
			<version>1.2b4</version>
			<type>jar</type>
		</dependency>


-Mo.


Am 15.11.2003 um 20:59 Uhr schrieb Moritz Petersen:

> Hi Konstantin,
>
> you gave me very helpful pointers, thank you! But I still can't get it 
> work. I must have missed something very obvious.
>
> A look into plugin.jelly discovered:
>
> ...
>
> <j:set var="subelement_index" value="0"/>
> <j:forEach begin="0" end="20" indexVar="subelement_index">
> <j:set var="subelement_index_var_name" 
> value="maven.xdoclet.webdoclet.strutsconfigxml.${subelement_index}"/>
>   <j:if test="${context.getVariable(subelement_index_var_name) == 
> 'true'}">
>
> ...
>
> So, I added the property
>
> maven.xdoclet.webdoclet.strutsconfigxml.0=true
> maven.xdoclet.webdoclet.strutsconfigxml.0.Version=1.1
>
> but it still doesn't work. So I tried additionally:
>
> maven.xdoclet.webdoclet.fileset.4=true
> maven.xdoclet.webdoclet.fileset.4.include=**/*Action.java
>
> because I thought it would ignore my *Action classes, but it still 
> didn't made it work. Changing "0" to "4" in the strutsconfigxml 
> properties also didn't change anything.
> I am pretty sure, that my properties are not ignored in general, 
> because I define properties for other Xdoclet modules 
> (hibernatedoclet), which are not ignored.
>
> Do you have any clue about what I am missing?
>
> Grüße aus Hamburg,
>
> Moritz.
>
>
>
> Am 15.11.2003 um 17:55 Uhr schrieb Konstantin Priblouda:
>
>> I think you shall bite into sour apple, and look into
>
> I like apples, especially those running Panther ;-)
>
>> plugin.jelly
>> for exact syntax...
>> Basically properties are in form
>> maven.xdoclet.<module>.<subtask>.<ordinal
>> number>.<subtask property>
>>
>> And ordinal number starts from 0.
>> Also importtant is:
>> maven.xdoclet.<module>.<subtask>.<ordinal
>> number>.enabled=true
>>
>> to activate subtask.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: XDoclet, Struts and Maven: Where to start?

Posted by Konstantin Priblouda <kp...@yahoo.com>.
--- Moritz Petersen <mo...@gmx.co.uk> wrote:
> Hi Konstantin,
> 
> you gave me very helpful pointers, thank you! But I
> still can't get it 
> work. I must have missed something very obvious.
> 
> A look into plugin.jelly discovered:
> 
> ...
> 
> <j:set var="subelement_index" value="0"/>
> <j:forEach begin="0" end="20"
> indexVar="subelement_index">
> <j:set var="subelement_index_var_name" 
>
value="maven.xdoclet.webdoclet.strutsconfigxml.${subelement_index}"/>
>    <j:if
>
test="${context.getVariable(subelement_index_var_name)
> == 
> 'true'}">
> 
> ...
> 
> So, I added the property
> 
> maven.xdoclet.webdoclet.strutsconfigxml.0=true

maven.xdoclet.webdoclet.strutsconfigxml.0.enybled=true
>
maven.xdoclet.webdoclet.strutsconfigxml.0.Version=1.1
> 
> but it still doesn't work. So I tried additionally:
> 
> maven.xdoclet.webdoclet.fileset.4=true
> 
> 
> because I thought it would ignore my *Action
> classes, but it still 
> didn't made it work. Changing "0" to "4" in the
> strutsconfigxml 
> properties also didn't change anything.
> I am pretty sure, that my properties are not ignored
> in general, 
> because I define properties for other Xdoclet
> modules 
> (hibernatedoclet), which are not ignored.
> 
> Do you have any clue about what I am missing?

Well, did you activated maven debug? This produces a
lot of output, where you may find some clues. 

Here are my properties for externalizer & hibernate:
( I do not use struts at all , so can not help with
working example )
---%<----------
maven.xdoclet.xdoclet.destDir=${basedir}/target/xdoclet/xdoclet
maven.xdoclet.xdoclet.externalizer.0=true
maven.xdoclet.xdoclet.externalizer.0.destinationFile={0}{1}.properties

maven.xdoclet.xdoclet.propertiestranslator.0=true
maven.xdoclet.xdoclet.fileset.0=true
maven.xdoclet.xdoclet.fileset.0.include=**/*.java

---%<---------

regards,



=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: XDoclet, Struts and Maven: Where to start?

Posted by Moritz Petersen <mo...@gmx.co.uk>.
Hi Konstantin,

you gave me very helpful pointers, thank you! But I still can't get it 
work. I must have missed something very obvious.

A look into plugin.jelly discovered:

...

<j:set var="subelement_index" value="0"/>
<j:forEach begin="0" end="20" indexVar="subelement_index">
<j:set var="subelement_index_var_name" 
value="maven.xdoclet.webdoclet.strutsconfigxml.${subelement_index}"/>
   <j:if test="${context.getVariable(subelement_index_var_name) == 
'true'}">

...

So, I added the property

maven.xdoclet.webdoclet.strutsconfigxml.0=true
maven.xdoclet.webdoclet.strutsconfigxml.0.Version=1.1

but it still doesn't work. So I tried additionally:

maven.xdoclet.webdoclet.fileset.4=true
maven.xdoclet.webdoclet.fileset.4.include=**/*Action.java

because I thought it would ignore my *Action classes, but it still 
didn't made it work. Changing "0" to "4" in the strutsconfigxml 
properties also didn't change anything.
I am pretty sure, that my properties are not ignored in general, 
because I define properties for other Xdoclet modules 
(hibernatedoclet), which are not ignored.

Do you have any clue about what I am missing?

Grüße aus Hamburg,

Moritz.



Am 15.11.2003 um 17:55 Uhr schrieb Konstantin Priblouda:

> I think you shall bite into sour apple, and look into

I like apples, especially those running Panther ;-)

> plugin.jelly
> for exact syntax...
> Basically properties are in form
> maven.xdoclet.<module>.<subtask>.<ordinal
> number>.<subtask property>
>
> And ordinal number starts from 0.
> Also importtant is:
> maven.xdoclet.<module>.<subtask>.<ordinal
> number>.enabled=true
>
> to activate subtask.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: XDoclet, Struts and Maven: Where to start?

Posted by Konstantin Priblouda <kp...@yahoo.com>.
--- Moritz Petersen <ko...@moritzpetersen.de> wrote:
> I think, my last post was not precise enough. I
> don't have a problem 
> with the xdoclet-apache-module nor with the XDoclet
> tags.
> 
> I need to know the properties that I need to set for
> the *XDoclet Maven 
> Plugin* to make the maven-apache-module work
> correctly.

I think you shall bite into sour apple, and look into
plugin.jelly
for exact syntax...
Basically properties are in form
maven.xdoclet.<module>.<subtask>.<ordinal
number>.<subtask property>

And ordinal number starts from 0. 
Also importtant is:
maven.xdoclet.<module>.<subtask>.<ordinal
number>.enabled=true

to activate subtask.

gr��,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: XDoclet, Struts and Maven: Where to start?

Posted by Moritz Petersen <ko...@moritzpetersen.de>.
I think, my last post was not precise enough. I don't have a problem 
with the xdoclet-apache-module nor with the XDoclet tags.

I need to know the properties that I need to set for the *XDoclet Maven 
Plugin* to make the maven-apache-module work correctly.

Thank you in advance,

Moritz.



Am 15.11.2003 um 10:08 Uhr schrieb Moritz Petersen:

> Hi List,
>
> I need to work with the XDoclet Maven Plugin to generate 
> struts-config.xml. Does anyone else have experience with that? I took 
> a look at the XDoclet and XDoclet-Maven-Plugin, as well as in the 
> xdoclet-apache-module source code, but did not find real pointers how 
> to start. Is there a tutorial or HOW-TO out there?
>
> What I need to know is, how to configure the webdoclet-module to 
> generate the struts-config.xml file.
>
> Any help will be highly appreciated. Thank you,
>
> Moritz.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org