Karaf
  1. Karaf
  2. KARAF-1387

Warning to missing a feature repository name even when the name is defined

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.6
    • Fix Version/s: 2.2.7, 2.3.0
    • Component/s: karaf-feature
    • Labels:
      None

      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)

      { LOGGER.warn("Feature repository doesn't have a name. The name will be mandatory in the next Karaf version."); }
      • repositories.put(uri, repo);
      • repo.load();
        callListeners(new RepositoryEvent(repo,
        RepositoryEvent.EventType.RepositoryAdded, false));
        features = null;
        return repo;
        ===== 8< =====

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Jean-Baptiste Onofré
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development