Intellij reloading page and components templates not working

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Intellij reloading page and components templates not working

Raul Raja Martinez
Hi,

We're a team of 5 devs using tapestry 5 and developing with Intellij.
When developing components and pages we have to keep restarting the server
to see changes because hot swapping is not working, not even
for method bodies.
I understand tapestry uses a different classloader for those.
Are there any tips or configuration that we have to consider when developing
with Intellij?

Thanks in advance

Raul.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Ben Gidley
Administrator
It works for me - you do need to compile or make for changes to be picked
up.

If you aren't on 9 you will need to add .tml files to list of resource files
the compiler copies.

Ben Gidley

www.gidley.co.uk
[hidden email]


On Sun, Feb 21, 2010 at 4:01 AM, Raul Raja Martinez <[hidden email]>wrote:

> Hi,
>
> We're a team of 5 devs using tapestry 5 and developing with Intellij.
> When developing components and pages we have to keep restarting the server
> to see changes because hot swapping is not working, not even
> for method bodies.
> I understand tapestry uses a different classloader for those.
> Are there any tips or configuration that we have to consider when
> developing
> with Intellij?
>
> Thanks in advance
>
> Raul.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Raul Raja Martinez
Hi Ben,

.tml changes work fine, is the java changes that never get reloaded even
after compiling. When running from maven from the console it works fine, but
when running from intellij from a running config it can only pick up regular
hot swapable changes that are in packages not watched by tapestry.
We have all our pages and components in src/main/resources, following the
maven standard layout.
What's interesting is that regular method body changes that are usually hot
swapable don't work either.

On Feb 21, 2010 12:15 AM, "Ben Gidley" <[hidden email]> wrote:

It works for me - you do need to compile or make for changes to be picked
up.

If you aren't on 9 you will need to add .tml files to list of resource files
the compiler copies.

Ben Gidley

www.gidley.co.uk
[hidden email]


On Sun, Feb 21, 2010 at 4:01 AM, Raul Raja Martinez <[hidden email]
>wrote:


> Hi,
>
> We're a team of 5 devs using tapestry 5 and developing with Intellij.
> When developing c...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Piero Sartini-3
> .tml changes work fine, is the java changes that never get reloaded even
> after compiling. When running from maven from the console it works fine, but
> when running from intellij from a running config it can only pick up regular
> hot swapable changes that are in packages not watched by tapestry.
> We have all our pages and components in src/main/resources, following the
> maven standard layout.
> What's interesting is that regular method body changes that are usually hot
> swapable don't work either.

Do you start your app with the maven goal jetty:run inside idea? Or do
you use the jetty plugin?
You need to make sure that your classes are compiled to the right
directory - you can set this in the module settings.
IDEA needs to be configured to compile to WEB-INF/classes of the
exploded war directory.

         Piero

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Raul Raja Martinez
I'm using tomcat 6.0.18 and using Idea standard run configuration for a war
exploded with tomcat.
I though the live reloading was app server agnostic.
The classes are compiled to projectname/target/classes
Idea by default even though it runs war exploded it does copy everything
inside the target.
I'm gonna try changing the output folder.
Does that mean that for live reloading to work compiled classes need to be
inside the sources at
mavenProject/src/main/webapp/WEB-INF/classes ?

2010/2/21 Piero Sartini <[hidden email]>

> > .tml changes work fine, is the java changes that never get reloaded even
> > after compiling. When running from maven from the console it works fine,
> but
> > when running from intellij from a running config it can only pick up
> regular
> > hot swapable changes that are in packages not watched by tapestry.
> > We have all our pages and components in src/main/resources, following the
> > maven standard layout.
> > What's interesting is that regular method body changes that are usually
> hot
> > swapable don't work either.
>
> Do you start your app with the maven goal jetty:run inside idea? Or do
> you use the jetty plugin?
> You need to make sure that your classes are compiled to the right
> directory - you can set this in the module settings.
> IDEA needs to be configured to compile to WEB-INF/classes of the
> exploded war directory.
>
>         Piero
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Raul Raja
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Stephan Windmüller
In reply to this post by Raul Raja Martinez
Raul Raja Martinez wrote:

> Are there any tips or configuration that we have to consider when developing
> with Intellij?

Which version of IntelliJ do you use? The current one (Idea 9) has a new
dialog for updating running applications:

http://blogs.jetbrains.com/idea/2009/10/update-a-running-javaee-application/

Regards
 Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Raul Raja Martinez
I'm using version 9.
I read somewhere in the list that to get the tapestry5 class reload feature
working in Tomcat I need to package the classes in a jar
instead of plain .class files.
I can't find a way to do this with Intellij 9, I remember being an option
before but not on v9.
I have that dialog checked to update both classes and resources but I always
get the warning after building that hot swap is not possible.
The strange thing is that if the class is not in the tapestry watched folder
it works for method bodies.
For tapestry watched folders hot swap seems to fail even when changing
simple local variables and any method bodies no matter what the change is.
I tried both in run and debug mode.
Is anybody able to run tapestry5 with class reloading in intellij9 with
tomcat?


2010/2/21 Stephan Windmüller <[hidden email]>

> Raul Raja Martinez wrote:
>
> > Are there any tips or configuration that we have to consider when
> developing
> > with Intellij?
>
> Which version of IntelliJ do you use? The current one (Idea 9) has a new
> dialog for updating running applications:
>
>
> http://blogs.jetbrains.com/idea/2009/10/update-a-running-javaee-application/
>
> Regards
>  Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Raul Raja
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Raul Raja Martinez
Ok, I got this solved doing the following...

Added the tomcat plugin to my webapp project's pom

<plugin>
 <groupId>org.codehaus.mojo</groupId>
 <artifactId>tomcat-maven-plugin</artifactId>
</plugin>

You can run the server from the console by...

mvn clean tomcat:run

Then on intellij9 which already includes full maven support you just create
a new launch configuration for maven
Then execute those goals in the run configuration.

The tomcat maven plugin is running your webapp exploded in place.

Now I can hit breakpoints and get full page and components java reloads
without restarting the app server from Intellij 9.

The maven tomcat plugin works pretty much the same way the jetty plugin
does.

Note that when you build on debug mode it still tries to hotswap and it will
give you a warning that it was not possible, but it actually works because
Tapestry reloads anyway and breakpoints that are flagged as unreachable with
the little cross will work too.

2010/2/21 Raul Raja Martinez <[hidden email]>

> I'm using version 9.
> I read somewhere in the list that to get the tapestry5 class reload feature
> working in Tomcat I need to package the classes in a jar
> instead of plain .class files.
> I can't find a way to do this with Intellij 9, I remember being an option
> before but not on v9.
> I have that dialog checked to update both classes and resources but I
> always get the warning after building that hot swap is not possible.
> The strange thing is that if the class is not in the tapestry watched
> folder it works for method bodies.
> For tapestry watched folders hot swap seems to fail even when changing
> simple local variables and any method bodies no matter what the change is.
> I tried both in run and debug mode.
> Is anybody able to run tapestry5 with class reloading in intellij9 with
> tomcat?
>
>
> 2010/2/21 Stephan Windmüller <[hidden email]>
>
> Raul Raja Martinez wrote:
>>
>> > Are there any tips or configuration that we have to consider when
>> developing
>> > with Intellij?
>>
>> Which version of IntelliJ do you use? The current one (Idea 9) has a new
>> dialog for updating running applications:
>>
>>
>> http://blogs.jetbrains.com/idea/2009/10/update-a-running-javaee-application/
>>
>> Regards
>>  Stephan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> Raul Raja
>



--
Raul Raja
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intellij reloading page and components templates not working

Ben Gidley
Administrator
We solve this a different way by just starting jetty with a main class.

See http://wiki.apache.org/tapestry/Tapestry5RunViaMain for an example. This
has the advantage of working the same in any IDE.

Ben Gidley

www.gidley.co.uk
[hidden email]


On Mon, Feb 22, 2010 at 12:39 AM, Raul Raja Martinez <[hidden email]>wrote:

> Ok, I got this solved doing the following...
>
> Added the tomcat plugin to my webapp project's pom
>
> <plugin>
>  <groupId>org.codehaus.mojo</groupId>
>  <artifactId>tomcat-maven-plugin</artifactId>
> </plugin>
>
> You can run the server from the console by...
>
> mvn clean tomcat:run
>
> Then on intellij9 which already includes full maven support you just create
> a new launch configuration for maven
> Then execute those goals in the run configuration.
>
> The tomcat maven plugin is running your webapp exploded in place.
>
> Now I can hit breakpoints and get full page and components java reloads
> without restarting the app server from Intellij 9.
>
> The maven tomcat plugin works pretty much the same way the jetty plugin
> does.
>
> Note that when you build on debug mode it still tries to hotswap and it
> will
> give you a warning that it was not possible, but it actually works because
> Tapestry reloads anyway and breakpoints that are flagged as unreachable
> with
> the little cross will work too.
>
> 2010/2/21 Raul Raja Martinez <[hidden email]>
>
> > I'm using version 9.
> > I read somewhere in the list that to get the tapestry5 class reload
> feature
> > working in Tomcat I need to package the classes in a jar
> > instead of plain .class files.
> > I can't find a way to do this with Intellij 9, I remember being an option
> > before but not on v9.
> > I have that dialog checked to update both classes and resources but I
> > always get the warning after building that hot swap is not possible.
> > The strange thing is that if the class is not in the tapestry watched
> > folder it works for method bodies.
> > For tapestry watched folders hot swap seems to fail even when changing
> > simple local variables and any method bodies no matter what the change
> is.
> > I tried both in run and debug mode.
> > Is anybody able to run tapestry5 with class reloading in intellij9 with
> > tomcat?
> >
> >
> > 2010/2/21 Stephan Windmüller <[hidden email]>
> >
> > Raul Raja Martinez wrote:
> >>
> >> > Are there any tips or configuration that we have to consider when
> >> developing
> >> > with Intellij?
> >>
> >> Which version of IntelliJ do you use? The current one (Idea 9) has a new
> >> dialog for updating running applications:
> >>
> >>
> >>
> http://blogs.jetbrains.com/idea/2009/10/update-a-running-javaee-application/
> >>
> >> Regards
> >>  Stephan
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> >
> > --
> > Raul Raja
> >
>
>
>
> --
> Raul Raja
>
Loading...