Karaf-4.2.0 - "Unknown protocol: mvn" exception running custom distro - Reproducible

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

Karaf-4.2.0 - "Unknown protocol: mvn" exception running custom distro - Reproducible

Erwin Hogeweg
Hi,

Looks like I hit a brick wall with this one. 

I am attempting to build a custom distro with 4.2.0 but I can’t get past this exception:

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:230)

As soon as I add the webconsole feature to bootFeatures I get the exception when I start the distro. I might get past that exception by moving features around but then it blows up with another feature. Also tried moving the addt’l features as startupFeatures but that doesn’t change a bit either. I must be missing something but I don’t see it.

Any help is greatly appreciated.

Kind Regards,

Erwin

I am running
- Java-1.8.0_92b14
- Karaf 4.1.0
- OS X 10.13.4

Entire pom below.

<?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">

<modelVersion>4.0.0</modelVersion>

<groupId>com.group</groupId>
<artifactId>my-distribution</artifactId>
<packaging>karaf-assembly</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>My :: Karaf Distribution</name>

<properties>
<karaf.version>4.2.0</karaf.version>
</properties>

<dependencies>
<dependency>
<!-- scope is compile so all features (there is only one) are installed 
into startup.properties and the feature repo itself is not added in etc/org.apache.karaf.features.cfg 
file -->
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>${karaf.version}</version>
<type>kar</type>
</dependency>
<dependency>
<!-- scope is runtime so the feature repo is listed in etc/org.apache.karaf.features.cfg 
file, and features will installed into the system directory -->
<groupId>org.apache.karaf.features</groupId>
<artifactId>enterprise</artifactId>
<version>${karaf.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>

</dependencies>

<build>
<!-- if you want to include resources in the distribution -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>src/main/filtered-resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>

<plugins>
<!-- karaf-maven-plugin will call both assembly and archive goals -->
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${karaf.version}</version>
<extensions>true</extensions>
<configuration>
<bootFeatures>
<feature>standard</feature>
<feature>eventadmin</feature>
<feature>aries-blueprint</feature>
<feature>scr</feature>
<feature>webconsole</feature> 
<!— 
Exception gone when moving webconsole here.
-->
</bootFeatures>
<startupFeatures>
</startupFeatures>
</configuration>
</plugin>
</plugins>
</build>
</project>

Reply | Threaded
Open this post in threaded view
|

Re: Karaf-4.2.0 - "Unknown protocol: mvn" exception running custom distro - Reproducible

Mike Gingell
I am having the same issue.  Were you able to solve this?
Thanks,
 - Mike



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Karaf-4.2.0 - "Unknown protocol: mvn" exception running custom distro - Reproducible

Erwin Hogeweg
Hi Mike,

I added the webconsole feature as a requirement to the project feature.xml and removed it from the disco pom.xml.

    <feature name=“rome" version="${project.version}" description="Rome :: Server Karaf Feature">
        <feature prerequisite="true">cxf-jaxrs</feature>
        <feature prerequisite="true">cxf-dosgi-discovery-local</feature>
        <feature>webconsole</feature>
        <feature>war</feature>
...

That solved the problem for me but I don’t understand it yet. I am eagerly awaiting the 4.2.1 release because JB mentioned he added some info and examples re. custom distros.


Regards,

Erwin

On Aug 2, 2018, at 10:57, Mike Gingell <[hidden email]> wrote:

I am having the same issue.  Were you able to solve this?
Thanks,
- Mike



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply | Threaded
Open this post in threaded view
|

Re: Karaf-4.2.0 - "Unknown protocol: mvn" exception running custom distro - Reproducible

jbonofre
Hi,

that's probably because your boot features set is not complete.

What do you have there ?

It's important to not have only standard but all boot features.

Regards
JB

On 05/08/2018 14:22, Erwin Hogeweg wrote:

> Hi Mike,
>
> I added the webconsole feature as a requirement to the project
> feature.xml and removed it from the disco pom.xml.
>
>     <featurename=“rome"version="${project.version}"description="Rome ::
> Server Karaf Feature">
>         <feature prerequisite="true">cxf-jaxrs</feature>
>         <feature prerequisite="true">cxf-dosgi-discovery-local</feature>
>         <feature>webconsole</feature>
>         <feature>war</feature>
> ...
>
> That solved the problem for me but I don’t understand it yet. I am
> eagerly awaiting the 4.2.1 release because JB mentioned he added some
> info and examples re. custom distros.
>
>
> Regards,
>
> Erwin
>
>> On Aug 2, 2018, at 10:57, Mike Gingell <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> I am having the same issue.  Were you able to solve this?
>> Thanks,
>> - Mike
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

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

Re: Karaf-4.2.0 - "Unknown protocol: mvn" exception running custom distro - Reproducible

Eric Lilja
Sounds like pax-url-link is not available

On Sun, Aug 5, 2018 at 5:40 PM Jean-Baptiste Onofré <[hidden email]> wrote:
Hi,

that's probably because your boot features set is not complete.

What do you have there ?

It's important to not have only standard but all boot features.

Regards
JB

On 05/08/2018 14:22, Erwin Hogeweg wrote:
> Hi Mike,
>
> I added the webconsole feature as a requirement to the project
> feature.xml and removed it from the disco pom.xml.
>
>     <featurename=“rome"version="${project.version}"description="Rome ::
> Server Karaf Feature">
>         <feature prerequisite="true">cxf-jaxrs</feature>
>         <feature prerequisite="true">cxf-dosgi-discovery-local</feature>
>         <feature>webconsole</feature>
>         <feature>war</feature>
> ...
>
> That solved the problem for me but I don’t understand it yet. I am
> eagerly awaiting the 4.2.1 release because JB mentioned he added some
> info and examples re. custom distros.
>
>
> Regards,
>
> Erwin
>
>> On Aug 2, 2018, at 10:57, Mike Gingell <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> I am having the same issue.  Were you able to solve this?
>> Thanks,
>> - Mike
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

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