karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: AW: Karaf 4.0.x Custom distribution
Date Mon, 20 Jun 2016 14:33:11 GMT
Hi Lukas,

Where are your kar located ? Only in your local repo ?

Regards
JB

On 06/20/2016 04:24 PM, Roedl Lukas wrote:
> Thanks to your responses I'm some steps further now ;-)
>
> I had to split the actual feature and the resources (icons, db, some extra configuration
files) into two separate kar/feature files because otherwise all features contained in the
original kar file with the resources was added as startup features in the startup.properties
which was not desired.
>
> 4 out of 5 times I get a very generic "Unable to build assembly: Error"
>
> Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.5:assembly (default-assembly)
on project asse
> mbly: Unable to build assembly: Error -> [Help 1]
> org.apache.karaf.features.internal.util.MultiException: Error
>          at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloa
> dManager.java:84) ~[?:?]
>          at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManag
> er.java:72) ~[?:?]
>          at org.apache.karaf.profile.assembly.Builder.bootStage(Builder.java:807) ~[?:?]
>          at org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:611)
~[?:?]
>          at org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:389)
~[?:?]
>          at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:392) ~[?:?]
>          at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:228) ~[?:?]
>          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
~[maven
> -core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          ... 20 more
> Wrapped by: org.apache.maven.plugin.MojoExecutionException: Unable to build assembly
>          at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:234) ~[?:?]
>          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
~[maven
> -core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          ... 20 more
> Wrapped by: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.karaf.tooling:
> karaf-maven-plugin:4.0.5:assembly (default-assembly) on project assembly: Unable to build
assembly
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
~
> [maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuil
> der.java:51) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
~[maven-core-3.3.
> 9.jar:3.3.9]
>          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) [maven-embedder-3.3.9.jar:3.3.9]
>          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) [maven-embedder-3.3.9.jar:3.3.9]
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) [maven-embedder-3.3.9.jar:3.3.9]
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
>          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
~[?:1.7.0_79]
>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.7.0_79]
>          at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[plexus-classworlds-2
> .5.2.jar:?]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[plexus-classworlds-2.5.2.jar
> :?]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[plexus-classworlds
> -2.5.2.jar:?]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[plexus-classworlds-2.5.2.jar:?
> ]
>   org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven
> -plugin:4.0.5:assembly (default-assembly) on project assembly: Unable to build assembly
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
~
> [maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuil
> der.java:51) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
~[maven-core-3.3.
> 9.jar:3.3.9]
>          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) ~[maven-core-3.3.9.jar:3.3.9]
>          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) [maven-embedder-3.3.9.jar:3.3.9]
>          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) [maven-embedder-3.3.9.jar:3.3.9]
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) [maven-embedder-3.3.9.jar:3.3.9]
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
>          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
~[?:1.7.0_79]
>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.7.0_79]
>          at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[plexus-classworlds-2
> .5.2.jar:?]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[plexus-classworlds-2.5.2.jar
> :?]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[plexus-classworlds
> -2.5.2.jar:?]
>          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[plexus-classworlds-2.5.2.jar:?
> ]
> Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to build assembly
>          at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:234) ~[?:?]
>          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
~[maven
> -core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          ... 20 more
> Caused by: org.apache.karaf.features.internal.util.MultiException: Error
>          at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloa
> dManager.java:84) ~[?:?]
>          at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManag
> er.java:72) ~[?:?]
>          at org.apache.karaf.profile.assembly.Builder.bootStage(Builder.java:807) ~[?:?]
>          at org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:611)
~[?:?]
>          at org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:389)
~[?:?]
>          at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:392) ~[?:?]
>          at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:228) ~[?:?]
>          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
~[maven
> -core-3.3.9.jar:3.3.9]
>          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
~[maven-core-3.3.9.jar:3.
> 3.9]
>          ... 20 more
>
>
> Any ides on that?
>
> Best,
> Lukas
>
> -----Ursprüngliche Nachricht-----
> Von: James Carman [mailto:james@carmanconsulting.com]
> Gesendet: Montag, 20. Juni 2016 13:01
> An: dev@karaf.apache.org
> Betreff: Re: Karaf 4.0.x Custom distribution
>
> Here is our custom Karaf build against 4.0.x and it is working. I know we faced some
issues also, but they are resolved now. I do not remember the details.
>
> https://github.com/savoirtech/aetos/tree/4.0.x?files=1
> On Mon, Jun 20, 2016 at 6:48 AM Roedl Lukas <Lukas.Roedl@ait.ac.at> wrote:
>
>> Hi!
>>
>> I'm currently trying to upgrade our custom distribution to the Karaf 4
>> way of doing things.
>> Unfortunately I'm experiencing some problems when compiling the
>> assembly when the karaf-maven-plugin tries to "Resolving features".
>> The errors look like the following:
>>
>> Failed to execute goal
>> org.apache.karaf.tooling:karaf-maven-plugin:4.0.5:assembly
>> (default-assembly) on project asse
>> mbly: Unable to build assembly: Unable to resolve root: missing
>> requirement [root] osgi.identity; osgi.identity=home r-core-minimal;
>> type=karaf.feature; version=1.2.31.SNAPSHOT;
>> filter:="(&(osgi.identity=homer-core-minimal)(type=kara
>> f.feature)(version>=1.2.31.SNAPSHOT))" [caused by: Unable to resolve
>> homer-core-minimal/1.2.31.SNAPSHOT: missing req uirement
>> [homer-core-minimal/1.2.31.SNAPSHOT] osgi.identity;
>> osgi.identity=aries-blueprint; type=karaf.feature] -> [ Help 1]
>>
>> It seems to be caused by my features linking to features out of the
>> Karaf "standard" or "enterprise" features set. It's not only affecting
>> "aries-blueprint" but also "log" or "eventadmin".
>> I setup a little test-project under [1] with the features file [2] and
>> further maven configuration to reproduce the errors.
>>
>> Did anyone also experience such errors and knows how to solve them?
>> Can I overcome this issue using the "prerequisite" or "dependency"
>> attribute for the linked feature?
>> Is it ok to link against Karaf features or can/must I assume that the
>> framework is properly configured beforehand?
>>
>> Thanks in advance,
>> Lukas
>>
>> [1] https://github.com/roedll/homer-karaf4-assembly-test
>> [2]
>> https://github.com/roedll/homer-karaf4-assembly-test/blob/master/featu
>> re/src/main/feature/feature.xml
>>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message