Hi Mario,

Is your branding bundle a fragment of org.apache.karaf.webconsole.console bundle ?

Regards
JB

On 03/09/2015 08:07 AM, mario.toffia wrote:
Hi, I'm trying to test out branding on karaf 4.0.0.M2 (tried earlier on M1 as
well with same result). The console branding works great. However I've been
trying to do a simple replacement of the favico and the logo in the
webconsole but fails miserabely. I have followed the guide (4.0.0.M1) and
looked into the git repo how to do the branding.

I've added the branding bundles under the system folder and added them in
custom.properties: org.osgi.framework.system.packages.extra.
They load just fine (the console-branding is active and webconsole-branding
is installed). When I install feature:webconsole the webconsole-branding
bundle gets resolved. When I access the webconsole it still have the karaf
image etc. I've added fragments of (what I see) important parts of them.

Is there any obvious errors in my setup?

Cheers,
  Mario


META-INF/webconsole.properties:
----------------------
webconsole.brand.name = Test Web Console

webconsole.product.name = Test
webconsole.product.url = http://www.test.se/
webconsole.product.image = /res/cb/imgs/logo.png

webconsole.vendor.name = Test Vendor
webconsole.vendor.url = http://www.test.se
webconsole.vendor.image = /res/cb/imgs/logo.png

webconsole.favicon = /res/cb/imgs/favicon.ico
webconsole.stylesheet = /res/cb/ui/webconsole.css


pom.xml:
--------
...
<resource>
        <directory>src/main/resources</directory>
                <filtering>true</filtering>
                        <includes>
                                <include>**/*</include>
                        </includes>
                        <excludes>
                                <exclude>README.txt</exclude>
                </excludes>
        </resource>
</resources>
<plugins>
        <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${version.maven.bundle.plugin}</version>
                <extensions>true</extensions>
                <configuration>
                        <instructions>
                                <Bundle-Vendor>
                     Test Vendor
                 </Bundle-Vendor>
                                
<Bundle-DocURL>http://www.test.se</Bundle-DocURL>
                        
<Fragment-Host>org.apache.karaf.webconsole.console;bundle-version="[3,5)"</Fragment-Host>
                                <Export-Package>!*</Export-Package>
                                <Import-Package>
                                        
org.osgi.service.metatype;resolution:=optional,
                                        
org.osgi.service.prefs;resolution:=optional,
                                        javax.portlet;resolution:=optional,
                                        javax.servlet.*;version="[2.6, 4.0)",
                                        !org.apache.felix.bundlerepository,
                                        !org.osgi.service.obr,
                                        !org.osgi.service.cm,
                                        !org.osgi.service.condpermadmin,
                                        !org.osgi.service.log,
                                        !org.osgi.service.metatype,
                                        !org.osgi.service.permissionadmin,
                                        !org.osgi.service.wireadmin,
                                        *
                                </Import-Package>
                        </instructions>
                </configuration>
        </plugin>
</plugins>

Initial State:
--------------
karaf@root>list -t 0
START LEVEL 100 , List Threshold: 0
ID | State     | Lvl | Version        | Name
-----------------------------------------------------------------------------------------------------------
  0 | Active    |   0 | 4.4.1          | System Bundle
  ...
  6 | Active    |  30 | 1.0.0.SNAPSHOT | Test Console Branding
  7 | Installed |  30 | 1.0.0.SNAPSHOT | Test Web Console Branding
  8 | Active    |  15 | 4.0.0.M2       | Apache Karaf :: Features :: Core
  ...
  karaf@root>

After feature:install webconsole:
---------------------------------
karaf@root>list -t 0
START LEVEL 100 , List Threshold: 0
ID | State    | Lvl | Version         | Name
-------------------------------------------------------------------------------------------------------------
  0 | Active   |   0 | 4.4.1           | System Bundle
  ...
  6 | Active   |  30 | 1.0.0.SNAPSHOT  | Test Console Branding
  7 | Resolved |  30 | 1.0.0.SNAPSHOT  | Test Web Console Branding, Hosts: 58
  ...
  58 | Active   |  30 | 4.0.0.M2        | Apache Karaf :: Web Console ::
Console, Fragments: 7



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Can-t-brand-the-webconsole-tp4038868.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


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

Reply via email to