You can create a script (in etc/shell.init.script), that list all features in a repo (feature:list with grep on the repo), and then install the features with feature:install.

You can take a look on http://karaf.apache.org/manual/latest/developers-guide/scripting.html for details about scripting.

Regards
JB

On 04/04/2016 05:32 PM, Elliot Metsger wrote:
Thank you Jean-Baptiste, for looking into this.  I'll look forward to 4.0.6.

In the interim, is there a workaround for telling Karaf to "install all
of the features in a features repository"?

Thanks,
Elliot

On Mon, Apr 4, 2016 at 10:57 AM, Jean-Baptiste Onofré <[email protected]
<mailto:[email protected]>> wrote:

    Yes, it could be considered as a regression as it works before but
    no more in Karaf 4.x:

         public void addRepository(URI uri, boolean install) throws
    Exception {
             if (install) {
                 // TODO: implement
                 throw new UnsupportedOperationException();
             }
    ...

    The same happens for removeRepository where the uninstall flag is
    simply ignored.

    Due to the introduction of the Features resolver in Karaf 4, we
    changed the implementation of these methods.

    I will re-introduce support of these flags in 4.0.6:

    https://issues.apache.org/jira/browse/KARAF-4468

    Sorry about that.

    Regards
    JB

    On 04/04/2016 04:15 PM, Elliot Metsger wrote:

        Hi everyone,

        I'm trying use the '-i' (--install) option of
        `feature:repo-add`, and it
        isn't working:

        karaf@root()> feature:repo-add -i
        mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
        Adding feature url
        mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
        Error executing command: java.lang.UnsupportedOperationException
        karaf@root()>


        The feature repo installs just fine on its own, without -i:
        karaf@root()> feature:repo-add
        mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
        Adding feature url
        mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
        karaf@root()>

        This feature repository is available on Maven central if you care to
        replicate the problem.

        Is there something wrong with the feature file that is causing this
        error, or is this a bug in Karaf?

        Thanks,
        Elliot


    --
    Jean-Baptiste Onofré
    [email protected] <mailto:[email protected]>
    http://blog.nanthrax.net
    Talend - http://www.talend.com



--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to