I'm confused as to why this is happening in my m2e projects vs standard Eclipse projects.
When I configure my WAR/EAR projects as normal eclipse (non-maven) projects and deploy to WebSphere, I see that the WebSphere connector adds a classpath entry pointing to my JSP folder:
c:\dev\WarProject\webApplication
However, when I convert to a properly structured maven/m2e project the classpath entry changes to:
c:\dev\WarProject\\.plugins\org.eclipse.wst.server.core\tmp0\WarProject
So this means that for WAS to see any modifications made to my JSPs they must first be recopied into the tmp0\... folder. But during the standard m2e/maven save process, the files are only copied into the target/folder and not the deployed ..../tmp0 folder.
Which leads to the problem of WAS not seeing the updated JSPs. My options are:
- If I enable the "automatic deployment" in the WAS options it tries to redeploy my entire EAR which is very slow
- If I don't enable the "automatic deployment", the files are not copied to the tmp0\ folder so WAS doesn't see the changes to the JSP
So I've hacked something into my pom.xml to use the maven-resources-plugin to automatically copy my jsp into the tmp0 folder (on validate phase so everytime the jsp is saved it is copied over), but that is brutally ugly, and requires hardcoding a path in my pom to point to a path generated by the WAS plugin.
1) Is there a way to force the WAS deployer to point to my WarProject/main/webapp/src folder instead of the tmp0 folder?
2) Is there another/better way to configure this?
Thanks,
Eric