Interface MavenArtifactProvider

  • All Known Implementing Classes:
    DefaultMavenArtifactProvider

    public interface MavenArtifactProvider
    Provider which allows downloading artifact using Maven and add content to the CamelCatalog.
    • Method Detail

      • setCacheDirectory

        void setCacheDirectory​(String directory)
        Configures the directory for the download cache.

        The default folder is USER_HOME/.groovy/grape

        Parameters:
        directory - the directory.
      • addMavenRepository

        void addMavenRepository​(String name,
                                String url)
        To add a 3rd party Maven repository.
        Parameters:
        name - the repository name
        url - the repository url
      • addArtifactToCatalog

        Set<String> addArtifactToCatalog​(org.apache.camel.catalog.CamelCatalog camelCatalog,
                                         String groupId,
                                         String artifactId,
                                         String version)
        Downloads the artifact using the Maven coordinates and scans the JAR for Camel components which will be added to the CamelCatalog.
        Parameters:
        camelCatalog - The Camel Catalog
        groupId - Maven group id
        artifactId - Maven artifact id
        version - Maven version
        Returns:
        the names of the components that was added, or an empty set if none found or they already exists in the catalog