facebook

Test-Resources deployed to Tomcat

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #319602 Reply

    goosefraba
    Member

    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!

    #319617 Reply

    support-joy
    Member

    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.

    #319620 Reply

    goosefraba
    Member

    Ok thx.
    So this helps solving my problem? To what should I change the output folder?

    #319632 Reply

    support-joy
    Member

    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.

    #319638 Reply

    goosefraba
    Member

    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.

    #319667 Reply

    goosefraba
    Member

    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!

    #319669 Reply

    support-joy
    Member

    goosefraba,

    Good to hear you are all set.

    Best.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Test-Resources deployed to Tomcat

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in