You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Heritier Arnaud <ah...@axway.com> on 2004/06/24 15:00:28 UTC
RE : Struts, XDoclet, and Maven...
Did you try :
maven -Dtemplate=struts-jstl genapp
Arnaud
> -----Message d'origine-----
> De : Andy Akins [mailto:andy@leonidae.org]
> Envoyé : jeudi 24 juin 2004 14:51
> À : Struts Users Mailing List
> Objet : Struts, XDoclet, and Maven...
>
>
> I am trying to learn these technologies (and Hibernate too, for that
> matter) - and I'm having the typical problem of knowing where
> to start.
> I've been programming Struts for over a year, so I'm decent with it -
> but I'm fairly new to Maven but have coded two simple struts
> apps with
> it - and XDoclet is brand new to me. I'm looking to combine
> all of the
> above (and eventually Hibernate - but that's for a later day).
>
> Does anyone out there have, or know of (or can create) a super-simple
> example app (maybe the archtypical Struts hello app: two jsp's, one
> action, one form) that shows how to set up your maven project
> directory
> (like where do you put your XDoclet merge files) and sample
> values for
> your project.xml, project.properties, and maven.xml files?
>
> It would be a big help to jump start the learning process. Nothing
> fancy - just a push in the right direction. I have "XDoclet
> in Action"
> to learn the XDoclet stuff - but I'd like to use Maven
> instead of just
> Ant.
>
> Thanks for any help/insight...
>
> Andy Akins
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RE : Struts, XDoclet, and Maven...
Posted by Mark Lowe <ma...@boxstuff.com>.
I had a go with struts xdoclet tags, the advantages aren't that great
but it does help keeping the mapping information in the same file.
Given there are no real cross container issues relating to the
struts-config file then its not as useful as webdoclet tags. The other
problem is that i think you can only have one mapping per class and you
end up having to merge the rest. But the principle of having the
mapping stuff in the class does make sense to me.
hibernate is something else altogether, hibernatedoclet is a great
help. Having you relationships defined in the class saves darting
around several files, and also generating the xml means that it
undergoes preliminary validation.
Maven. I just haven't had the silly amount of time required to get
anything going with this.
Mark
On 27 Jun 2004, at 23:13, Rick Reumann wrote:
> Andy Akins wrote:
>
>>>> but I'm fairly new to Maven but have coded two simple struts
>>>> apps with
>>>> it - and XDoclet is brand new to me. I'm looking to combine
>>>> all of the
>>>> above (and eventually Hibernate - but that's for a later day).
>
> I don't see what advantage using XDoclet with Struts is? If someone
> can show me how it helps I'd love to see it. On this one project I
> inherited, it uses XDoclet with Struts and it makes things worse. For
> example, I like having a nice config file that I can modify
> (strut-config), yet with XDoclet, the struts config action mappings
> are generated by action mapping definitions defined at the top of the
> actual Action opbjects. That makes no sense to me. Now in order to
> change a return value, you have to modify source code versus just
> modifying a config file. I can see the benefit for XDoclet in other
> projects (ie EJB code generation) but for Struts I still haven't found
> where it helps, but I'm willing to be enlightened:)
>
> --
> Rick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RE : Struts, XDoclet, and Maven...
Posted by Bryan Hunt <ad...@revoltingdigits.com>.
I second that !!!!!
--b
Navjot Singh wrote:
> i agree with rick here.
>
> I also tried using struts-config.xml using xdoclet. In the end it
> turns out to be a futile exercise. Moreover, using modules makes
> working with xdoclet more cumbersome. It's EASY to write the config
> yourself.
>
> Some may say that it will be useful to generate the Struts form class
> and it's tags in struts-config.xml FROM the entity bean you just
> created. But ,tell me frankly, how many times we have forms that
> correspond one-to-one with our entity schema.
>
> Use xdoclet only where it makes sense to use.
>
> my 2 cents
> navjot singh
>
>
> Rick Reumann wrote:
>
>> Andy Akins wrote:
>>
>>>>> but I'm fairly new to Maven but have coded two simple struts
>>>>> apps with
>>>>> it - and XDoclet is brand new to me. I'm looking to combine
>>>>> all of the
>>>>> above (and eventually Hibernate - but that's for a later day).
>>>>
>>
>>
>> I don't see what advantage using XDoclet with Struts is? If someone
>> can show me how it helps I'd love to see it. On this one project I
>> inherited, it uses XDoclet with Struts and it makes things worse. For
>> example, I like having a nice config file that I can modify
>> (strut-config), yet with XDoclet, the struts config action mappings
>> are generated by action mapping definitions defined at the top of the
>> actual Action opbjects. That makes no sense to me. Now in order to
>> change a return value, you have to modify source code versus just
>> modifying a config file. I can see the benefit for XDoclet in other
>> projects (ie EJB code generation) but for Struts I still haven't
>> found where it helps, but I'm willing to be enlightened:)
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RE : Struts, XDoclet, and Maven...
Posted by Navjot Singh <na...@net4india.net>.
i agree with rick here.
I also tried using struts-config.xml using xdoclet. In the end it turns
out to be a futile exercise. Moreover, using modules makes working with
xdoclet more cumbersome. It's EASY to write the config yourself.
Some may say that it will be useful to generate the Struts form class
and it's tags in struts-config.xml FROM the entity bean you just
created. But ,tell me frankly, how many times we have forms that
correspond one-to-one with our entity schema.
Use xdoclet only where it makes sense to use.
my 2 cents
navjot singh
Rick Reumann wrote:
> Andy Akins wrote:
>
>>>> but I'm fairly new to Maven but have coded two simple struts
>>>> apps with
>>>> it - and XDoclet is brand new to me. I'm looking to combine
>>>> all of the
>>>> above (and eventually Hibernate - but that's for a later day).
>
>
> I don't see what advantage using XDoclet with Struts is? If someone can
> show me how it helps I'd love to see it. On this one project I
> inherited, it uses XDoclet with Struts and it makes things worse. For
> example, I like having a nice config file that I can modify
> (strut-config), yet with XDoclet, the struts config action mappings are
> generated by action mapping definitions defined at the top of the actual
> Action opbjects. That makes no sense to me. Now in order to change a
> return value, you have to modify source code versus just modifying a
> config file. I can see the benefit for XDoclet in other projects (ie EJB
> code generation) but for Struts I still haven't found where it helps,
> but I'm willing to be enlightened:)
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: RE : Struts, XDoclet, and Maven...
Posted by Matthew Ryan <ma...@matthewryan.info>.
I wouldn't argue against the points Rick is making, particularly the benefit
of central place for configuration information as opposed to marking it out
all over the shop. I will throw one thing out there though. When you have
lots of Action Mappings and subsequent Action classes that are in a state of
change and development being able to add/delete/change targets in the
execute method and guarantee the consistency with the struts-config.xml at
the top of the same file can have some use.
Matt
-----Original Message-----
From: Rick Reumann [mailto:struttin@reumann.net]
Sent: Monday, June 28, 2004 10:26 PM
To: Struts Users Mailing List
Subject: Re: RE : Struts, XDoclet, and Maven...
Marco Mistroni wrote:
> I m doing it coz I m lazy and I prefer that someone else
> Generates configuration files for me..
But what aspect of configuration is it saving you time with? You still
have to code all the parameters for your action mapping in the Action
class, so what's the difference time-wise if you code them there or in
the struts-config? What's sort of ironic is when Struts came out one of
the benefits was touted about how you had a central place to do your
configuration and you weren't having to harcode fowards in your
controllers. XDoclet with Struts sets you back to the old way of doing
things, imo. (Once again, no knock on XDoclet, it's a great tool, I just
find its worth with Struts limited at best).
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RE : Struts, XDoclet, and Maven...
Posted by Rick Reumann <st...@reumann.net>.
Marco Mistroni wrote:
> I m doing it coz I m lazy and I prefer that someone else
> Generates configuration files for me..
But what aspect of configuration is it saving you time with? You still
have to code all the parameters for your action mapping in the Action
class, so what's the difference time-wise if you code them there or in
the struts-config? What's sort of ironic is when Struts came out one of
the benefits was touted about how you had a central place to do your
configuration and you weren't having to harcode fowards in your
controllers. XDoclet with Struts sets you back to the old way of doing
things, imo. (Once again, no knock on XDoclet, it's a great tool, I just
find its worth with Struts limited at best).
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: RE : Struts, XDoclet, and Maven...
Posted by Marco Mistroni <mm...@waersystems.com>.
Hello,
Well, I agree with u, but it depends on how u generate
The struts-config and other config files..
U can still write ur own action-mapping file and make xdoclet
Merge it (I m doing it for action-forms for example)...
I m doing it coz I m lazy and I prefer that someone else
Generates configuration files for me..
If u (like me) hate changing code for changing a simple
Parameter, as I said u may want to look at merge facilities
Of XDoclet.
My 2 cents
Regards
marco
-----Original Message-----
From: Rick Reumann [mailto:struttin@reumann.net]
Sent: 27 June 2004 22:13
To: Struts Users Mailing List
Subject: Re: RE : Struts, XDoclet, and Maven...
Andy Akins wrote:
>>> but I'm fairly new to Maven but have coded two simple struts
>>> apps with
>>> it - and XDoclet is brand new to me. I'm looking to combine
>>> all of the
>>> above (and eventually Hibernate - but that's for a later day).
I don't see what advantage using XDoclet with Struts is? If someone can
show me how it helps I'd love to see it. On this one project I
inherited, it uses XDoclet with Struts and it makes things worse. For
example, I like having a nice config file that I can modify
(strut-config), yet with XDoclet, the struts config action mappings are
generated by action mapping definitions defined at the top of the actual
Action opbjects. That makes no sense to me. Now in order to change a
return value, you have to modify source code versus just modifying a
config file. I can see the benefit for XDoclet in other projects (ie EJB
code generation) but for Struts I still haven't found where it helps,
but I'm willing to be enlightened:)
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RE : Struts, XDoclet, and Maven...
Posted by Rick Reumann <st...@reumann.net>.
Andy Akins wrote:
>>> but I'm fairly new to Maven but have coded two simple struts
>>> apps with
>>> it - and XDoclet is brand new to me. I'm looking to combine
>>> all of the
>>> above (and eventually Hibernate - but that's for a later day).
I don't see what advantage using XDoclet with Struts is? If someone can
show me how it helps I'd love to see it. On this one project I
inherited, it uses XDoclet with Struts and it makes things worse. For
example, I like having a nice config file that I can modify
(strut-config), yet with XDoclet, the struts config action mappings are
generated by action mapping definitions defined at the top of the actual
Action opbjects. That makes no sense to me. Now in order to change a
return value, you have to modify source code versus just modifying a
config file. I can see the benefit for XDoclet in other projects (ie EJB
code generation) but for Struts I still haven't found where it helps,
but I'm willing to be enlightened:)
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: RE : Struts, XDoclet, and Maven...
Posted by Andy Akins <an...@leonidae.org>.
Thank you! This was exactly what I was looking for.
Sadly, being new to Maven, I was unaware of the genapp plugin. Very
useful!
Again, thanks!
Andy
On Jun 24, 2004, at 8:00 AM, Heritier Arnaud wrote:
> Did you try :
>
> maven -Dtemplate=struts-jstl genapp
>
> Arnaud
>
>> -----Message d'origine-----
>> De : Andy Akins [mailto:andy@leonidae.org]
>> Envoyé : jeudi 24 juin 2004 14:51
>> À : Struts Users Mailing List
>> Objet : Struts, XDoclet, and Maven...
>>
>>
>> I am trying to learn these technologies (and Hibernate too, for that
>> matter) - and I'm having the typical problem of knowing where
>> to start.
>> I've been programming Struts for over a year, so I'm decent with it -
>> but I'm fairly new to Maven but have coded two simple struts
>> apps with
>> it - and XDoclet is brand new to me. I'm looking to combine
>> all of the
>> above (and eventually Hibernate - but that's for a later day).
>>
>> Does anyone out there have, or know of (or can create) a super-simple
>> example app (maybe the archtypical Struts hello app: two jsp's, one
>> action, one form) that shows how to set up your maven project
>> directory
>> (like where do you put your XDoclet merge files) and sample
>> values for
>> your project.xml, project.properties, and maven.xml files?
>>
>> It would be a big help to jump start the learning process. Nothing
>> fancy - just a push in the right direction. I have "XDoclet
>> in Action"
>> to learn the XDoclet stuff - but I'd like to use Maven
>> instead of just
>> Ant.
>>
>> Thanks for any help/insight...
>>
>> Andy Akins
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org