Tabnine Logo
Maven2OsgiConverter
Code IndexAdd Tabnine to your IDE (free)

How to use
Maven2OsgiConverter
in
org.apache.maven.shared.osgi

Best Java code snippets using org.apache.maven.shared.osgi.Maven2OsgiConverter (Showing top 10 results out of 315)

origin: org.apache.felix/maven-bundle-plugin

  public void execute() throws MojoExecutionException, MojoFailureException
  {
    for ( String name : versions.keySet() )
    {
      String version = versions.get( name );
      String osgi = maven2OsgiConverter.getVersion( version );
      project.getProperties().put( name, osgi );
    }
  }
}
origin: org.apache.maven.plugins/maven-eclipse-plugin

/**
 * <p>
 * Format the artifact information into an Eclipse-friendly plug-in name. Delegates to maven2OsgiConverter to obtain
 * bundle symbolic name and version.
 * </p>
 */
private String formatEclipsePluginName( Artifact artifact )
{
  return maven2OsgiConverter.getBundleSymbolicName( artifact ) + "_"
    + maven2OsgiConverter.getVersion( artifact.getVersion() );
}
origin: org.apache.felix/maven-bundle-plugin

private String getBundleName( Artifact artifact )
{
  return getMaven2OsgiConverter().getBundleFileName( artifact );
}
origin: reficio/p2-maven-plugin

public String calculateBundleSymbolicName(Artifact artifact) {
  return super.getMaven2OsgiConverter().getBundleSymbolicName(aetherToMavenArtifactBasic(artifact));
}
origin: org.codehaus.tycho/maven-osgi-packaging-plugin

String getBundleVersion(Artifact a, boolean pde) {
  String version = mavenOsgi.getVersion(a);
  String suffix = ".SNAPSHOT";
  if (version.endsWith(suffix)) {
    version = version.substring(0, version.length() - suffix.length());
    if (pde) {
      version = version + ".qualifier";
    } else { 
      version = version + "-" + df.format(new Date());
    }
  }
  return version;
}
origin: org.apache.felix/maven-bundle-plugin

try
  bsn = getMaven2OsgiConverter().getBundleSymbolicName( currentProject.getArtifact() );
properties.put( Analyzer.BUNDLE_SYMBOLICNAME, bsn );
properties.put( Analyzer.IMPORT_PACKAGE, "*" );
properties.put( Analyzer.BUNDLE_VERSION, getMaven2OsgiConverter().getVersion( currentProject.getVersion() ) );
origin: org.apache.felix/maven-bundle-plugin

/**
 * Convert a Maven version into an OSGi compliant version
 *
 * @param version Maven version
 * @return the OSGi version
 */
protected String convertVersionToOsgi( String version )
{
  return getMaven2OsgiConverter().getVersion( version );
}
origin: reficio/p2-maven-plugin

public String cleanupVersion(String version) {
  return super.getMaven2OsgiConverter().getVersion(version);
}
origin: reficio/p2-maven-plugin

public String calculateBundleVersion(Artifact artifact) {
  return super.getMaven2OsgiConverter().getVersion(aetherToMavenArtifactBasic(artifact));
}
origin: org.apache.sling/maven-launchpad-plugin

/**
 * Merge bundle into a start level using the supplied level if present.
 * @param mergeStartLevel
 * @param newBnd
 */
private void add(StartLevel mergeStartLevel, Bundle newBnd) {
  Bundle current = get(newBnd, false);
  if (current != null) {
    final Maven2OsgiConverter converter = new DefaultMaven2OsgiConverter();
    // compare versions, the highest will be used
    final Version newVersion = new Version(converter.getVersion(newBnd.getVersion()));
    final Version oldVersion = new Version(converter.getVersion(current.getVersion()));
    if ( newVersion.compareTo(oldVersion) > 0 ) {
      current.setVersion(newBnd.getVersion());
    }
  } else {
    StartLevel startLevel = null;
    if ( mergeStartLevel == null || newBnd.getStartLevel() != 0) {
      startLevel = getOrCreateStartLevel(newBnd.getStartLevel());
    } else {
      startLevel = getOrCreateStartLevel(mergeStartLevel.getStartLevel());
    }
    startLevel.getBundles().add(newBnd);
  }
}
org.apache.maven.shared.osgiMaven2OsgiConverter

Javadoc

Converter from Maven groupId,artifactId and versions to OSGi Bundle-SymbolicName and version

Most used methods

  • getVersion
    Convert a Maven version into an OSGi compliant version
  • getBundleSymbolicName
    Get the OSGi symbolic name for the artifact
  • getBundleFileName

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JFrame (javax.swing)
  • Top 12 Jupyter Notebook extensions
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