At the moment there is not enough information if you want to jump start with OEPE (and of course using FastSwap) and Maven2 (using M2Eclipse plugin). This HOW-TO shows you how to achieve this. You need to have Eclipse (3.4 or 3.5), WLS (10.3 or 11) OEPE, Maven2 and M2Eclipse installed correctly before you can follow the steps below:
1. Create a web application with the webapp wizard (dynamic web project). Choose a webapp based on WLS (10.3 in my case). Please change following settings afterwards to be Maven complianced:
3. After you mavenized the project you can delete the directory build/classes since Maven uses target/classes directory. Everything should be customized to Maven directory structure automatically.
4. You can add
5. Now you should be able to run maven "package" within your M2Eclipse plugin correctly. And also you should be able to deploy the web app in WLS just by doing "run on server".
6. You can skip this step because you are using OEPE which turned on FastSwap automatically. To make it sure that FastSwap works correctly, you can turn on FastSwap in the weblogic.xml file (please click on the image to make it larger).
Be careful: I get following problem if I turn on FastSwap in my weblogic.xml:
8. You made it. Now you can change your classes without having to redeploy the application and at the same time you still have all the advantages of using Maven2 in your project. Have fun!
Cheers,
Lofi.
1. Create a web application with the webapp wizard (dynamic web project). Choose a webapp based on WLS (10.3 in my case). Please change following settings afterwards to be Maven complianced:
- Source for web: src/main/webapp
- Source for Java: src/main/java
3. After you mavenized the project you can delete the directory build/classes since Maven uses target/classes directory. Everything should be customized to Maven directory structure automatically.
4. You can add
- src/test/java - if you need it
- src/test/resources - and also
- src/main/resources
5. Now you should be able to run maven "package" within your M2Eclipse plugin correctly. And also you should be able to deploy the web app in WLS just by doing "run on server".
6. You can skip this step because you are using OEPE which turned on FastSwap automatically. To make it sure that FastSwap works correctly, you can turn on FastSwap in the weblogic.xml file (please click on the image to make it larger).
Be careful: I get following problem if I turn on FastSwap in my weblogic.xml:
- After turning on FastSwap in weblogic.xml file, the FastSwap mechanism does not work correctly! A change in a private field does not get updated in my webapp. If I turn this off again and redeploy my webapp, FastSwap is working correctly again. A change in a private field will be updated immediately. Do you get the same problem with your OEPE and WLS 10.3 here?
8. You made it. Now you can change your classes without having to redeploy the application and at the same time you still have all the advantages of using Maven2 in your project. Have fun!
Cheers,
Lofi.
Comments
Have you used Spring with OEPE and Fastswop enabled?
When I do this I get a error. I raised this on the newsgroup - http://forums.oracle.com/forums/thread.jspa?threadID=977085&tstart=0
I have raised an Oracle case and while the support engineer has re-created my problem, and has raised a bug