- This topic has 7 replies, 5 voices, and was last updated 16 years, 6 months ago by sixel.
-
AuthorPosts
-
james_a_woodsMemberHi
I was wondering if it would be possible to get greater control over what is included in a WAR deployment. I have two scenarios, one where I want to exclude stuff, and another where I want to include extra classes.
1/ Exclude test classes
I am currently structuring my projects with two source directories, one with my application code, and another with my JUnit tests code, configuration and properties. when I deploy to my test server, or build a WAR from the IDE it would be nice to be able to exclude all the test classes incase they cause any conflicts with the application, or cause the application to behave differently to when I do an ant build and deploy excluding the test classes.
2/ Include indirectly referenced projects
I am using spring as the base framework for my development. This means that I have projects that I have designated as only been accessed by spring, with no direct code references from the WAR project into this project. But, for the application to run, these classes must be included in the WAR deployment. As far as I can see, the only way to let MyEclipse know to include this project is to add it to the classpath, which I would ideally like to avoid.
Thanks
James
Scott AndersonParticipantJames,
Good ideas. We add flexibility to our deployment specification with just about evey release and will continue to do so. Thanks for providing these two usage scenarios.
geminoMemberi’m also looking forward to such a feature, in my case i want to exclude the version control folders (.svn) from deployment. they take about half the size of the project in addition to the total deployment size. and i don’t want to change from xdoclet dynamic build to build.xml file.
Scott AndersonParticipantGemino,
The deployer already ignores all resources that are properly marked as “team private members” within Eclipse. Are you using a source management plugin within Eclipse, or managing your source control externally. If you’re using an Eclipse plugin, the issue is that the provider is not properly calling IResource#setTeamPrivateMember on the folders and files they create that are specifically used only for source management purposes.
geminoMemberi am using tortoiseSVN for committing my changes, not an eclipse plugin. in the eclipse tree the .svn folders ton’t show up but when i deploy my project everything is packed together. especially the libraries take a lot of space, so at the moment i am manually deleting the .svn from the libraries directory in the war file. maybe i should try committing using eclipse…
Scott AndersonParticipantmaybe i should try committing using eclipse…
If there is a plugin for the source management system you use, it will likely be much easier and work better for you than doing everything externally.
ernestzMemberI am trying to do the same thing as the original poster…
I have a web application with one “src” directory for the actual web application source, and a separate “test” directory for junit test cases. I have not been able to determine if it now possible, using ME 6.0.1 to do this.
Is this still not possible?
sixelMemberI’m running into the very same issue, i.e. having two source directories (src and test) and wanting to have only on deployed (src).
One can exclude the test directory in Project Properties > Java Build Path > Source > Excluded, but then the tests are not runnable since they are not in the CLASSPATH anymore. Having to switch this anytime I want to either deploy or run tests is obviously not a solution…
One place that would be great to set such an exclusion filter would be in Preferences > MyEclipse > Java Entreprise Project > Web Project > Deployment, with the possibility to edit the preference on a per-project basis.
Hope this will get included in the next release (7.x if it’s already too late for 6.5)
-
AuthorPosts