Class ObrUtils


  • public class ObrUtils
    extends java.lang.Object
    Various OBR utility methods
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String DOT_XML  
      private static java.lang.String OBR_XML  
      private static java.lang.String REPO_XML  
    • Constructor Summary

      Constructors 
      Constructor Description
      ObrUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.URI findObrXml​(org.apache.maven.project.MavenProject project)  
      static java.net.URI findRepositoryXml​(java.lang.String mavenRepository, java.lang.String obrRepository)  
      static java.net.URI getArtifactURI​(org.apache.maven.artifact.repository.ArtifactRepository repository, org.apache.maven.artifact.Artifact artifact)  
      static java.net.URI getRelativeURI​(java.net.URI repositoryXml, java.net.URI bundleJar)  
      static java.net.URI toFileURI​(java.lang.String path)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObrUtils

        public ObrUtils()
    • Method Detail

      • findRepositoryXml

        public static java.net.URI findRepositoryXml​(java.lang.String mavenRepository,
                                                     java.lang.String obrRepository)
        Parameters:
        mavenRepository - path to local maven repository
        obrRepository - path to specific repository.xml
        Returns:
        URI pointing to correct repository.xml
      • findObrXml

        public static java.net.URI findObrXml​(org.apache.maven.project.MavenProject project)
        Parameters:
        project - current project
        Returns:
        URI pointing to correct obr.xml, null if not found
      • getArtifactURI

        public static java.net.URI getArtifactURI​(org.apache.maven.artifact.repository.ArtifactRepository repository,
                                                  org.apache.maven.artifact.Artifact artifact)
        Parameters:
        repository - maven repository
        artifact - maven artifact
        Returns:
        file URI pointing to artifact in repository
      • toFileURI

        public static java.net.URI toFileURI​(java.lang.String path)
        Parameters:
        path - filesystem path
        Returns:
        file URI for the path
      • getRelativeURI

        public static java.net.URI getRelativeURI​(java.net.URI repositoryXml,
                                                  java.net.URI bundleJar)
        Parameters:
        repositoryXml - URI pointing to repository.xml, or directory containing it
        bundleJar - URI pointing to bundle jarfile
        Returns:
        relative URI to bundle jarfile