facebook

How to exclude source folder for deployment

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #232083 Reply

    Sylob
    Member

    Hi,
    In my projects, I have different source folder, some are for my test classes. When I deploy my jar, all source folders are deployed. I’d like the test source folders to not be deployed. Is it possble ?
    Thanks for help.

    #232087 Reply

    Scott Anderson
    Participant

    Actually they should never be deployed. Is your source folder under your webroot folder? Moving it outside the webroot will prevent your source from being deployed.

    #232094 Reply

    Sylob
    Member

    I don’t understand why “they should not be deployed”. From my view, they are similar source folder as the others. Perhaps I missed something to declare them as test source folder. But what is sure is that they are deployed when I used the MyEclipse tool to deploy on my server.

    #232115 Reply

    Riyad Kalla
    Member

    I am guessing that your source folder is uinder your WebRoot folder somewhere as Scott mentioned, it shouldn’t be. Your project structure should look something like this:http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#111

    Also Scott was mentioning that the source shouldn’t be deployed, the compiled binary is what should (and will) get deployed by the deployer along with the rest of the webapp.

    #232239 Reply

    Sylob
    Member

    Hi,
    thanks for the help; I realize that my messages weren’t clear enough. My project isn’t aimed to be deployed as a webapp, and so it doesn’t have WebRoot folder. I just want to deploy it as jar. And, you’re right the source folder are never deployed but the compiled binary.
    My problem is actually that I don’t want the compiled test classes to be deployed. How can I exclude those compiled classes from deployment ?
    I appreciate your help. Thanks.

    #232249 Reply

    Scott Anderson
    Participant

    How can I exclude those compiled classes from deployment ?

    Given your setup, you really can’t. The deployer doesn’t have a mechanism to allow you to include and exclude at the class level. The only way you could do it would be 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, as documented in the Advanced Section of the “Working with Web Projects” quickstart in our Documentation section here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: How to exclude source folder for deployment

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