|
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< ===== Thanks, Tim |
|
Hi Tim,
I'm going to create a Jira and apply your patch. Thanks for the update, Regards JB On 04/22/2012 09:08 PM, Tim Moloney wrote: > 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< ===== > > Thanks, > Tim -- Jean-Baptiste Onofré [hidden email] http://blog.nanthrax.net Talend - http://www.talend.com |
|
In reply to this post by Tim Moloney
I created:
https://issues.apache.org/jira/browse/KARAF-1387 I will review and apply tonight. Regards JB On 04/22/2012 09:08 PM, Tim Moloney wrote: > 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< ===== > > Thanks, > Tim -- Jean-Baptiste Onofré [hidden email] http://blog.nanthrax.net Talend - http://www.talend.com |
| Powered by Nabble | Edit this page |
