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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        18h 33m 1 Jean-Baptiste Onofré 23/Apr/12 15:01
        Resolved Resolved Closed Closed
        9d 22h 32m 1 Jamie goodyear 03/May/12 13:33
        Jamie goodyear made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jean-Baptiste Onofré made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jean-Baptiste Onofré made changes -
        Fix Version/s 3.0.0 [ 12316040 ]
        Jean-Baptiste Onofré made changes -
        Field Original Value New Value
        Fix Version/s 2.3.0 [ 12320554 ]
        Jean-Baptiste Onofré created 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