| Author |
Message |
|
|
Post subject: Test-Resources deployed to Tomcat
Posted: Sep 12, 2011 - 09:48 AM
|
|
Registered Member

Joined: Jul 03, 2008
Posts: 12
|
|
Hello 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! |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 12, 2011 - 06:57 PM
|
|
Registered Member


Joined: Feb 03, 2009
Posts: 3442
|
|
goosefraba,
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. |
_________________ Joy
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 12, 2011 - 07:50 PM
|
|
Registered Member

Joined: Jul 03, 2008
Posts: 12
|
|
Ok thx.
So this helps solving my problem? To what should I change the output folder? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 13, 2011 - 10:43 AM
|
|
Registered Member


Joined: Feb 03, 2009
Posts: 3442
|
|
goosefraba,
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. |
_________________ Joy
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 13, 2011 - 11:39 AM
|
|
Registered Member

Joined: Jul 03, 2008
Posts: 12
|
|
Hey 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. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 14, 2011 - 07:20 AM
|
|
Registered Member

Joined: Jul 03, 2008
Posts: 12
|
|
Yeah 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! |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 14, 2011 - 09:08 AM
|
|
Registered Member


Joined: Feb 03, 2009
Posts: 3442
|
|
goosefraba,
Good to hear you are all set.
Best. |
_________________ Joy
MyEclipse Support
|
| |
|
|
|
 |
|
|