private boolean addDeploymentTypeBasedDependencies ( ProjectModel projectModel , Pom modulePom ) { if ( projectModel . getProjectType ( ) == null ) return true ; switch ( projectModel . getProjectType ( ) ) { case "ear" : break ; case "war" : modulePom . getDependencies ( ) . add ( new SimpleDependency ( Dependency . Role . API , ApiDependenciesData . DEP_API_SERVLET_31 ) ) ; break ; case "ejb" : modulePom . getDependencies ( ) . add ( new SimpleDependency ( Dependency . Role . API , ApiDependenciesData . DEP_API_EJB_32 ) ) ; modulePom . getDependencies ( ) . add ( new SimpleDependency ( Dependency . Role . API , ApiDependenciesData . DEP_API_CDI ) ) ; modulePom . getDependencies ( ) . add ( new SimpleDependency ( Dependency . Role . API , ApiDependenciesData . DEP_API_JAVAX_ANN ) ) ; break ; case "ejb-client" : modulePom . getDependencies ( ) . add ( new SimpleDependency ( Dependency . Role . API , ApiDependenciesData . DEP_API_EJB_CLIENT ) ) ; break ; } return false ; }
Adds the dependencies typical for particular deployment types . This is not accurate and doesn t cover the real needs of the project . Basically it s just to have something for the initial implementation .