karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5339) Allow to define blacklisted bundles in a profile
Date Wed, 06 Dec 2017 11:31:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-5339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280049#comment-16280049
] 

Grzegorz Grzybek commented on KARAF-5339:
-----------------------------------------

I added some changes to my https://github.com/apache/karaf/commits/KARAF-5376-overrides_v2
branch.

I have working solution, where you have:

* startup profiles configured in {{karaf-assembly-plugin}} maven config:
{code:xml}
<startupProfiles>
    <profile>p1b-another</profile>
    <profile>p2a</profile>
    <profile>p2c-two</profile>
</startupProfiles>
{code}
* {{p1b-another}} profile having:
{noformat}
blacklisted.feature.f1 = my-blacklisted-feature1
{noformat}
* blacklisting configuration in Maven POM:
{code:xml}
<blacklistedRepositories>
    <repository>mvn:org.jclouds/*</repository>
</blacklistedRepositories>
<blacklistedFeatures>
    <feature>*jclouds*</feature>
</blacklistedFeatures>
<blacklistedBundles>
    <bundle>mvn:org.ops4j.pax.cdi/*</bundle>
</blacklistedBundles>
{code}

The result is {{etc/profile.cfg}} in generated assembly containing:
{noformat}
#
# Profile generated by Karaf Assembly Builder
#
...
# Blacklisted repositories
blacklisted.repository.mvn\:org.jclouds/* = mvn:org.jclouds/*

# Blacklisted features
blacklisted.feature.f1 = my-blacklisted-feature1
blacklisted.feature.*jclouds* = *jclouds*

# Blacklisted bundles
blacklisted.bundle.mvn\:org.ops4j.pax.cdi/* = mvn:org.ops4j.pax.cdi/*
{noformat}

Generated features processing XML file ({{etc/org.apache.karaf.features.xml}}) will have:
{code:xml}
    <!-- A list of blacklisted features XML repository URIs - they can't be added later
-->
    <blacklistedRepositories>
        <repository>mvn:org.jclouds/*</repository>
    </blacklistedRepositories>

    <!-- A list of blacklisted feature identifiers that can't be installed in Karaf and
are not part of the distribution -->
    <blacklistedFeatures>
        <feature>*jclouds*</feature>
        <feature>my-blacklisted-feature1</feature>
    </blacklistedFeatures>

    <!-- A list of blacklisted bundle URIs that are not installed even if they are part
of some features -->
    <blacklistedBundles>
        <bundle>mvn:org.ops4j.pax.cdi/*</bundle>
    </blacklistedBundles>
{code}

> Allow to define blacklisted bundles in a profile
> ------------------------------------------------
>
>                 Key: KARAF-5339
>                 URL: https://issues.apache.org/jira/browse/KARAF-5339
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-tooling
>    Affects Versions: 4.1.2
>            Reporter: Jérémie Brébec
>            Assignee: Grzegorz Grzybek
>
> It should be interesting to define, in a profile, blacklisted bundles. Today, such blacklist
can only be defined in the pom.xml in an assembly.
> I would like to share commons karaf configurations, like overrides/blacklists, through
a profile.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message