use of com.liferay.ide.project.core.modules.BladeCLIException in project liferay-ide by liferay.
the class InitConfigureProjectPage method _createLiferayWorkspace.
private void _createLiferayWorkspace(IPath targetSDKLocation, IProgressMonitor monitor) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, 100);
try {
progress.beginTask("Initializing Liferay Workspace...", 100);
StringBuilder sb = new StringBuilder();
sb.append("--base ");
sb.append("\"" + targetSDKLocation.toFile().getAbsolutePath() + "\" ");
sb.append("init -u");
progress.worked(30);
BladeCLI.execute(sb.toString());
progress.worked(100);
} catch (BladeCLIException bclie) {
ProjectUI.logError(bclie);
throw new CoreException(StatusBridge.create(Status.createErrorStatus("Faild execute Liferay Workspace Init Command...", bclie)));
} finally {
progress.done();
}
}
use of com.liferay.ide.project.core.modules.BladeCLIException in project liferay-ide by liferay.
the class LiferayGradleWorkspaceProjectProvider method createNewProject.
@Override
public IStatus createNewProject(NewLiferayWorkspaceOp op, IProgressMonitor monitor) throws CoreException {
IPath location = PathBridge.create(op.getLocation().content());
String wsName = op.getWorkspaceName().toString();
IPath wsLocation = location.append(wsName);
StringBuilder sb = new StringBuilder();
sb.append("--base ");
sb.append("\"");
sb.append(wsLocation.toFile().getAbsolutePath());
sb.append("\" ");
sb.append("");
sb.append("init");
try {
BladeCLI.execute(sb.toString());
} catch (BladeCLIException bclie) {
return ProjectCore.createErrorStatus(bclie);
}
String workspaceLocation = location.append(wsName).toPortableString();
boolean initBundle = op.getProvisionLiferayBundle().content();
String bundleUrl = op.getBundleUrl().content(false);
return importProject(workspaceLocation, monitor, initBundle, bundleUrl);
}
use of com.liferay.ide.project.core.modules.BladeCLIException in project liferay-ide by liferay.
the class LiferayMavenWorkspaceProjectProvider method createNewProject.
@Override
public IStatus createNewProject(NewLiferayWorkspaceOp op, IProgressMonitor monitor) throws CoreException {
IPath location = PathBridge.create(op.getLocation().content());
String wsName = op.getWorkspaceName().toString();
IPath wsLocation = location.append(wsName);
StringBuilder sb = new StringBuilder();
sb.append("--base ");
sb.append("\"");
sb.append(wsLocation.toFile().getAbsolutePath());
sb.append("\" ");
sb.append("init ");
sb.append("-b ");
sb.append("maven");
try {
BladeCLI.execute(sb.toString());
} catch (BladeCLIException bclie) {
return ProjectCore.createErrorStatus(bclie);
}
String workspaceLocation = location.append(wsName).toPortableString();
boolean initBundle = op.getProvisionLiferayBundle().content();
String bundleUrl = op.getBundleUrl().content(false);
return importProject(workspaceLocation, monitor, initBundle, bundleUrl);
}
Aggregations