-
1. Re: Switching seam debug mode
maxandersen Jan 29, 2010 11:29 AM (in response to piotr.sobczyk)1 of 1 people found this helpfulYou write "In JBoss Tools project there is no problem" I assume you mean in a seam-gen project there is no problem ?
So what is the problem you are seeing in JBoss Tools ? You have noticed that both /hot and /main ends up in /classes too, making /dev simply a redundant one which you doesn't get used when deployed ?
i.e. it works at runtime, but only issue is that /dev is also there but dead.
If what you want is simply to disable the hot dir then in JBoss Tools 3.1.x you can use the module assembly page to remove the /dev copying or if you are in 3.0.x or sooner you can edit the .settings/*wtp*components*.xml file manually and remove the /dev reference.
-
2. Re: Switching seam debug mode
piotr.sobczyk Jan 29, 2010 2:27 PM (in response to maxandersen)You write "In JBoss Tools project there is no problem" I assume you mean in a seam-gen project there is no problem ?
Yeah, obviously I meant "seam-gen project". Sorry for mistake.
So what is the problem you are seeing in JBoss Tools ? You have noticed that both /hot and /main ends up in /classes too, making /dev simply a redundant one which you doesn't get used when deployed ?
No, no. I guess I wasn't too clear. The problem is that while Seam is in debug="false" mode hot deployment is disabled and classes inside WEB-INF/dev are not visible inside Seam application (ClassNotFound exceptions occur). However classes from main are still deployed by JBoss Tools to WEB-INF/classes and classes from hot are still deployed to WEB-INF/dev when debug is set to false. To adress this problem I could move all classes from hot to main before deployment so that all classes will end up in WEB-INF/classes (instead WEB-INF/dev). But moving files in project back and forth between hot and main source directories when every time I want to switch debug mode is quite problematic to say the least.
Is there any way to tell JBoss Tools: "Now I'm using debug mode so you should deploy classes from hot source directory to WEB-INF/classes instead of WEB-INF/dev"?
-
3. Re: Switching seam debug mode
piotr.sobczyk Jan 29, 2010 5:35 PM (in response to piotr.sobczyk)Allright in order to turn off debug mode in JBoss Tools project you have to:
1. set debug="false" in components.xml
2. go to build path settings from project and change output folder for /src/hot to {project.name}/build/classes
In effect in WEB-INF on server there will be both classes and dev directory but dev directory will be out of classpath (not visible for Seam) like Max said. I tried to do what Max suggested: I removed the /src/hot -> /WEB-INF/dev mapping from Module Assembly but it didn't change anything.
In order to turn it on you have to do the opposite (debug="true",set /src/hot output folder {project.name}/WebContents/WEB-INF/dev).
I've lost a lot of time experimenting because I was confused by different treating of main and hot source directories - main is build to build directory and then moved to WEB-INF/main while hot is build right to WEB-INF/dev inside project and moved with whole WEB-INF to WEB-INF on server. Is that different treating of src/hot needed for hot deployment?
Would it have sense to add some high level functionality to JBoss Tools that switches between debug modes (eg. radio button: debug/production). I guess I'm not only man who deploys Seam applications through JBoss Tools not by home made Ant script imitating Seam-gen's one. I wouldn't suspect that deploing to production would be such problem.
-
4. Re: Switching seam debug mode
akazakov Jan 29, 2010 5:29 PM (in response to piotr.sobczyk)Yes, there is a way to do it. See http://screencast.com/t/ZWRkMWZlM2
-
5. Re: Switching seam debug mode
dgolovin Jan 29, 2010 6:42 PM (in response to akazakov)That's a workaround for this problem.
Seem model should recognize such configuration and alter project Java Build Path Properties. "Should" doesn't mean it can WDYT, is that possible to track such changes and reconfigure Dynamic web project Java Build Path Properties on the fly? -
6. Re: Switching seam debug mode
caru Jan 29, 2010 11:30 PM (in response to dgolovin)This is happening to me as well, only with war projects. The workaround works, thank you so much guys!
I hope this will be fixed soon.
-
7. Re: Switching seam debug mode
akazakov Feb 1, 2010 4:04 AM (in response to caru)I've created an issue in JIRA. See https://jira.jboss.org/jira/browse/JBIDE-5769 -
8. Re: Switching seam debug mode
maxandersen Feb 1, 2010 4:36 AM (in response to piotr.sobczyk)I've lost a lot of time experimenting because I was confused by different treating of main and hot source directories - main is build to build directory and then moved to WEB-INF/main while hot is build right to WEB-INF/dev inside project and moved with whole WEB-INF to WEB-INF on server. Is that different treating of src/hot needed for hot deployment?
src/main should *never* end up in WEB-INF/main - how do you get that ?
Any chance you are putting Maven in the mix here and the mappings between Maven and WTP is not done correctly somehow ?
/max
-
9. Re: Switching seam debug mode
piotr.sobczyk Feb 1, 2010 5:58 AM (in response to maxandersen)Really sorry for bringing confusion again, Max. I guess I meant WEB-INF/classes instead of WEB-INF/main. I was tired when I was writing this post .