felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jibie Job <jibie....@gmail.com>
Subject Re: Repackaged Bundle Activator
Date Sun, 21 Feb 2016 13:50:32 GMT
Seems to indicate that dotCMS is relying on the brokenness of the gradle
version to work :)


https://discuss.gradle.org/t/the-osgi-plugin-has-several-flaws/2546/24

On Sun, Feb 21, 2016 at 8:41 AM, Jibie Job <jibie.job@gmail.com> wrote:

> Here's the gradle build in case you're curious :)
>
> I'll try the fixupmessages instruction. Thanks!
>
> apply plugin: 'application'
>
> apply plugin: 'osgi'
>
> apply plugin: 'war'
>
> apply plugin: 'eclipse'
>
>
> sourceCompatibility = '1.7'
>
> version = '0.1'
>
>
>
> repositories {
>
>         maven {
>
>         url "http://repo.dotcms.com/artifactory/libs-release"
>
>     }
>
> }
>
>
> dependencies {
>
>         compile fileTree(dir: 'src/main/resources/libs', include: '*.jar')
>
>         compile (group: 'com.dotcms', name: 'dotcms', version: '3.2.4'){
>
>                 transitive = true
>
>         }
>
>         providedCompile "javax.servlet:servlet-api:2.5"
>
> }
>
>
> jar {
>
>     manifest {
>
>         name = 'Osgi Custom service'
>
>         instruction 'Bundle-Vendor', 'dotcms'
>
>         instruction 'Bundle-Description', 'dotCMS - A bundle that creates
> a custom service'
>
>         instruction 'Bundle-DocURL', 'http://www.dotcms.com'
>
>         instruction 'Bundle-Activator',
> 'com.dotmarketing.osgi.service.Activator'
>
>         instruction 'DynamicImport-Package', '*'
>
>         instruction 'Import-Package', '*;version=0'
>
>     }
>
> }
>
>
> task wrapper(type: Wrapper) {
>
>     gradleVersion = '1.8'
>
> }
>
> On Sun, Feb 21, 2016 at 8:39 AM, Neil Bartlett <njbartlett@gmail.com>
> wrote:
>
>> So… dotCMS are doing something very odd using a hacked version of
>> OSGi/Felix. Mad! It’s possible they are also using a hacked version of bnd
>> in their Gradle builds.
>>
>> It may be possible to turn off this error message with the -fixupmessages
>> instruction in bnd:
>> http://bnd.bndtools.org/instructions/fixupmessages.html <
>> http://bnd.bndtools.org/instructions/fixupmessages.html>.
>>
>> Regards,
>> Neil
>>
>> > On 21 Feb 2016, at 13:30, Jibie Job <jibie.job@gmail.com> wrote:
>> >
>> > dotcms plugins are all expected to extend or implement from this
>> repackaged
>> > set of libraries and and I have verified that this does work when the
>> > manifest is built by hand and the plugin loaded into dotcms.
>> >
>> > here are some of their official examples:
>> > https://dotcms.com/docs/latest/osgi-services-plugin
>> >
>> > Is there some way to either direct the maven-bundle-plugin to either
>> > disable validations or get it to use the repackaged library prefix for
>> > validations?
>> >
>> > dotcms seems to use a gradle build with the osgi plugin which in turn
>> uses
>> > bnd and my guess is that it's not doing these validations
>> >
>> > So it's possible, but i'm not clear how to achieve the same effect with
>> the
>> > maven plugin.
>> >
>> > Thanks!
>> >
>> > On Sun, Feb 21, 2016 at 8:21 AM, Neil Bartlett <njbartlett@gmail.com>
>> wrote:
>> >
>> >> If you change the BundleActivator interface to a different package then
>> >> the runtime OSGi Framework will not recognise it as a valid activator.
>> So
>> >> this is probably not an error that should be ignored.
>> >>
>> >> Regards,
>> >> Neil
>> >>
>> >>
>> >>> On 21 Feb 2016, at 13:18, Jibie Job <jibie.job@gmail.com> wrote:
>> >>>
>> >>> I was trying to build an OSGI plugin for dotCMS using the
>> >>> maven-bundle-plugin (3.0.1) and am having an issue with the build
>> failing
>> >>> with an error:
>> >>>
>> >>> The Bundle Activator com.threeci.dotcms.services.Activator does not
>> >>> implement BundleActivator.
>> >>> The issue is due to dotCMS repackaging the standard osgi framework
>> >> packages
>> >>> under com.dotcms.repackage as
>> >>> com.dotcms.repackage.org.osgi.framework.BundleActivator which means
>> that
>> >>> the maven bundle tool is unable to successfully verify the Activator
>> >>> matches the expected interface.
>> >>>
>> >>> Is there a way to specify which interface should be used in the bundle
>> >>> activator check via the maven configuration?
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message