Integrating "overrides" and "blacklisting" for repositories, features and bundles

2017-10-30 Thread Grzegorz Grzybek
Hello

Continuing my investigation of Processor mechanism for feature definitions
(a.k.a. "better overrides")[1], I want to give you insight to what I plan
to change in Karaf's FeatureService.

Currently we have two separate mechanisms:

"blacklisting":
 - may remove bundles from feature at features XML load time
 - may remove features from repository at features XML load time
 - may skip adding/analyzing features XML at karaf-maven-plugin:assembly
invocation time
 - doesn't prevent given features XML to be added later
 - clears runtime information about blacklisted features/bundles - we can't
query for blacklisted features or see (in `feature:list`) which features
were blacklisted

"overrides":
 - may replace G:A:V of some bundle with another G:A:V2 when downloading
bundles of a feature
 - doesn't allow to change G:A:V into different G2:A2:V2 (e.g.,
"mvn:org.eclipse.jetty.orbit/javax.servlet/3.0.0.v201112011016" →
"mvn:org.apache.geronimo.specs/geronimo-servlet_3.0_spec/1.0")
 - doesn't allow to change "dependency" flag on given bundle
 - doesn't allow to add bundles to a feature (assuming we "know better"
than original feature's author - but it's a problem more often than we'd
want)

What I'm working on (till you tell me we don't need it), is better
separation of concerns. I assume that feature XML files are loaded in one
place (JAXB) and then may be further processed (which involves
blacklisting, overriding and altering of entire features) before they're
actually used by FeaturesService.

Currently org.apache.karaf.features.internal.service.RepositoryCache class
holds JAXB model and uses
org.apache.karaf.features.internal.service.Blacklist class to alter (to
some degree) it.
I want to integrate "Blacklist" class into more generic
org.apache.karaf.features.internal.service.FeaturesProcessor interface.

Repository, Feature and BundleInfo classes will have "isBlacklisted()"
method for diagnostic purposes. Blacklisted items are not simply removed,
but can't be used to alter runtime (State).

I want to be as much consistent between FeaturesService (dynamic aspect)
and karaf-maven-plugin:assembly (static aspect) as possible. Maven goal's
configuration will be used to generate special (new?) file in etc/ of the
distro and then used at runtime.

As the area I'm playing with is very fragile, it's slower (than I want)
process. I'll continue my work, but I welcome any comments if I attempt
something silly.

regards
Grzegorz Grzybek
===
[1]: https://issues.apache.org/jira/browse/KARAF-5376


Issues with Attachments: week of 2017-10-30

2017-10-30 Thread jb
 
KARAF - Monday, October 30, 2017
 
  5 Issues with Attachments
 
  (sorted oldest to newest)
 
[KARAF-4310] Installing kar causes karaf restart
  - Created: 2016-02-03
  - Updated: 2017-10-26
  - Type: Bug
  - Fix Versions: [4.0.11, 4.1.4, 4.2.0]
  - Reporter: Michal Hlavac
  - Assigned: Jean-Baptiste Onofré
  - Attachments: [karaf-3.0.5.log, karaf-4.0.4.log]
  - https://issues.apache.org/jira/browse/KARAF-4310
 
[KARAF-4912] Cannot register Servlet via http-whiteboard under Java 9
  - Created: 2017-01-01
  - Updated: 2017-10-26
  - Type: Bug
  - Fix Versions: [4.2.0]
  - Reporter: Lijun Liao
  - Assigned: Achim Nierbeck
  - Attachments: [ServletTest-0.0.1.jar, ServletTest-src.zip, karaf.log]
  - https://issues.apache.org/jira/browse/KARAF-4912
 
[KARAF-5210] Seemingly random NPEs from Aether resolver
  - Created: 2017-06-15
  - Updated: 2017-10-26
  - Type: Bug
  - Fix Versions: [4.1.4, 4.2.0]
  - Reporter: Peter Berkman
  - Assigned: Guillaume Nodet
  - Attachments: [mvnsettings.xml, org.ops4j.pax.url.mvn.cfg]
  - https://issues.apache.org/jira/browse/KARAF-5210
 
[KARAF-5402] Fileinstall incorrectly parses .config files
  - Created: 2017-10-03
  - Updated: 2017-10-05
  - Type: Bug
  - Fix Versions: []
  - Reporter: ?ukasz Dywicki
  - Assigned: Guillaume Nodet
  - Attachments: [com.example.role.config]
  - https://issues.apache.org/jira/browse/KARAF-5402
 
[KARAF-5441] ActiveMQ configured for JDBC Master/Slave prevents all slaves 
from shutting down
  - Created: 2017-10-24
  - Updated: 2017-10-24
  - Type: Bug
  - Fix Versions: []
  - Reporter: Peter Berkman
  - Assigned: Unassigned
  - Attachments: [activemq-node1a.xml, activemq-node1b.xml, 
activemq-node2a.xml]
  - https://issues.apache.org/jira/browse/KARAF-5441