Tabnine Logo
AddonId.getVersion
Code IndexAdd Tabnine to your IDE (free)

How to use
getVersion
method
in
org.jboss.forge.furnace.addons.AddonId

Best Java code snippets using org.jboss.forge.furnace.addons.AddonId.getVersion (Showing top 18 results out of 315)

origin: org.jboss.forge.furnace/furnace-manager-resolver-maven

private String toMavenCoords(AddonId addonId)
{
 String coords = addonId.getName() + ":jar:" + this.classifier + ":" + addonId.getVersion();
 return coords;
}
origin: org.jboss.forge.furnace/furnace-api

/**
* The name and version, comma separated.
*/
public String toCoordinates()
{
 StringBuilder coord = new StringBuilder(getName()).append(",").append(getVersion());
 return coord.toString();
}
origin: org.jboss.forge.addon/addon-manager-impl

static File getInstallationPathFor(AddonId addonId)
{
 String name = addonId.getName();
 // TODO: Read from settings.xml?
 StringBuilder sb = new StringBuilder(OperatingSystemUtils.getUserHomePath()).append("/.m2/repository/");
 sb.append(name.replace('.', '/').replace(':', '/'));
 sb.append("/").append(addonId.getVersion());
 sb.append("/").append(name.substring(name.lastIndexOf(":") + 1)).append("-").append(addonId.getVersion())
      .append(".jar");
 return new File(sb.toString());
}
origin: org.jboss.forge.furnace/furnace-api

@Override
public boolean equals(Object obj)
{
 if (this == obj)
   return true;
 if (obj == null)
   return false;
 if (!(obj instanceof AddonId))
   return false;
 AddonId other = (AddonId) obj;
 if (name == null)
 {
   if (other.getName() != null)
    return false;
 }
 else if (!name.equals(other.getName()))
   return false;
 if (version == null)
 {
   if (other.getVersion() != null)
    return false;
 }
 else if (!version.equals(other.getVersion()))
   return false;
 return true;
}
origin: org.jboss.forge.furnace/furnace-manager-resolver-maven

@Override
public Set<AddonDependencyEntry> getDependencyEntries()
{
 Set<AddonDependencyEntry> entries = new HashSet<AddonDependencyEntry>();
 for (Entry<AddonId, Boolean> entry : requiredAddons.entrySet())
 {
   AddonId key = entry.getKey();
   Boolean exported = entry.getValue();
   entries.add(AddonDependencyEntry.create(key.getName(), key.getVersion().toString(), exported, false));
 }
 for (Entry<AddonId, Boolean> entry : optionalAddons.entrySet())
 {
   AddonId key = entry.getKey();
   Boolean exported = entry.getValue();
   entries.add(AddonDependencyEntry.create(key.getName(), key.getVersion().toString(), exported, true));
 }
 return entries;
}
origin: org.jboss.forge.furnace/furnace-manager-resolver-maven

public AddonInfoBuilder setAPIVersion(Version apiVersion)
{
 AddonId newId = AddonId.from(addon.getName(), addon.getVersion(), apiVersion);
 this.addon = newId;
 return this;
}
origin: org.jboss.forge.furnace/furnace-manager

  @Override
  public String toString()
  {
   AddonId oldAddon = removeRequest.getRequestedAddonInfo().getAddon();
   AddonId newAddon = deployRequest.getRequestedAddonInfo().getAddon();
   if (oldAddon.getVersion().equals(newAddon.getVersion()))
   {
     return "Update: [" + newAddon + "]";
   }
   else
   {
     return "Update: from [" + oldAddon + "] to [" + newAddon + "]";
   }
  }
}
origin: org.jboss.forge.furnace/furnace-api

@Override
public int compareTo(AddonId other)
{
 if (other == null)
   throw new IllegalArgumentException("Cannot compare against null.");
 int result = getName().compareTo(other.getName());
 if (result == 0)
   result = getVersion().compareTo(other.getVersion());
 if (result == 0)
   result = getApiVersion().compareTo(other.getApiVersion());
 return result;
}
origin: org.jboss.forge.addon/addons-impl

@Override
public Dependency toDependency(AddonId addon)
{
 String[] mavenCoords = addon.getName().split(":");
 Dependency dependency = DependencyBuilder.create().setGroupId(mavenCoords[0])
      .setArtifactId(mavenCoords[1])
      .setVersion(addon.getVersion().toString()).setClassifier(FORGE_ADDON_CLASSIFIER);
 return dependency;
}
origin: org.jboss.forge.addon/addons-impl

private void addAddonDependency(Project project, StringBuilder dependenciesAnnotationBody,
    AddonId addonId)
{
 DependencyInstaller dependencyInstaller = SimpleContainer
      .getServices(getClass().getClassLoader(), DependencyInstaller.class).get();
 Dependency dependency = DependencyBuilder.create(addonId.getName()).setVersion(
      addonId.getVersion().toString()).setClassifier(MavenAddonDependencyResolver.FORGE_ADDON_CLASSIFIER)
      .setScopeType("test");
 String name = addonId.getName();
 if (!dependencyInstaller.isInstalled(project, dependency))
 {
   dependencyInstaller.install(project, dependency);
 }
 dependenciesAnnotationBody.append("@AddonDependency(name = \"").append(name).append("\")");
}
origin: org.jboss.forge.furnace/furnace-manager

if (Versions.isSnapshot(addon.getVersion()) && addonInfo.equals(requestedAddonInfo))
 Version differentVersion = SingleVersion.valueOf(differentVersionEntry.getKey().getVersion().toString());
 Version addonVersion = SingleVersion.valueOf(addon.getVersion().toString());
origin: org.jboss.forge.furnace/furnace-manager-resolver-maven

if (Versions.isSnapshot(addonId.getVersion()))
origin: org.jboss.forge.addon/addons-impl

@Override
public Result execute(UIExecutionContext context) throws Exception
{
 Furnace furnace = SimpleContainer.getFurnace(getClass().getClassLoader());
 FacetFactory facetFactory = SimpleContainer.getServices(getClass().getClassLoader(), FacetFactory.class).get();
 DependencyInstaller dependencyInstaller = SimpleContainer
      .getServices(getClass().getClassLoader(), DependencyInstaller.class).get();
 UIContext uiContext = context.getUIContext();
 Project project = getSelectedProject(uiContext);
 facetFactory.install(project, FurnaceVersionFacet.class);
 project.getFacet(FurnaceVersionFacet.class).setVersion(furnace.getVersion().toString());
 facetFactory.install(project, AddonTestFacet.class);
 for (AddonId addonId : addonDependencies.getValue())
 {
   DependencyBuilder dependency = DependencyBuilder.create(addonId.getName())
       .setVersion(addonId.getVersion().toString()).setScopeType("test");
   if (!dependencyInstaller.isInstalled(project, dependency))
   {
    dependencyInstaller.install(project, dependency);
   }
 }
 return Results
      .success("Project " + project.getFacet(MetadataFacet.class).getProjectName()
          + " is now configured for testing");
}
origin: org.jboss.forge.addon/addon-manager-impl

@Override
@SuppressWarnings("unchecked")
public void start()
{
 getAddonRegistry()
      .getAddons(addon -> Versions.isSnapshot(addon.getId().getVersion())
          && addon.getRepository() instanceof MutableAddonRepository)
      .stream()
      .map(Addon::getId)
      .forEach(addonId -> {
       // Find local repository path for each addon
       File installationPath = getInstallationPathFor(addonId);
       FileResource<?> resource = getResourceFactory().create(FileResource.class, installationPath);
       ResourceMonitor monitor = resource.monitor();
       monitor.addResourceListener(e -> {
         // Run addonManager.remove and addonManager.install
         getAddonManager().remove(addonId).perform();
         getAddonManager().install(addonId).perform();
       });
       monitors.put(addonId, monitor);
      });
}
origin: org.jboss.forge.addon/addon-manager-impl

if (id.getVersion().compareTo(maxAddonId.getVersion()) > 0
     && addonAPIVersion.equals(resolver.resolveAPIVersion(id).get()))
origin: org.jboss.windup.rules.apps/windup-rules-java-api

private ApplicationReportModel createAboutWindup(GraphContext context, ProjectModel projectModel)
{
  ApplicationReportService applicationReportService = new ApplicationReportService(context);
  ApplicationReportModel applicationReportModel = applicationReportService.create();
  applicationReportModel.setReportPriority(10000);
  applicationReportModel.setReportName(REPORT_NAME);
  applicationReportModel.setDescription(REPORT_DESCRIPTION);
  applicationReportModel.setReportIconClass("fa fa-question-circle");
  applicationReportModel.setMainApplicationReport(false);
  applicationReportModel.setDisplayInApplicationReportIndex(true);
  if (projectModel == null)
    applicationReportModel.setDisplayInGlobalApplicationIndex(true);
  else
    applicationReportModel.setProjectModel(projectModel);
  applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT);
  applicationReportModel.setTemplateType(TemplateType.FREEMARKER);
  Map<String, WindupVertexFrame> related = new HashMap<>();
  AboutWindupModel aboutWindupModel = context.getFramed().addFramedVertex(AboutWindupModel.class);
  aboutWindupModel.setWindupRuntimeVersion(addon.getId().getVersion().toString());
  related.put("windupAbout", aboutWindupModel);
  applicationReportModel.setRelatedResource(related);
  // Set the filename for the report
  ReportService reportService = new ReportService(context);
  String filename = projectModel == null ? "about_global" : "about_" + projectModel.getName();
  reportService.setUniqueFilename(applicationReportModel, filename, "html");
  return applicationReportModel;
}
origin: windup/windup

private ApplicationReportModel createAboutWindup(GraphContext context, ProjectModel projectModel)
{
  ApplicationReportService applicationReportService = new ApplicationReportService(context);
  ApplicationReportModel applicationReportModel = applicationReportService.create();
  applicationReportModel.setReportPriority(10000);
  applicationReportModel.setReportName(REPORT_NAME);
  applicationReportModel.setDescription(REPORT_DESCRIPTION);
  applicationReportModel.setReportIconClass("fa fa-question-circle");
  applicationReportModel.setMainApplicationReport(false);
  applicationReportModel.setDisplayInApplicationReportIndex(true);
  if (projectModel == null)
    applicationReportModel.setDisplayInGlobalApplicationIndex(true);
  else
    applicationReportModel.setProjectModel(projectModel);
  applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT);
  applicationReportModel.setTemplateType(TemplateType.FREEMARKER);
  Map<String, WindupVertexFrame> related = new HashMap<>();
  AboutWindupModel aboutWindupModel = context.getFramed().addFramedVertex(AboutWindupModel.class);
  aboutWindupModel.setWindupRuntimeVersion(addon.getId().getVersion().toString());
  related.put("windupAbout", aboutWindupModel);
  applicationReportModel.setRelatedResource(related);
  // Set the filename for the report
  ReportService reportService = new ReportService(context);
  String filename = projectModel == null ? "about_global" : "about_" + projectModel.getName();
  reportService.setUniqueFilename(applicationReportModel, filename, "html");
  return applicationReportModel;
}
origin: windup/windup

@Override
public Result execute(UIExecutionContext context) throws Exception
{
  if (!context.getPrompt().promptBoolean(
    "Are you sure you want to continue? This command will delete current directories: addons, bin, lib, rules/migration-core"))
  {
    return Results.fail("Updating distribution was aborted.");
  }
  // Find the latest version.
  Coordinate latestDist = this.updater.getLatestReleaseOf("org.jboss.windup", "windup-distribution");
  Version latestVersion = SingleVersion.valueOf(latestDist.getVersion());
  Version installedVersion = currentAddon.getId().getVersion();
  if (latestVersion.compareTo(installedVersion) <= 0)
  {
    return Results.fail(Util.WINDUP_BRAND_NAME_ACRONYM+" CLI is already in the most updated version.");
  }
  distUpdater.replaceWindupDirectoryWithDistribution(latestDist);
  return Results.success("Sucessfully updated "+Util.WINDUP_BRAND_NAME_ACRONYM+" CLI to version " + latestDist.getVersion() + ". Please restart RHAMT CLI.");
}
org.jboss.forge.furnace.addonsAddonIdgetVersion

Javadoc

Get the Version of this AddonId.

Popular methods of AddonId

  • getName
    Get the name of this AddonId.
  • fromCoordinates
    Attempt to parse the given string as Addon coordinates in the form: "group:name,version"
  • toCoordinates
    The name and version, comma separated.
  • from
    Create an AddonId from the given name, Version, and API Version.
  • toString
  • equals
  • getApiVersion
    Get the API Version of this AddonId.
  • <init>
  • hashCode

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Path (java.nio.file)
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now