You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2019/10/17 13:52:00 UTC
[jira] [Commented] (KARAF-6459) Unknown protocol mvn when including
eventadmin feature
[ https://issues.apache.org/jira/browse/KARAF-6459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953761#comment-16953761 ]
Freeman Yue Fang commented on KARAF-6459:
-----------------------------------------
Hi [~timo.e.aus.e],
This is a known issue, caused by bundles refreshment after installing eventadmin feature.
To avoid this, you need to put
{code}
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<version>4.2.6</version>
<classifier>features</classifier>
<type>xml</type>
<scope>compile</scope>
</dependency>
{code}
in compile scope but the runtime. Also you need to put eventadmin feature into <startupFeatures> instead of <bootFeatures> , you can take a look at [discussion here|http://karaf.922171.n3.nabble.com/Karaf-4-2-4-Custom-distribution-with-ActiveMQ-5-15-9-fails-during-start-td4055549.html] to get more details
Freeman
> Unknown protocol mvn when including eventadmin feature
> ------------------------------------------------------
>
> Key: KARAF-6459
> URL: https://issues.apache.org/jira/browse/KARAF-6459
> Project: Karaf
> Issue Type: Question
> Components: karaf
> Affects Versions: 4.1.7, 4.2.6
> Reporter: Timo E aus E
> Assignee: Freeman Yue Fang
> Priority: Major
>
> I'm trying to build a custom Karaf distribution based on version 4.2.6. using maven-plugin. I took the example from hereĀ [https://github.com/apache/karaf/blob/master/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml]
> and added some boot features I need.
> Distribution is build by {{mvn clean install}}, Maven 3.6.2, Oracle Java 1.8.0_202
> My pom.xml is
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <!--
> Licensed to the Apache Software Foundation (ASF) under one or more
> contributor license agreements. See the NOTICE file distributed with
> this work for additional information regarding copyright ownership.
> The ASF licenses this file to You under the Apache License, Version 2.0
> (the "License"); you may not use this file except in compliance with
> the License. You may obtain a copy of the License at
> http://www.apache.org/licenses/LICENSE-2.0
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the License for the specific language governing permissions and
> limitations under the License.
> -->
> <modelVersion>4.0.0</modelVersion>
> <groupId>karaf-demo</groupId>
> <version>0.0.1-SNAPSHOT</version>
> <artifactId>karaf-assembly-demo</artifactId>
> <name>Apache Karaf :: Examples :: Maven :: Assembly</name>
> <packaging>karaf-assembly</packaging>
> <dependencies>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>framework</artifactId>
> <version>4.2.6</version>
> <type>kar</type>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>standard</artifactId>
> <version>4.2.6</version>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.karaf.tooling</groupId>
> <artifactId>karaf-maven-plugin</artifactId>
> <version>4.2.6</version>
> <extensions>true</extensions>
> <configuration>
> <finalName>${project.artifactId}</finalName>
> <bootFeatures>
> <feature>standard</feature>
> <feature>bundle</feature>
> <feature>config</feature>
> <feature>diagnostic</feature>
> <feature>feature</feature>
> <feature>shell</feature>
> <feature>log</feature>
> <feature>management</feature>
> <feature>package</feature>
> <feature>shell-compat</feature>
> <feature>ssh</feature>
> <feature>system</feature>
> <feature>wrap</feature>
> <feature>http-whiteboard</feature>
> <feature>deployer</feature>
> <feature>service</feature>
> <feature>kar</feature>
> <feature>scr</feature>
> <feature>aries-blueprint</feature>
> <feature>eventadmin</feature>
> </bootFeatures>
> <archiveZip>false</archiveZip>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> {code}
> This works fine as long as I don't include {{eventadmin}}. If it is included running the dist by {{target/assembly/bin/karaf clean}} results in
> {code}
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.FeaturesServiceImpl] : Unknown protocol: mvn
> java.net.MalformedURLException: Unknown protocol: mvn
> at java.net.URL.<init>(URL.java:627)
> at java.net.URL.<init>(URL.java:490)
> at java.net.URL.<init>(URL.java:439)
> at org.apache.karaf.features.internal.service.FeatureConfigInstaller.installConfigurationFile(FeatureConfigInstaller.java:268)
> at org.apache.karaf.features.internal.service.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:155)
> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installConfigs(BundleInstallSupportImpl.java:301)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installConfigs(FeaturesServiceImpl.java:1178)
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:955)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> at org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
> at java.net.URL.<init>(URL.java:622)
> ... 13 more
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller] : Error installing boot features
> java.net.MalformedURLException: Unknown protocol: mvn
> at java.net.URL.<init>(URL.java:627)
> at java.net.URL.<init>(URL.java:490)
> at java.net.URL.<init>(URL.java:439)
> at org.apache.karaf.features.internal.service.FeatureConfigInstaller.installConfigurationFile(FeatureConfigInstaller.java:268)
> at org.apache.karaf.features.internal.service.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:155)
> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installConfigs(BundleInstallSupportImpl.java:301)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installConfigs(FeaturesServiceImpl.java:1178)
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:955)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> at org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
> at java.net.URL.<init>(URL.java:622)
> ... 13 more
> {code}
> I guess I miss a dependent feature or bundle. For version 4.0.10 including eventadmin works.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)