Class DefaultMavenArtifactProvider

    • Constructor Detail

      • DefaultMavenArtifactProvider

        public DefaultMavenArtifactProvider()
    • Method Detail

      • setLog

        public void setLog​(boolean log)
        Sets whether to log errors and warnings to System.out. By default nothing is logged.
      • setCacheDirectory

        public void setCacheDirectory​(String directory)
        Description copied from interface: MavenArtifactProvider
        Configures the directory for the download cache.

        The default folder is USER_HOME/.groovy/grape

        Specified by:
        setCacheDirectory in interface MavenArtifactProvider
        Parameters:
        directory - the directory.
      • addArtifactToCatalog

        public Set<String> addArtifactToCatalog​(org.apache.camel.catalog.CamelCatalog camelCatalog,
                                                String groupId,
                                                String artifactId,
                                                String version)
        Description copied from interface: MavenArtifactProvider
        Downloads the artifact using the Maven coordinates and scans the JAR for Camel components which will be added to the CamelCatalog.
        Specified by:
        addArtifactToCatalog in interface MavenArtifactProvider
        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
      • scanCamelComponents

        protected void scanCamelComponents​(org.apache.camel.catalog.CamelCatalog camelCatalog,
                                           ClassLoader classLoader,
                                           Set<String> names)