Package aQute.bnd.version

Examples of aQute.bnd.version.Version


        }
    }

    private static void updateBundleVersion(ReleaseContext context, Baseline current, Builder builder) throws IOException, CoreException {

        Version bundleVersion = current.getSuggestedVersion();
        if (bundleVersion != null) {

            File file = builder.getPropertiesFile();
            Properties properties = builder.getProperties();
            if (file == null) {
View Full Code Here


    protected Version getInitialSuggestedVersion(Object obj) {
        if (initialSuggested == null) {
            initialSuggested = new HashMap<Object,Version>();
        }

        Version version = initialSuggested.get(obj);
        if (version != null) {
            return version;
        }

        if (obj instanceof Info) {
View Full Code Here

          selectedVersion = items[idx];
      } else {
          selectedVersion = ((CCombo) cellEditor.getControl()).getText();
      }

      Version version;
      try {
          version = Version.parseVersion(selectedVersion);
      } catch (IllegalArgumentException e) {
          Activator.message(String.format(Messages.versionInvalid, selectedVersion));
          return;
View Full Code Here

       }
  }

  private static void updateBundleVersion(ReleaseContext context, Baseline current, Builder builder) throws IOException, CoreException {

    Version bundleVersion = current.getSuggestedVersion();
    if (bundleVersion != null) {

      File file = builder.getPropertiesFile();
      Properties properties = builder.getProperties();
      if (file == null) {
View Full Code Here

   * Strips the qualifier part of a version string.
   * @param version
   * @return Version string without qualifier
   */
  public static String stripVersionQualifier(String version) {
    Version ver = new Version(version);
    StringBuilder sb = new StringBuilder();
    sb.append(ver.getMajor());
    sb.append('.');
    sb.append(ver.getMinor());
    sb.append('.');
    sb.append(ver.getMicro());
    return sb.toString();
  }
View Full Code Here

          i.remove();

      }
      String version = exports.get(entry.getKey()).get(Constants.VERSION_ATTRIBUTE);
      if (version != null) {
        Version v = new Version(version);
        set.add(new Element(Type.VERSION, v.getWithoutQualifier().toString(), null, IGNORED, IGNORED, null));
      }
      Element pd = new Element(Type.PACKAGE, entry.getKey().getFQN(), set, MINOR, MAJOR, null);
      result.add(pd);
    }
View Full Code Here

      cd.xmlns = namespace;
    }
    String version = info.get(COMPONENT_VERSION);
    if (version != null) {
      try {
        Version v = new Version(version);
        cd.updateVersion(v);
      } catch (Exception e) {
        error("version: specified on component header but not a valid version: "
            + version);
        return;
View Full Code Here

            }
          } else {
            // Verify this matches with packageinfo
            String presentVersion = info.get(VERSION_ATTRIBUTE);
            try {
              Version av = new Version(presentVersion);
              Version bv = new Version(version);
              if (!av.equals(bv)) {
                error("Version from annotation for %s differs with packageinfo or Manifest", clazz
                    .getClassName().getFQN());
              }
            }
View Full Code Here

    Entry<String,Attrs> name = getBundleSymbolicName();
    if (name != null) {
      String bsn = name.getKey();
      String version = getBundleVersion();
      Version v = Version.parseVersion(version);
      String outputName = bsn + "-" + v.getWithoutQualifier() + Constants.DEFAULT_JAR_EXTENSION;
      return new File(outputDir, outputName);
    }

    File source = getJar().getSource();
    if (source != null) {
View Full Code Here

    Map<String, String> attrs = new HashMap<String, String>();
    attrs.put("version", "2.5");
    attrs.put("strategy", "exact");

    File file = repo.get("javax.servlet:servlet-api", new Version(2, 5, 0), attrs , listener);

    assertNotNull(file);
    assertEquals( "servlet-api-2.5.jar", file.getName());
  }
View Full Code Here

TOP

Related Classes of aQute.bnd.version.Version

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.