I have a Maven Java EE project with several modules.
PROJECT
--EJB
--WEB1
--WEB2
--EAR
Now I want to create a profile which compile and include WEB1 and one profile which include both
To exclude/include the module from the build, I include the wanted sub-modules in the main pom.xml according to the selected profile. This works fine.
The problem is the dependencies in the EAR module.
How do I exclude either the module WEB1 or WEB2. Redefine the profiles part don't work.
The question is: Is there a way to control the dependencies in a module of a project, according to the selected profile
EDIT:
My fault, I have create the tags in the instead as direct in the root