Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 4.0.1
-
Fix Version/s: 4.0.4
-
Component/s: None
-
Labels:None
-
Environment:
Windows
Description
I have observed following behavior: there is a feature containing a repository URL inside the feature.xml:
<?xml version="1.0" encoding="UTF-8"?> <features name="${project.artifactId}-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0 http://karaf.apache.org/xmlns/features/v1.0.0 "> <repository>mvn:org.mycompany/thirdparty-features/9.9.9/xml</repository> <feature name="test-bad" version="${project.version}"> <feature>thirdparty-commons</feature> </feature> </features>
The repository URL mvn:org.mycompany/thirdparty-features/9.9.9/xml is not exist and cannot be resolved.
I specify the feature URL in org.apache.karaf.features.cfg featuresRepositories, but NOT mention the feature in featuresBoot:
featuresRepositories = \
mvn:org.apache.karaf.features/enterprise/4.0.1/xml/features, \
mvn:org.apache.karaf.features/framework/4.0.1/xml/features, \
mvn:org.apache.karaf.features/spring/4.0.1/xml/features, \
mvn:org.apache.karaf.features/standard/4.0.1/xml/features,\
mvn:org.mycompany/test-bad/1.0.0-SNAPSHOT/xml
#
# Comma separated list of features to install at startup
#
featuresBoot = \
aries-blueprint, \
bundle, \
config, \
deployer, \
diagnostic, \
feature, \
instance, \
jaas, \
kar, \
log, \
management, \
package, \
service, \
shell, \
shell-compat, \
ssh, \
system, \
wrap
Current behavior:
1) Karaf writes error message in the log file:
java.io.IOException: Error resolving artifact org.mycompany:thirdparty-features:xml:9.9.9: Could not find artifact org.mycompany:thirdparty-features:xml:9.9.9 in central (http://repo1.maven.org/maven2/) : mvn:org.mycompany/thirdparty-features/9.9.9/xml
(absolutely correct)
2) further startup process is completely blocked (problem)
Expected behavior: write error message and continue startup process: feature is not specified in featuresBoot and must not be installed.
Interesting, if unresolved feature URL is specified directly in featuresRepositories, Karaf proceed it correctly: writes error message, but continues startup. Blocking appears only if unresolved URL is specified inside the feature.xml.
Attachments
Issue Links
- is related to
-
KARAF-4083 Reference to the invalid repository in feature file breaks commands
-
- Resolved
-