- This topic has 5 replies, 3 voices, and was last updated 19 years, 5 months ago by Scott Anderson.
-
AuthorPosts
-
SylobMemberHi,
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.
Scott AndersonParticipantActually 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.
SylobMemberI 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.
Riyad KallaMemberI 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.
SylobMemberHi,
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.
Scott AndersonParticipantHow 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
-
AuthorPosts