- This topic has 4 replies, 2 voices, and was last updated 8 years, 10 months ago by jediwompa.
-
AuthorPosts
-
jediwompaParticipantI have been trying to figure out how to do this for a while now and have had no luck.
I have a fairly standard EAR project which comprises of an EJB project and a Web Project. Both the EJB and Web projects depend on a separate Commons project. I am able to get the EAR project to deploy successfully to a WebSphere 8.5 instance with minimal hiccups. All of this seems fairly standard and surprises me that it is so non-intuitive as to how to achieve the next part. The issue I am having is that my Commons project has many test classes and resources that are being deployed as well. My Commons project follows the Apache / Maven Standard Directory Layout for a project. Part of this standard is to use separation of concerns with regards to source folders like so:
o /src/main/java
o /src/main/resources
o /src/test/java
o /src/test/resourcesIn a maven world, which I am not currently in, I could easily filter the directories I want to include in my WAR/EJB deployments. With MyEclipse, accomplishing this is at the very least non-intuitive.
I believe I need to go to my Commons’ project’s property configuration –> MyEclipse –> Deployment Assembly and remove
/src/test/java
and/src/test/resources
. Then, I would think I would go to my EAR project –> properties –> MyEclipse –> Deployment Assembly or EAR section to configure something. If I go to MyEclipse –> EAR I see a section “Dependent Java Project Deployment Policy”, which sounds appropriate, but so far no combination of the settings available seem to prevent the test code and resources from joining in the deployment.I am using MyEclipse Blue Edition:
Version: 10.7.1 Blue
Build id: 10.7.1-Blue-20130201
support-swapnaModeratorjediwompa,
Versions earlier than MyEclipse 2014 are no longer fully supported. We try and assist licensed users working with earlier versions but no fixes will be made to those versions.
MyEclipse 10.x is quite an older release and there have been several enhancements to the WAS support and deployment related areas in the newer versions of MyEclipse.I recommend you move to our latest release, MyEclipse 2016 CI, based on Eclipse Mars.
You can download the MyEclipse 2016 CI from here : https://www.genuitec.com/products/myeclipse/download/
Install it to a different location alongside your existing MyEclipse 10.x installation. Your current license is valid for the latest release too as our licenses are time based.Here are the steps you can follow to stop the test classes and resources from deploying :
1. Right click on the Commons project > Properties > Java Build Path and switch to the Source tab. Enable the ‘Allow output folders for source folders’. For each of the test folders ( src/test/java and src/test/resources ) set the output folder to a different folder than the Default output folder. ex: Commons/test instead of the default output folder. Since you do not want the source folders to be deployed,the output folder for the test classes should be different than the src/main/* and not be inside WebContent/*. Apply the changes.
2. Go to Deployment Assembly page of the Commons project (Project > Properties > MyEclipse > Deployment Assembly) and remove the src/test/java and src/test/resources. Apply the changes and check how the deployment works.
3. If the issue persists, clean the Commons project, recheck the DA for the mapping and redeploy the EAR.
Let us know how it works for you.
–Swapna
MyEclipse Support
jediwompaParticipantSwapna,
Thanks so much for your assistance! This seems likes a reasonable solution for us at the moment. Also, I will investigate into whether or not we can get a newer version of MyEclipse installed. If I read in between the lines, I assume you are implying that in the latest version(s) of MyEclipse that we would not need to output the test source folders to a separate location than Commons/bin?
Thanks again
support-swapnaModeratorjediwompa,
The steps outlined in my previous response are for the latest version of MyEclipse. The Deployment Assembly page is introduced in the later versions of MyEclipse. As I mentioned earlier, MyEclipse 10.x is no longer fully supported. So please update to the newer release of MyEclipse.
Let us know if you see any issues.
–Swapna
MyEclipse Support
jediwompaParticipantSwapna,
OK thanks for the clarification. Just in case you were not aware, the steps above worked for MyEclipse 10.7.1 Blue Edition.
-
AuthorPosts