karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erwin Hogeweg <erwin.hoge...@me.com>
Subject Karaf-4.2.0 - "Unknown protocol: mvn" exception running custom distro - Reproducible
Date Fri, 11 May 2018 19:01:26 GMT
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>


Mime
View raw message