This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new c8bea0c  fix duplicated service components
c8bea0c is described below

commit c8bea0c9121711e1d80c39b6afb96a03b239804d
Author: Alex Heneveld <[email protected]>
AuthorDate: Thu Sep 16 10:01:34 2021 +0100

    fix duplicated service components
    
    these error messages in logs sometimes
    
    2021-09-13T08:05:40,403Z - ERROR 376 
o.a.b.u.m.m.r.i.UiMetadataConfigListener [tures-3-thread-1] bundle 
org.apache.brooklyn.ui.modularity.brooklyn-ui-metadata-registry:1.1.0.SNAPSHOT 
(376)[org.apache.brooklyn.ui.modularity.metadata.registry.impl.UiMetadataConfigListener]
 : Cannot register component
    2021-09-13T08:05:40,416Z - ERROR 375 o.a.b.u.m.ExternalUiModule 
[tures-3-thread-1] bundle 
org.apache.brooklyn.ui.modularity.brooklyn-ui-external-modules:1.1.0.SNAPSHOT 
(375)[org.apache.brooklyn.ui.modularity.ExternalUiModule] : Cannot register 
component
    
    if we do a mvn deploy after a mvn clean install -- it adds the XML 
definitions _again_, changing in MANIFEST.MF this:
    
        Service-Component: OSGI-INF/org.apache.brooklyn.ui.modularity.ExternalUi
         Module.xml
    
    to
    
        Service-Component: OSGI-INF/org.apache.brooklyn.ui.modularity.ExternalUi
         Module.xml,OSGI-INF/org.apache.brooklyn.ui.modularity.ExternalUiModule.
         xml
---
 modularity-server/external-modules/pom.xml  | 3 ++-
 modularity-server/metadata-registry/pom.xml | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/modularity-server/external-modules/pom.xml 
b/modularity-server/external-modules/pom.xml
index fa83702..9bbb4b9 100644
--- a/modularity-server/external-modules/pom.xml
+++ b/modularity-server/external-modules/pom.xml
@@ -103,7 +103,7 @@
                     <instructions>
 
       <!-- exportScr and below from 
https://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html 
-->
-      <!-- Enable processing of OSGI DS component and metatype annotations - 
only needed for some type of tests it seems but no harm in having it --> 
+      <!-- Enable processing of OSGI DS component and metatype annotations - 
only needed for some type of tests it seems but no harm in having it -->
       <_dsannotations>*</_dsannotations>
       <_metatypeannotations>*</_metatypeannotations>
 
@@ -114,6 +114,7 @@
                         <Export-Package>
                             !*
                         </Export-Package>
+                        <Service-Component>*</Service-Component>  <!-- this 
prevents it from _adding_ the same entry on every non-clean run -->
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/modularity-server/metadata-registry/pom.xml 
b/modularity-server/metadata-registry/pom.xml
index 2c15bb7..b582c0c 100644
--- a/modularity-server/metadata-registry/pom.xml
+++ b/modularity-server/metadata-registry/pom.xml
@@ -128,6 +128,7 @@
                         <Export-Package>
                             !*
                         </Export-Package>
+                        <Service-Component>*</Service-Component>  <!-- this 
prevents it from _adding_ the same entry on every non-clean run -->
                     </instructions>
                 </configuration>
             </plugin>

Reply via email to