- This topic has 6 replies, 2 voices, and was last updated 13 years, 2 months ago by support-joy.
-
AuthorPosts
-
goosefrabaMemberHello dear MyEclipse-team,
I use the Maven4MyEclipse Plugin just for some weeks now and discovered a problem (read on this forum some times already about).
I have 2 mavenized projects, one compiled to a JAR, the other one is a web-project compiled to a WAR.
When I deploy the web-project to my Tomcat within MyEclipse, the test classes and test-resources are put the the WEB-INF/classes folder of the webapps/my-web-project/ folder.So the test classes and resources are copied to the tomcat deployment, which is bad because it corrupts my application configurations etc.
I read a lot about this topic regarding eclipse and m2eclipse but found no solution for MyEclipse.
I kindly ask for support on this topic!
support-joyMembergoosefraba,
You can change the default output folder here. Right click on your project > Build Path > Configure Build Path, select the source tab and change the default output folder location.
goosefrabaMemberOk thx.
So this helps solving my problem? To what should I change the output folder?
support-joyMembergoosefraba,
My bad. Above message is to change the default output directory. If you would like to exclude the test resources and test classes, you need to break your test classes out into their own Java project and make your deployable project depend on it. That will give you the ability to still use the test classes, but the deployer can then be set to ignore depenedent Java projects for deployment, refer – http://www.myeclipseide.com/documentation/quickstarts/webprojects/#dependent_projects – Configuring the Deployment Policy of Dependent Java Projects
Set your preferences here > from MyEclipse IDE menu options click on – Window > Preferences > MyEclipse > Java Enterprise Project > Web Project. Choose the Deployment tab and set Dependenent Java Project Deployment Policy and Library Deployment Policies.
goosefrabaMemberHey thanks. That sounds like a solution!
I Will try this today evening at home and will come back to you with my experience with this solution.
goosefrabaMemberYeah thanks that solved my problem (of course).
Having a seperate project including all test cases makes sense and of course the test resources are not deployed!Thanks for the hint!
support-joyMembergoosefraba,
Good to hear you are all set.
Best.
-
AuthorPosts