private void abort() { ShellMessages.info(shell, "Installation cancelled!"); } }
@Command(help = "Remove all shade configurations from the POM") public void remove() throws XmlPullParserException, IOException { assertInstalled(); if (shell.promptBoolean("Really remove all shade configuration?")) { removeShadePlugin(); ShellMessages.info(shell, "Removed all shade configuration from POM."); } else if (!isInstalled()) ShellMessages.success(shell, "Shade is not configured."); else ShellMessages.info(shell, "Aborted."); }
@Command(value = "remove-plugin", help = "Removes a plugin from the current Forge runtime configuration") public void removePlugin( @Option(completer = InstalledPluginCompleter.class, description = "plugin-name", required = true, help = "The fully qualified plugin name e.g: 'org.jboss.forge.plugin:version'") final String pluginName, final PipeOut out) throws Exception { if (pluginManager.removePlugin(pluginName)) { ShellMessages.success(out, "Successfully removed [" + pluginName + "]"); restart(); } else { ShellMessages.error(out, "Failed to remove [" + pluginName + ""); } }
@SetupCommand public void setup(final PipeOut out) { if (!project.hasFacet(ForgeAPIFacet.class)) { event.fire(new InstallFacets(ForgeAPIFacet.class)); if (!project.hasFacet(ForgeAPIFacet.class)) { throw new RuntimeException("Could not install Forge API"); } } else ShellMessages.success(out, "Forge API is installed."); }
if (!Types.isBasicType(idType)) ShellMessages.error(out, "Skipped class [" + entity.getQualifiedName() + "] because @Id type [" + idType + "] is not supported by endpoint generation."); continue; ShellMessages.success(out, "Generated REST endpoint for [" + entity.getQualifiedName() + "]"); ShellMessages.info(out, "Aborted REST endpoint generation for [" + entity.getQualifiedName() + "]");
try ShellMessages.info(out, "Checking out plugin source files to [" + buildDir.getFullyQualifiedName() + "] via 'git'"); repo = GitUtils.clone(buildDir, gitRepo); ShellMessages.info(out, "Switching to branch/tag [" + ref.getName() + "]"); GitUtils.checkout(repo, ref, false, SetupUpstreamMode.TRACK, false); ShellMessages.warn( out, "Could not find a Ref matching the current Forge version [" ShellMessages.info(out, "Sources are kept in [" + buildDir.getFullyQualifiedName() + "]"); ShellMessages.info(out, "Cleaning up temp workspace [" + buildDir.getFullyQualifiedName() + "]"); ShellMessages.success(out, "Installed from [" + gitRepo + "] successfully."); restart();
ShellMessages.warn(shell, "'forge update' only works when it is run outside of the IDE."); shell.println("The embedded Forge versions are automatically updated when there is a new version of the JBoss Tools Forge Plugin."); shell.println("If you want to use the latest version without waiting for a new plugin release, do the following:"); .warn(shell, "There is an update pending. Restart Forge for the update to take effect. To abort this update, type 'forge update-abort'"); return; if (forgeDistribution == null) ShellMessages.info(shell, "Forge is up to date! Enjoy!");
ShellMessages.info(this, "Aborted."); if (isVerbose()) ShellMessages.error(this, formatSourcedError(e.getCommand()) + e.getMessage()); if (isVerbose()) ShellMessages.error(this, formatSourcedError(e.getCommand()) + e.getMessage()); if (isVerbose()) ShellMessages.error(this, formatSourcedError(e.getPlugin()) + e.getMessage()); if (isVerbose()) ShellMessages.error(this, e.getMessage()); if (isVerbose()) ShellMessages.error(this, "Exception encountered: " + e.getMessage() + " (type \"set VERBOSE true\" to enable stack traces)"); ShellMessages.error(this, "Exception encountered: (type \"set VERBOSE false\" to disable stack traces)"); e.printStackTrace();
public void beforeCommandExecution(@Observes PreCommandExecution cmd, Shell shell) { CommandMetadata command = cmd.getCommand(); boolean deprecated = command.getMethod().isAnnotationPresent(Deprecated.class); if (deprecated) { String message = String.format("The command (%s) is deprecated and may be removed in future versions", command.getName()); ShellMessages.warn(shell, message); } }
private Collection<Facet> remove(final Facet facet, final boolean prompt) { Collection<Facet> removed = performRemoval(facet, prompt); if (!removed.contains(facet)) { ShellMessages.error(shell, "Failed to remove [" + ConstraintInspector.getName(facet.getClass()) + "]; there may be a mess!"); } return removed; }
@SetupCommand public void setup(final PipeOut out) { if (!project.hasFacet(JSTLFacet.class)) { request.fire(new InstallFacets(JSTLFacet.class)); } if (project.hasFacet(JSTLFacet.class)) { ShellMessages.success(out, "Java Standard Template Library (JSTL) is installed."); } }
|| ScopeType.TEST.equals(dependency.getScopeTypeEnum()))) ShellMessages.warn(shell, "Dependency [" + dependency.toCoordinates() + "] was not correctly marked as PROVIDED scope; this has been corrected."); deps.addDirectDependency(DependencyBuilder.create(dependency).setScopeType(ScopeType.PROVIDED)); if (effectiveDependency != null && ScopeType.TEST != effectiveDependency.getScopeTypeEnum()) ShellMessages.warn(shell, "Plugin has a dependency on internal Forge API [" + dependency + "] - this is not allowed and may cause failures."); ShellMessages.info(shell, "Invoking build with underlying build system."); Dependency dep = meta.getOutputDependency(); ShellMessages.info(shell, "Installing plugin artifact.");
private void displayTransientFieldWarningMsg(JavaClass klass, Field<?> field) { ShellMessages.warn(writer, "A transient field [" + field.getName() + "] was chosen. The generated equals() and hashCode() methods for the class [" + klass.getName() + "] may be incorrect."); }
private void install(final Facet facet, final boolean prompt) { if (!performInstallation(facet, prompt)) { ShellMessages.error(shell, "Failed to install [" + ConstraintInspector.getName(facet.getClass()) + "]; there may be a mess!"); } }
private void printAllMessage(final boolean all, final PipeOut out, final String tok, final List<PluginMetadata> list) { if (list.size() > 1) { if (all) { ShellMessages.info(out, "The plugin [" + tok + "] is overloaded. Listing all candidates and their corresponding Resource scopes."); } else { ShellMessages .info(out, "The plugin [" + tok + "] is overloaded. Showing only the plugin for the first or active scope. Re-run with " + out.renderColor(ShellColor.BOLD, "'--all'") + " to display all scopes."); } } }
/** * Aborts a forge update */ @Command(value = "update-abort", help = "Aborts a previous forge update") public void updateAbort() throws IOException { DirectoryResource forgeHome = environment.getForgeHome(); DirectoryResource updateDirectory = forgeHome.getChildDirectory(".update"); if (updateDirectory.exists()) { if (updateDirectory.delete(true)) { ShellMessages.success(shell, "Update files were deleted. Run 'forge update' if you want to update this installation again."); } else { ShellMessages.info(shell, "Could not abort. Try to run 'forge update-abort' again"); } } else { ShellMessages.info(shell, "No update files found"); } }
@SetupCommand public void setup(final PipeOut out) { if (!project.hasFacet(JTAFacet.class)) { request.fire(new InstallFacets(JTAFacet.class)); } if (project.hasFacet(JTAFacet.class)) { ShellMessages.success(out, "Java Transaction API (JTA) is installed."); } }
ShellMessages.error(out, "File exists but is not a directory [" + projectFolder.getFullyQualifiedName() + "]"); ShellMessages.error(out, "[" + dir.getFullyQualifiedName() + "] already contains a project; please use a different folder."); ShellMessages.error(out, "That folder already contains a project [" + newDir.getFullyQualifiedName() + "], please select a different location."); newDir = null; ShellMessages.success(out, "Created project [" + name + "] in new working directory [" + dir.getFullyQualifiedName() + "]");