You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by shekher awasthi <sh...@gmail.com> on 2013/09/04 13:51:40 UTC

Setting up environment locally

Hi All,

I am trying to set up struts2 environment locally so that i can debug
source code.idea is to get insight how its working and how flow is going on
so that if possible i can contribute in future.

I tried to find information about setting it up but did not get any
information.
Can anyone help me to do that.

I have already taken struts2 source code checkout on my local machine


Thanks
-S

Re: Setting up environment locally

Posted by Dave Newton <da...@gmail.com>.
I'm not sure what the question is, exactly. Are you asking how to attach
source code to the libraries in Eclipse? Are you asking how to build Struts?
 On Sep 4, 2013 8:47 AM, "shekher awasthi" <sh...@gmail.com>
wrote:

> Hi Lukas,
>
> I have maven as well Eclipse in place, should i just build them and than i
> am ready to start (Confused :()
> Not sure how to proceed from there, like how i can use that code base to
> debug it. May be my question is silly but as of now i am not able to
> visualize that.
>
> Struts has so many modules and not sure how to start :(
>
> Thanks
> -S
>
>
> On Wed, Sep 4, 2013 at 5:52 PM, Lukasz Lenart <lukaszlenart@apache.org
> >wrote:
>
> > 2013/9/4 shekher awasthi <sh...@gmail.com>:
> > > Hi All,
> > >
> > > I am trying to set up struts2 environment locally so that i can debug
> > > source code.idea is to get insight how its working and how flow is
> going
> > on
> > > so that if possible i can contribute in future.
> > >
> > > I tried to find information about setting it up but did not get any
> > > information.
> > > Can anyone help me to do that.
> > >
> > > I have already taken struts2 source code checkout on my local machine
> >
> > So you need Apache Maven to build the packages and IDE which support
> > Maven based projects, ie. IntelliJ IDEA
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>

Re: Setting up environment locally

Posted by Rene Gielen <re...@gmail.com>.
Am 04.09.13 14:52, schrieb Christian Grobmeier:
> Am 04.09.13 14:47, schrieb shekher awasthi:
>> Hi Lukas,
>>
>> I have maven as well Eclipse in place, should i just build them and than i
>> am ready to start (Confused :()
> 
> With eclipse i think you should do:
> 
> mvn eclipse:eclipse

Although I'm also working with IDEA only nowadays, I'm pretty sure that
it is better to chose "Import existing Maven Project" in a current
Eclipse release rather than having mvn eclipse:eclipse generate an
eclipse setup.

> 
> to create eclipse related files. Please note, I have migrated away from
> Eclipse because IntelliJ is a lot better meanwhile. Just saying.
> 
>> Not sure how to proceed from there, like how i can use that code base to
>> debug it. May be my question is silly but as of now i am not able to
>> visualize that.
> It's not silly, only recently i mentioned this is being a huge problem
> in this project.
> 
> That said, maybe the easiest way is to set up an own little project (use
> mvn archetypes to generate it) and then open classpath settings in
> eclipse. Instead of using included jars, select the checked out project
> as dependency.
> 
> HTH!
> 
> Christian
> 
>>
>> Struts has so many modules and not sure how to start :(
>>
>> Thanks
>> -S
>>
>>
>> On Wed, Sep 4, 2013 at 5:52 PM, Lukasz Lenart <lu...@apache.org>wrote:
>>
>>> 2013/9/4 shekher awasthi <sh...@gmail.com>:
>>>> Hi All,
>>>>
>>>> I am trying to set up struts2 environment locally so that i can debug
>>>> source code.idea is to get insight how its working and how flow is going
>>> on
>>>> so that if possible i can contribute in future.
>>>>
>>>> I tried to find information about setting it up but did not get any
>>>> information.
>>>> Can anyone help me to do that.
>>>>
>>>> I have already taken struts2 source code checkout on my local machine
>>> So you need Apache Maven to build the packages and IDE which support
>>> Maven based projects, ie. IntelliJ IDEA
>>>
>>>
>>> Regards
>>> --
>>> Łukasz
>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 


-- 
René Gielen
http://twitter.com/rgielen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Setting up environment locally

Posted by Lukasz Lenart <lu...@apache.org>.
There are two ways:
- unittests
- real small webapp, i.e. struts2-blank from apps folder

With unittests it's obvious - put breakpoint in any place of source
code and start unittest in Debug mode. With webapp is a bit harder -
open it with IDE (I'm using IDEA as the best one), setup Runtime
configuration (next to Run button) as Maven and jettty:run. Open
linked sourcecode i.e. Dispatcher class and put breakpoint in some
method i.e. serviceAction(). Start browser, hit url and wait when
breakpoint will appear.

If you don't where to put breakpoint start with entry points - filters
- and then use step by step debugging to discover the source :-)

Maybe I should make a small screencast about that ;-)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Setting up environment locally

Posted by Christian Grobmeier <gr...@gmail.com>.
Am 04.09.13 15:00, schrieb shekher awasthi:
> Hi  Dave,
>
> May be i was not able to put my question in proper way.
> I want to get my self familiar with struts2 internals, so my question was
> how we can set up development environment.
>
> All who actually working on struts2 development must have configured there
> working environment where they test bugs as well fix them before pushing
> them to final distribution/release.
>
Yes, thats how I do it. In addition of course to JUnit tests, which come
a long with all plugs.
So if you "just" want to look into f.e. the JSON plugin, make sure you
don't miss the Junit tests which do not require a lot of more settings
> @Christian
> Thanks for the help, i was not able to see any such steps in the documents,
You are right - feel free to post your experiences. We could pick them
up as documentation
> will try with the steps you mentioned, regarding IntelliJ, i don not think
> it comes as free ;)
Thats right, but worth every penny. :-)

>
> Thanks
> -S
>
>
>
> On Wed, Sep 4, 2013 at 6:22 PM, Christian Grobmeier <gr...@gmail.com>wrote:
>
>> Am 04.09.13 14:47, schrieb shekher awasthi:
>>> Hi Lukas,
>>>
>>> I have maven as well Eclipse in place, should i just build them and than
>> i
>>> am ready to start (Confused :()
>> With eclipse i think you should do:
>>
>> mvn eclipse:eclipse
>>
>> to create eclipse related files. Please note, I have migrated away from
>> Eclipse because IntelliJ is a lot better meanwhile. Just saying.
>>
>>> Not sure how to proceed from there, like how i can use that code base to
>>> debug it. May be my question is silly but as of now i am not able to
>>> visualize that.
>> It's not silly, only recently i mentioned this is being a huge problem
>> in this project.
>>
>> That said, maybe the easiest way is to set up an own little project (use
>> mvn archetypes to generate it) and then open classpath settings in
>> eclipse. Instead of using included jars, select the checked out project
>> as dependency.
>>
>> HTH!
>>
>> Christian
>>
>>> Struts has so many modules and not sure how to start :(
>>>
>>> Thanks
>>> -S
>>>
>>>
>>> On Wed, Sep 4, 2013 at 5:52 PM, Lukasz Lenart <lukaszlenart@apache.org
>>> wrote:
>>>
>>>> 2013/9/4 shekher awasthi <sh...@gmail.com>:
>>>>> Hi All,
>>>>>
>>>>> I am trying to set up struts2 environment locally so that i can debug
>>>>> source code.idea is to get insight how its working and how flow is
>> going
>>>> on
>>>>> so that if possible i can contribute in future.
>>>>>
>>>>> I tried to find information about setting it up but did not get any
>>>>> information.
>>>>> Can anyone help me to do that.
>>>>>
>>>>> I have already taken struts2 source code checkout on my local machine
>>>> So you need Apache Maven to build the packages and IDE which support
>>>> Maven based projects, ie. IntelliJ IDEA
>>>>
>>>>
>>>> Regards
>>>> --
>>>> Łukasz
>>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Setting up environment locally

Posted by shekher awasthi <sh...@gmail.com>.
Hi  Dave,

May be i was not able to put my question in proper way.
I want to get my self familiar with struts2 internals, so my question was
how we can set up development environment.

All who actually working on struts2 development must have configured there
working environment where they test bugs as well fix them before pushing
them to final distribution/release.


@Christian
Thanks for the help, i was not able to see any such steps in the documents,
will try with the steps you mentioned, regarding IntelliJ, i don not think
it comes as free ;)

Thanks
-S



On Wed, Sep 4, 2013 at 6:22 PM, Christian Grobmeier <gr...@gmail.com>wrote:

> Am 04.09.13 14:47, schrieb shekher awasthi:
> > Hi Lukas,
> >
> > I have maven as well Eclipse in place, should i just build them and than
> i
> > am ready to start (Confused :()
>
> With eclipse i think you should do:
>
> mvn eclipse:eclipse
>
> to create eclipse related files. Please note, I have migrated away from
> Eclipse because IntelliJ is a lot better meanwhile. Just saying.
>
> > Not sure how to proceed from there, like how i can use that code base to
> > debug it. May be my question is silly but as of now i am not able to
> > visualize that.
> It's not silly, only recently i mentioned this is being a huge problem
> in this project.
>
> That said, maybe the easiest way is to set up an own little project (use
> mvn archetypes to generate it) and then open classpath settings in
> eclipse. Instead of using included jars, select the checked out project
> as dependency.
>
> HTH!
>
> Christian
>
> >
> > Struts has so many modules and not sure how to start :(
> >
> > Thanks
> > -S
> >
> >
> > On Wed, Sep 4, 2013 at 5:52 PM, Lukasz Lenart <lukaszlenart@apache.org
> >wrote:
> >
> >> 2013/9/4 shekher awasthi <sh...@gmail.com>:
> >>> Hi All,
> >>>
> >>> I am trying to set up struts2 environment locally so that i can debug
> >>> source code.idea is to get insight how its working and how flow is
> going
> >> on
> >>> so that if possible i can contribute in future.
> >>>
> >>> I tried to find information about setting it up but did not get any
> >>> information.
> >>> Can anyone help me to do that.
> >>>
> >>> I have already taken struts2 source code checkout on my local machine
> >> So you need Apache Maven to build the packages and IDE which support
> >> Maven based projects, ie. IntelliJ IDEA
> >>
> >>
> >> Regards
> >> --
> >> Łukasz
> >> + 48 606 323 122 http://www.lenart.org.pl/
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: Setting up environment locally

Posted by Christian Grobmeier <gr...@gmail.com>.
Am 04.09.13 14:47, schrieb shekher awasthi:
> Hi Lukas,
>
> I have maven as well Eclipse in place, should i just build them and than i
> am ready to start (Confused :()

With eclipse i think you should do:

mvn eclipse:eclipse

to create eclipse related files. Please note, I have migrated away from
Eclipse because IntelliJ is a lot better meanwhile. Just saying.

> Not sure how to proceed from there, like how i can use that code base to
> debug it. May be my question is silly but as of now i am not able to
> visualize that.
It's not silly, only recently i mentioned this is being a huge problem
in this project.

That said, maybe the easiest way is to set up an own little project (use
mvn archetypes to generate it) and then open classpath settings in
eclipse. Instead of using included jars, select the checked out project
as dependency.

HTH!

Christian

>
> Struts has so many modules and not sure how to start :(
>
> Thanks
> -S
>
>
> On Wed, Sep 4, 2013 at 5:52 PM, Lukasz Lenart <lu...@apache.org>wrote:
>
>> 2013/9/4 shekher awasthi <sh...@gmail.com>:
>>> Hi All,
>>>
>>> I am trying to set up struts2 environment locally so that i can debug
>>> source code.idea is to get insight how its working and how flow is going
>> on
>>> so that if possible i can contribute in future.
>>>
>>> I tried to find information about setting it up but did not get any
>>> information.
>>> Can anyone help me to do that.
>>>
>>> I have already taken struts2 source code checkout on my local machine
>> So you need Apache Maven to build the packages and IDE which support
>> Maven based projects, ie. IntelliJ IDEA
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Setting up environment locally

Posted by shekher awasthi <sh...@gmail.com>.
Hi Lukas,

I have maven as well Eclipse in place, should i just build them and than i
am ready to start (Confused :()
Not sure how to proceed from there, like how i can use that code base to
debug it. May be my question is silly but as of now i am not able to
visualize that.

Struts has so many modules and not sure how to start :(

Thanks
-S


On Wed, Sep 4, 2013 at 5:52 PM, Lukasz Lenart <lu...@apache.org>wrote:

> 2013/9/4 shekher awasthi <sh...@gmail.com>:
> > Hi All,
> >
> > I am trying to set up struts2 environment locally so that i can debug
> > source code.idea is to get insight how its working and how flow is going
> on
> > so that if possible i can contribute in future.
> >
> > I tried to find information about setting it up but did not get any
> > information.
> > Can anyone help me to do that.
> >
> > I have already taken struts2 source code checkout on my local machine
>
> So you need Apache Maven to build the packages and IDE which support
> Maven based projects, ie. IntelliJ IDEA
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: Setting up environment locally

Posted by Lukasz Lenart <lu...@apache.org>.
2013/9/4 shekher awasthi <sh...@gmail.com>:
> Hi All,
>
> I am trying to set up struts2 environment locally so that i can debug
> source code.idea is to get insight how its working and how flow is going on
> so that if possible i can contribute in future.
>
> I tried to find information about setting it up but did not get any
> information.
> Can anyone help me to do that.
>
> I have already taken struts2 source code checkout on my local machine

So you need Apache Maven to build the packages and IDE which support
Maven based projects, ie. IntelliJ IDEA


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org