Description
Karaf 2.2.6 always generates the following warning whether the
features repository has a name or not.
"Feature repository doesn't have a name. The name will be mandatory in
the next Karaf version."
This is because the name is checked before the repository is loaded.
Can some please apply the following patch?
===== 8< =====
Index: src/test/resources/org/apache/karaf/features/repo1.xml
===================================================================
— src/test/resources/org/apache/karaf/features/repo1.xml (revision 1328930)
+++ src/test/resources/org/apache/karaf/features/repo1.xml (working copy)
@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<features>
+<features name="test">
<repository>urn:r1</repository>
<feature name="f1">
<config name="c1">
Index: src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
===================================================================
— src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java (revision
1328930)
+++ src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java (working
copy)
@@ -210,11 +210,11 @@
validateRepository(uri);
RepositoryImpl repo = null;
repo = new RepositoryImpl(uri);
+ repositories.put(uri, repo);
+ repo.load();
if (repo.getName() == null)
- repositories.put(uri, repo);
- repo.load();
callListeners(new RepositoryEvent(repo,
RepositoryEvent.EventType.RepositoryAdded, false));
features = null;
return repo;
===== 8< =====