karaf-maven-plugin with static framework

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

karaf-maven-plugin with static framework

Alex Soto
Hello, 

I am trying to build a custom distribution using karaf-maven-plugin with Karaf version 4.2.6. To keep it to a minus, I have removed my feature, leaving only the following:

<startupFeatures>
<feature>static-framework</feature>
</startupFeatures>
<javase>1.8</javase>
<framework>static</framework>
<useReferenceUrls>true</useReferenceUrls>
<environment>static</environment>

Still, I get the following error:

Unable to build assembly: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=static-framework; type=karaf.feature; version=4.2.6; filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))" [caused by: Unable to resolve static-framework/4.2.6: missing requirement [static-framework/4.2.6] osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2; type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory [caused by: Unable to resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2] osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]


What am I missing?


Best regards,
Alex soto




Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

fpapon

Hi Alex,

Wich JDK are you using when building the custom distribution?

regards,

François
[hidden email]
Le 09/09/2019 à 19:05, Alex Soto a écrit :
Hello, 

I am trying to build a custom distribution using karaf-maven-plugin with Karaf version 4.2.6. To keep it to a minus, I have removed my feature, leaving only the following:

<startupFeatures>
<feature>static-framework</feature>
</startupFeatures>
<javase>1.8</javase>
<framework>static</framework>
<useReferenceUrls>true</useReferenceUrls>
<environment>static</environment>

Still, I get the following error:

Unable to build assembly: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=static-framework; type=karaf.feature; version=4.2.6; filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))" [caused by: Unable to resolve static-framework/4.2.6: missing requirement [static-framework/4.2.6] osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2; type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory [caused by: Unable to resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2] osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]


What am I missing?


Best regards,
Alex soto




François Papon
fpapon@apache.org
Yupiik - https://www.yupiik.com
Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

Alex Soto
Oracle’s JDK 1.8 Java 8 Update 171

Best regards,
Alex soto




On Sep 9, 2019, at 3:34 PM, Francois Papon <[hidden email]> wrote:

Hi Alex,

Wich JDK are you using when building the custom distribution?

regards,

François
[hidden email]
Le 09/09/2019 à 19:05, Alex Soto a écrit :
Hello, 

I am trying to build a custom distribution using karaf-maven-plugin with Karaf version 4.2.6. To keep it to a minus, I have removed my feature, leaving only the following:

<startupFeatures>
<feature>static-framework</feature>
</startupFeatures>
<javase>1.8</javase>
<framework>static</framework>
<useReferenceUrls>true</useReferenceUrls>
<environment>static</environment>

Still, I get the following error:

Unable to build assembly: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=static-framework; type=karaf.feature; version=4.2.6; filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))" [caused by: Unable to resolve static-framework/4.2.6: missing requirement [static-framework/4.2.6] osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2; type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory [caused by: Unable to resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2] osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]


What am I missing?


Best regards,
Alex soto





Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

Alex Soto
Comparing features “framework" and "static-framework" I noticed that "static-framework" feature does not add service mix activation API bundle, while “framework” does.


    <feature version="${project.version}" description="Karaf core feature" name="framework" hidden="true">
        <!-- persistent wiring extension -->
        <bundle start-level="1">mvn:org.apache.karaf.features/org.apache.karaf.features.extension/${project.version}</bundle>
        <!-- mvn: and wrap: url handlers -->
        <bundle start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/${pax.url.version}</bundle>
        <!-- logging -->
        <bundle start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
        <bundle start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
        <bundle start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
        <!-- config admin -->
        <bundle start-level="9">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
        <bundle start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/${felix.configadmin.version}</bundle>
        <!-- file install -->
        <bundle start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
        <!-- features service -->
        <bundle start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix-spec.version}</bundle>

        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-spec.version}</bundle>
    </feature>

<feature version="${project.version}" description="Karaf core feature" name="static-framework">
        <!-- logging -->
        <bundle start="true" start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
        <bundle start="true" start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
        <bundle start="true" start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
        <!-- static config admin -->
        <bundle start="true" start-level="10">mvn:org.apache.karaf.services/org.apache.karaf.services.staticcm/${project.version}</bundle>
    </feature>

Could this be a bug? Should “static-framework” also add Activation API bundle?

Best regards,
Alex soto




On Sep 9, 2019, at 3:40 PM, Alex Soto <[hidden email]> wrote:

Oracle’s JDK 1.8 Java 8 Update 171

Best regards,
Alex soto




On Sep 9, 2019, at 3:34 PM, Francois Papon <[hidden email]> wrote:

Hi Alex,

Wich JDK are you using when building the custom distribution?

regards,

François
[hidden email]
Le 09/09/2019 à 19:05, Alex Soto a écrit :
Hello, 

I am trying to build a custom distribution using karaf-maven-plugin with Karaf version 4.2.6. To keep it to a minus, I have removed my feature, leaving only the following:

<startupFeatures>
<feature>static-framework</feature>
</startupFeatures>
<javase>1.8</javase>
<framework>static</framework>
<useReferenceUrls>true</useReferenceUrls>
<environment>static</environment>

Still, I get the following error:

Unable to build assembly: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=static-framework; type=karaf.feature; version=4.2.6; filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))" [caused by: Unable to resolve static-framework/4.2.6: missing requirement [static-framework/4.2.6] osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2; type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory [caused by: Unable to resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2] osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]


What am I missing?


Best regards,
Alex soto






Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

Alex Soto
Anybody have any experience in this area?

My goal is produce a static distribution first, then Docker to deploy my application in the Cloud.   So far, I failed at the very first step the "static approach".
I am following direction from this blog entry  http://blog.nanthrax.net/?p=893 with the difference that my application features.xml is hand made, not generated.
Any help will be appreciated. 

Best regards,
Alex soto




On Sep 10, 2019, at 2:06 PM, Alex Soto <[hidden email]> wrote:

Comparing features “framework" and "static-framework" I noticed that "static-framework" feature does not add service mix activation API bundle, while “framework” does.


    <feature version="${project.version}" description="Karaf core feature" name="framework" hidden="true">
        <!-- persistent wiring extension -->
        <bundle start-level="1">mvn:org.apache.karaf.features/org.apache.karaf.features.extension/${project.version}</bundle>
        <!-- mvn: and wrap: url handlers -->
        <bundle start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/${pax.url.version}</bundle>
        <!-- logging -->
        <bundle start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
        <bundle start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
        <bundle start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
        <!-- config admin -->
        <bundle start-level="9">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
        <bundle start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/${felix.configadmin.version}</bundle>
        <!-- file install -->
        <bundle start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
        <!-- features service -->
        <bundle start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix-spec.version}</bundle>

        <bundle dependency="true" start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-spec.version}</bundle>
    </feature>

<feature version="${project.version}" description="Karaf core feature" name="static-framework">
        <!-- logging -->
        <bundle start="true" start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
        <bundle start="true" start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
        <bundle start="true" start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
        <!-- static config admin -->
        <bundle start="true" start-level="10">mvn:org.apache.karaf.services/org.apache.karaf.services.staticcm/${project.version}</bundle>
    </feature>

Could this be a bug? Should “static-framework” also add Activation API bundle?

Best regards,
Alex soto




On Sep 9, 2019, at 3:40 PM, Alex Soto <[hidden email]> wrote:

Oracle’s JDK 1.8 Java 8 Update 171

Best regards,
Alex soto




On Sep 9, 2019, at 3:34 PM, Francois Papon <[hidden email]> wrote:

Hi Alex,

Wich JDK are you using when building the custom distribution?

regards,

François
[hidden email]
Le 09/09/2019 à 19:05, Alex Soto a écrit :
Hello, 

I am trying to build a custom distribution using karaf-maven-plugin with Karaf version 4.2.6. To keep it to a minus, I have removed my feature, leaving only the following:

<startupFeatures>
<feature>static-framework</feature>
</startupFeatures>
<javase>1.8</javase>
<framework>static</framework>
<useReferenceUrls>true</useReferenceUrls>
<environment>static</environment>

Still, I get the following error:

Unable to build assembly: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=static-framework; type=karaf.feature; version=4.2.6; filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))" [caused by: Unable to resolve static-framework/4.2.6: missing requirement [static-framework/4.2.6] osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2; type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory [caused by: Unable to resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2] osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]


What am I missing?


Best regards,
Alex soto







Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

jbonofre
Hi Alex,

not sure you got my previous email.

I just tried the karaf-docker-example static package with just the
static-framework and it works fine.

I can also confirm that the blog post works fine, even with a features
XML that I created by hand (just tested).

Can you share your features.xml and your pom.xml with me ?

By the way, it's exactly what I'm presenting today at ApacheCon Las Vegas !

Regards
JB

On 12/09/2019 14:12, Alex Soto wrote:

> Anybody have any experience in this area?
>
> My goal is produce a static distribution first, then Docker to deploy my
> application in the Cloud.   So far, I failed at the very first step the
> "static approach".
> I am following direction from this blog entry
>  http://blog.nanthrax.net/?p=893 with the difference that my application
> /features.xml/ is hand made, not generated.
> Any help will be appreciated. 
>
> Best regards,
> Alex soto
>
>
>
>
>> On Sep 10, 2019, at 2:06 PM, Alex Soto <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Comparing features “framework" and "static-framework" I noticed that
>> "static-framework" feature does not add service mix activation API
>> bundle, while “framework” does.
>>
>>
>>     <featureversion="${project.version}"description="Karaf core
>> feature"name="framework"hidden="true">
>>         <!-- persistent wiring extension -->
>>         <bundle
>> start-level="1">mvn:org.apache.karaf.features/org.apache.karaf.features.extension/${project.version}</bundle>
>>         <!-- mvn: and wrap: url handlers -->
>>         <bundle
>> start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/${pax.url.version}</bundle>
>>         <!-- logging -->
>>         <bundle
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
>>         <bundle
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
>>         <bundle
>> start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
>>         <!-- config admin -->
>>         <bundle
>> start-level="9">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
>>         <bundle
>> start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/${felix.configadmin.version}</bundle>
>>         <!-- file install -->
>>         <bundle
>> start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
>>         <!-- features service -->
>>         <bundle
>> start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
>>         <bundle dependency="true"
>> start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix-spec.version}</bundle>
>>
>>         <bundle dependency="true"
>> start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-spec.version}</bundle>
>>     </feature>
>>
>> <featureversion="${project.version}"description="Karaf core
>> feature"name="static-framework">
>>         <!-- logging -->
>>         <bundle start="true"
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
>>         <bundle start="true"
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
>>         <bundle start="true"
>> start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
>>         <!-- static config admin -->
>>         <bundle start="true"
>> start-level="10">mvn:org.apache.karaf.services/org.apache.karaf.services.staticcm/${project.version}</bundle>
>>     </feature>
>>
>> Could this be a bug? Should “static-framework” also add Activation API
>> bundle?
>>
>> Best regards,
>> Alex soto
>>
>>
>>
>>
>>> On Sep 9, 2019, at 3:40 PM, Alex Soto <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>> Oracle’s JDK 1.8 Java 8 Update 171
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
>>>> On Sep 9, 2019, at 3:34 PM, Francois Papon
>>>> <[hidden email] <mailto:[hidden email]>>
>>>> wrote:
>>>>
>>>> Hi Alex,
>>>>
>>>> Wich JDK are you using when building the custom distribution?
>>>>
>>>> regards,
>>>>
>>>> François
>>>> [hidden email]
>>>> Le 09/09/2019 à 19:05, Alex Soto a écrit :
>>>>> Hello, 
>>>>>
>>>>> I am trying to build a custom distribution using karaf-maven-plugin
>>>>> with Karaf version 4.2.6. To keep it to a minus, I have removed my
>>>>> feature, leaving only the following:
>>>>>
>>>>> <startupFeatures>
>>>>> <feature>static-framework</feature>
>>>>> </startupFeatures>
>>>>> <javase>1.8</javase>
>>>>> <framework>static</framework>
>>>>> <useReferenceUrls>true</useReferenceUrls>
>>>>> <environment>static</environment>
>>>>>
>>>>> Still, I get the following error:
>>>>>
>>>>> Unable to build assembly: Unable to resolve root: missing
>>>>> requirement [root] osgi.identity; osgi.identity=static-framework;
>>>>> type=karaf.feature; version=4.2.6;
>>>>> filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))"
>>>>> [caused by: Unable to resolve static-framework/4.2.6: missing
>>>>> requirement [static-framework/4.2.6]
>>>>> osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2;
>>>>> type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory
>>>>> [caused by: Unable to
>>>>> resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing
>>>>> requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2]
>>>>> osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]
>>>>>
>>>>>
>>>>>
>>>>> What am I missing?
>>>>>
>>>>>
>>>>> Best regards,
>>>>> Alex soto
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

jbonofre
In reply to this post by Alex Soto
Here's what I tested on karaf-docker-example-static:

- remove reference to karaf-docker-example-app feature in pom.xml
<dependencies/>
- keep only the static-fraemwork feature like this:

                <configuration>
                    <startupFeatures>
                        <startupFeature>static-framework</startupFeature>
                    </startupFeatures>
                    <framework>static</framework>
                    <useReferenceUrls>true</useReferenceUrls>
                    <environment>static</environment>
                </configuration>

- build with mvn clean install
- run with: target/assembly/bin/karaf run

It works fine. Tested with both JDK8 and JDK11.

Regards
JB

On 12/09/2019 14:12, Alex Soto wrote:

> Anybody have any experience in this area?
>
> My goal is produce a static distribution first, then Docker to deploy my
> application in the Cloud.   So far, I failed at the very first step the
> "static approach".
> I am following direction from this blog entry
>  http://blog.nanthrax.net/?p=893 with the difference that my application
> /features.xml/ is hand made, not generated.
> Any help will be appreciated. 
>
> Best regards,
> Alex soto
>
>
>
>
>> On Sep 10, 2019, at 2:06 PM, Alex Soto <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Comparing features “framework" and "static-framework" I noticed that
>> "static-framework" feature does not add service mix activation API
>> bundle, while “framework” does.
>>
>>
>>     <featureversion="${project.version}"description="Karaf core
>> feature"name="framework"hidden="true">
>>         <!-- persistent wiring extension -->
>>         <bundle
>> start-level="1">mvn:org.apache.karaf.features/org.apache.karaf.features.extension/${project.version}</bundle>
>>         <!-- mvn: and wrap: url handlers -->
>>         <bundle
>> start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/${pax.url.version}</bundle>
>>         <!-- logging -->
>>         <bundle
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
>>         <bundle
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
>>         <bundle
>> start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
>>         <!-- config admin -->
>>         <bundle
>> start-level="9">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
>>         <bundle
>> start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/${felix.configadmin.version}</bundle>
>>         <!-- file install -->
>>         <bundle
>> start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
>>         <!-- features service -->
>>         <bundle
>> start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
>>         <bundle dependency="true"
>> start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix-spec.version}</bundle>
>>
>>         <bundle dependency="true"
>> start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-spec.version}</bundle>
>>     </feature>
>>
>> <featureversion="${project.version}"description="Karaf core
>> feature"name="static-framework">
>>         <!-- logging -->
>>         <bundle start="true"
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
>>         <bundle start="true"
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
>>         <bundle start="true"
>> start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
>>         <!-- static config admin -->
>>         <bundle start="true"
>> start-level="10">mvn:org.apache.karaf.services/org.apache.karaf.services.staticcm/${project.version}</bundle>
>>     </feature>
>>
>> Could this be a bug? Should “static-framework” also add Activation API
>> bundle?
>>
>> Best regards,
>> Alex soto
>>
>>
>>
>>
>>> On Sep 9, 2019, at 3:40 PM, Alex Soto <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>> Oracle’s JDK 1.8 Java 8 Update 171
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
>>>> On Sep 9, 2019, at 3:34 PM, Francois Papon
>>>> <[hidden email] <mailto:[hidden email]>>
>>>> wrote:
>>>>
>>>> Hi Alex,
>>>>
>>>> Wich JDK are you using when building the custom distribution?
>>>>
>>>> regards,
>>>>
>>>> François
>>>> [hidden email]
>>>> Le 09/09/2019 à 19:05, Alex Soto a écrit :
>>>>> Hello, 
>>>>>
>>>>> I am trying to build a custom distribution using karaf-maven-plugin
>>>>> with Karaf version 4.2.6. To keep it to a minus, I have removed my
>>>>> feature, leaving only the following:
>>>>>
>>>>> <startupFeatures>
>>>>> <feature>static-framework</feature>
>>>>> </startupFeatures>
>>>>> <javase>1.8</javase>
>>>>> <framework>static</framework>
>>>>> <useReferenceUrls>true</useReferenceUrls>
>>>>> <environment>static</environment>
>>>>>
>>>>> Still, I get the following error:
>>>>>
>>>>> Unable to build assembly: Unable to resolve root: missing
>>>>> requirement [root] osgi.identity; osgi.identity=static-framework;
>>>>> type=karaf.feature; version=4.2.6;
>>>>> filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))"
>>>>> [caused by: Unable to resolve static-framework/4.2.6: missing
>>>>> requirement [static-framework/4.2.6]
>>>>> osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2;
>>>>> type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory
>>>>> [caused by: Unable to
>>>>> resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing
>>>>> requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2]
>>>>> osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]
>>>>>
>>>>>
>>>>>
>>>>> What am I missing?
>>>>>
>>>>>
>>>>> Best regards,
>>>>> Alex soto
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

jbonofre
In reply to this post by Alex Soto
Just a quick update about Alex' issue.

You have to upgrade to 4.2.7-SNAPSHOT (or coming Karaf 4.2.7 release)
for both plugin and features. It should work out of the box.

Regards
JB

On 12/09/2019 14:12, Alex Soto wrote:

> Anybody have any experience in this area?
>
> My goal is produce a static distribution first, then Docker to deploy my
> application in the Cloud.   So far, I failed at the very first step the
> "static approach".
> I am following direction from this blog entry
>  http://blog.nanthrax.net/?p=893 with the difference that my application
> /features.xml/ is hand made, not generated.
> Any help will be appreciated. 
>
> Best regards,
> Alex soto
>
>
>
>
>> On Sep 10, 2019, at 2:06 PM, Alex Soto <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Comparing features “framework" and "static-framework" I noticed that
>> "static-framework" feature does not add service mix activation API
>> bundle, while “framework” does.
>>
>>
>>     <featureversion="${project.version}"description="Karaf core
>> feature"name="framework"hidden="true">
>>         <!-- persistent wiring extension -->
>>         <bundle
>> start-level="1">mvn:org.apache.karaf.features/org.apache.karaf.features.extension/${project.version}</bundle>
>>         <!-- mvn: and wrap: url handlers -->
>>         <bundle
>> start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/${pax.url.version}</bundle>
>>         <!-- logging -->
>>         <bundle
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
>>         <bundle
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
>>         <bundle
>> start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
>>         <!-- config admin -->
>>         <bundle
>> start-level="9">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
>>         <bundle
>> start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/${felix.configadmin.version}</bundle>
>>         <!-- file install -->
>>         <bundle
>> start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
>>         <!-- features service -->
>>         <bundle
>> start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
>>         <bundle dependency="true"
>> start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix-spec.version}</bundle>
>>
>>         <bundle dependency="true"
>> start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-spec.version}</bundle>
>>     </feature>
>>
>> <featureversion="${project.version}"description="Karaf core
>> feature"name="static-framework">
>>         <!-- logging -->
>>         <bundle start="true"
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
>>         <bundle start="true"
>> start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
>>         <bundle start="true"
>> start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
>>         <!-- static config admin -->
>>         <bundle start="true"
>> start-level="10">mvn:org.apache.karaf.services/org.apache.karaf.services.staticcm/${project.version}</bundle>
>>     </feature>
>>
>> Could this be a bug? Should “static-framework” also add Activation API
>> bundle?
>>
>> Best regards,
>> Alex soto
>>
>>
>>
>>
>>> On Sep 9, 2019, at 3:40 PM, Alex Soto <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>> Oracle’s JDK 1.8 Java 8 Update 171
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
>>>> On Sep 9, 2019, at 3:34 PM, Francois Papon
>>>> <[hidden email] <mailto:[hidden email]>>
>>>> wrote:
>>>>
>>>> Hi Alex,
>>>>
>>>> Wich JDK are you using when building the custom distribution?
>>>>
>>>> regards,
>>>>
>>>> François
>>>> [hidden email]
>>>> Le 09/09/2019 à 19:05, Alex Soto a écrit :
>>>>> Hello, 
>>>>>
>>>>> I am trying to build a custom distribution using karaf-maven-plugin
>>>>> with Karaf version 4.2.6. To keep it to a minus, I have removed my
>>>>> feature, leaving only the following:
>>>>>
>>>>> <startupFeatures>
>>>>> <feature>static-framework</feature>
>>>>> </startupFeatures>
>>>>> <javase>1.8</javase>
>>>>> <framework>static</framework>
>>>>> <useReferenceUrls>true</useReferenceUrls>
>>>>> <environment>static</environment>
>>>>>
>>>>> Still, I get the following error:
>>>>>
>>>>> Unable to build assembly: Unable to resolve root: missing
>>>>> requirement [root] osgi.identity; osgi.identity=static-framework;
>>>>> type=karaf.feature; version=4.2.6;
>>>>> filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))"
>>>>> [caused by: Unable to resolve static-framework/4.2.6: missing
>>>>> requirement [static-framework/4.2.6]
>>>>> osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2;
>>>>> type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory
>>>>> [caused by: Unable to
>>>>> resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing
>>>>> requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2]
>>>>> osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]
>>>>>
>>>>>
>>>>>
>>>>> What am I missing?
>>>>>
>>>>>
>>>>> Best regards,
>>>>> Alex soto
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: karaf-maven-plugin with static framework

Alex Soto
Thank you JB!

Best regards,
Alex soto




On Sep 13, 2019, at 9:33 AM, Jean-Baptiste Onofré <[hidden email]> wrote:

Just a quick update about Alex' issue.

You have to upgrade to 4.2.7-SNAPSHOT (or coming Karaf 4.2.7 release)
for both plugin and features. It should work out of the box.

Regards
JB

On 12/09/2019 14:12, Alex Soto wrote:
Anybody have any experience in this area?

My goal is produce a static distribution first, then Docker to deploy my
application in the Cloud.   So far, I failed at the very first step the
"static approach".
I am following direction from this blog entry
 http://blog.nanthrax.net/?p=893 with the difference that my application
/features.xml/ is hand made, not generated.
Any help will be appreciated. 

Best regards,
Alex soto




On Sep 10, 2019, at 2:06 PM, Alex Soto <[hidden email]
<[hidden email]>> wrote:

Comparing features “framework" and "static-framework" I noticed that
"static-framework" feature does not add service mix activation API
bundle, while “framework” does.


    <featureversion="${project.version}"description="Karaf core
feature"name="framework"hidden="true">
        <!-- persistent wiring extension -->
        <bundle
start-level="1">mvn:org.apache.karaf.features/org.apache.karaf.features.extension/${project.version}</bundle>
        <!-- mvn: and wrap: url handlers -->
        <bundle
start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/${pax.url.version}</bundle>
        <!-- logging -->
        <bundle
start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
        <bundle
start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
        <bundle
start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
        <!-- config admin -->
        <bundle
start-level="9">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
        <bundle
start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/${felix.configadmin.version}</bundle>
        <!-- file install -->
        <bundle
start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/${felix.fileinstall.version}</bundle>
        <!-- features service -->
        <bundle
start-level="15">mvn:org.apache.karaf.features/org.apache.karaf.features.core/${project.version}</bundle>
        <bundle dependency="true"
start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/${servicemix-spec.version}</bundle>

        <bundle dependency="true"
start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${servicemix-spec.version}</bundle>
    </feature>

<featureversion="${project.version}"description="Karaf core
feature"name="static-framework">
        <!-- logging -->
        <bundle start="true"
start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/${pax.logging.version}</bundle>
        <bundle start="true"
start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/${pax.logging.version}</bundle>
        <bundle start="true"
start-level="8">mvn:org.fusesource.jansi/jansi/${jansi.version}</bundle>
        <!-- static config admin -->
        <bundle start="true"
start-level="10">mvn:org.apache.karaf.services/org.apache.karaf.services.staticcm/${project.version}</bundle>
    </feature>

Could this be a bug? Should “static-framework” also add Activation API
bundle?

Best regards,
Alex soto




On Sep 9, 2019, at 3:40 PM, Alex Soto <[hidden email]
<[hidden email]>> wrote:

Oracle’s JDK 1.8 Java 8 Update 171

Best regards,
Alex soto




On Sep 9, 2019, at 3:34 PM, Francois Papon
<[hidden email] <[hidden email]>>
wrote:

Hi Alex,

Wich JDK are you using when building the custom distribution?

regards,

François
[hidden email]
Le 09/09/2019 à 19:05, Alex Soto a écrit :
Hello, 

I am trying to build a custom distribution using karaf-maven-plugin
with Karaf version 4.2.6. To keep it to a minus, I have removed my
feature, leaving only the following:

<startupFeatures>
<feature>static-framework</feature>
</startupFeatures>
<javase>1.8</javase>
<framework>static</framework>
<useReferenceUrls>true</useReferenceUrls>
<environment>static</environment>

Still, I get the following error:

Unable to build assembly: Unable to resolve root: missing
requirement [root] osgi.identity; osgi.identity=static-framework;
type=karaf.feature; version=4.2.6;
filter:="(&(osgi.identity=static-framework)(type=karaf.feature)(version>=4.2.6))"
[caused by: Unable to resolve static-framework/4.2.6: missing
requirement [static-framework/4.2.6]
osgi.identity; osgi.identity=org.ops4j.pax.logging.pax-logging-log4j2;
type=osgi.bundle; version="[1.10.2,1.10.2]"; resolution:=mandatory
[caused by: Unable to
resolve org.ops4j.pax.logging.pax-logging-log4j2/1.10.2: missing
requirement [org.ops4j.pax.logging.pax-logging-log4j2/1.10.2]
osgi.wiring.package; filter:="(osgi.wiring.package=javax.activation)”]]



What am I missing?


Best regards,
Alex soto








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