/** * Initialize the mavenSession bean. * * @throws IOException * when the descriptor file parent can't be resolved */ private void initializeMavenSession() throws IOException { // Even though the rootProject contains the rootContext we set both in // the even that there is no rootProject and the user is requesting goals // to be attained that do not directly relate to a project. A goaly that // may, say, generate the skeletal maven application build. mavenSession = new MavenSession(); mavenSession.setRootContext( getRootContext() ); // note: setRootDescriptor file is a static method MavenSession.setRootDescriptorFile( getDescriptorFile() ); }