@Test public void testCreateMVCPortletDXP73() throws Exception { MavenTestUtil.makeMavenWorkspace(_extensionsDir, _workspaceDir, "dxp-7.3-ep5"); File modulesDir = new File(_workspaceDir, "modules"); String[] mavenArgs = { "create", "--base", _workspaceDir.getAbsolutePath(), "-d", modulesDir.getAbsolutePath(), "-P", "maven", "-t", "mvc-portlet", "foo", "--product", "dxp" }; File projectDir = new File(modulesDir, "foo"); String projectPath = projectDir.getAbsolutePath(); TestUtil.runBlade(_workspaceDir, _extensionsDir, mavenArgs); _checkMavenBuildFiles(projectPath); _contains(_checkFileExists(projectPath + "/pom.xml"), ".*<artifactId>release.portal.api</artifactId>.*"); TestUtil.updateMavenRepositories(projectPath); execute(projectPath, new String[] {"clean", "package"}); MavenTestUtil.verifyBuildOutput(projectPath, "foo-1.0.0.jar"); _verifyImportPackage(new File(projectPath, "target/foo-1.0.0.jar")); }
@Override public void execute() throws Exception { BladeCLI bladeCLI = getBladeCLI(); CreateArgs createArgs = getArgs(); File dir = createArgs.getDir(); if (dir == null) { dir = createArgs.getBase(); } WorkspaceProvider workspaceProvider = bladeCLI.getWorkspaceProvider(dir); if ((workspaceProvider == null) || (workspaceProvider instanceof MavenWorkspaceProvider)) { createArgs.setProduct("portal"); createArgs.setProfileName("maven"); super.execute(); } else { bladeCLI.error("Cannot create maven project here, incompatible workspace profile type."); } }
CreateCommandMaven extends CreateCommand { @Override public void execute() throws Exception { BladeCLI bladeCLI = getBladeCLI(); CreateArgs createArgs = getArgs(); File dir = createArgs.getDir(); if (dir == null) { dir = createArgs.getBase(); } WorkspaceProvider workspaceProvider = bladeCLI.getWorkspaceProvider(dir); if ((workspaceProvider == null) || (workspaceProvider instanceof MavenWorkspaceProvider)) { createArgs.setProduct("portal"); createArgs.setProfileName("maven"); super.execute(); } else { bladeCLI.error("Cannot create maven project here, incompatible workspace profile type."); } } }
CreateCommandMaven extends CreateCommand { @Override public void execute() throws Exception { BladeCLI bladeCLI = getBladeCLI(); CreateArgs createArgs = getArgs(); File dir = createArgs.getDir(); if (dir == null) { dir = createArgs.getBase(); } WorkspaceProvider workspaceProvider = bladeCLI.getWorkspaceProvider(dir); if ((workspaceProvider == null) || (workspaceProvider instanceof MavenWorkspaceProvider)) { createArgs.setProduct("portal"); createArgs.setProfileName("maven"); super.execute(); } else { bladeCLI.error("Cannot create maven project here, incompatible workspace profile type."); } } CreateCommandMaven();  CreateCommandMaven(BladeCLI bladeCLI); }
CreateCommandMaven extends CreateCommand { @Override public void execute() throws Exception { BladeCLI bladeCLI = getBladeCLI(); CreateArgs createArgs = getArgs(); File dir = createArgs.getDir(); if (dir == null) { dir = createArgs.getBase(); } WorkspaceProvider workspaceProvider = bladeCLI.getWorkspaceProvider(dir); if ((workspaceProvider == null) || (workspaceProvider instanceof MavenWorkspaceProvider)) { createArgs.setProduct("portal"); createArgs.setProfileName("maven"); super.execute(); } else { bladeCLI.error("Cannot create maven project here, incompatible workspace profile type."); } } CreateCommandMaven();  CreateCommandMaven(BladeCLI bladeCLI); @Override void execute(); }
CreateCommandMaven extends CreateCommand { @Override public void execute() throws Exception { BladeCLI bladeCLI = getBladeCLI(); CreateArgs createArgs = getArgs(); File dir = createArgs.getDir(); if (dir == null) { dir = createArgs.getBase(); } WorkspaceProvider workspaceProvider = bladeCLI.getWorkspaceProvider(dir); if ((workspaceProvider == null) || (workspaceProvider instanceof MavenWorkspaceProvider)) { createArgs.setProduct("portal"); createArgs.setProfileName("maven"); super.execute(); } else { bladeCLI.error("Cannot create maven project here, incompatible workspace profile type."); } } CreateCommandMaven();  CreateCommandMaven(BladeCLI bladeCLI); @Override void execute();  }