Index: solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java =================================================================== --- solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java (revision 1332892) +++ solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java (working copy) @@ -30,6 +30,8 @@ import java.util.*; import java.util.concurrent.ConcurrentHashMap; +import org.apache.lucene.analysis.util.ResourceLoaderAware; +import org.apache.solr.common.ResourceLoader; import org.apache.solr.handler.admin.CoreAdminHandler; import org.apache.solr.handler.component.ShardHandlerFactory; import org.slf4j.Logger; @@ -49,14 +51,12 @@ import org.apache.solr.analysis.TokenFilterFactory; import org.apache.solr.analysis.TokenizerFactory; import org.apache.solr.util.FileUtils; -import org.apache.lucene.analysis.util.ResourceLoader; import org.apache.solr.common.SolrException; import org.apache.solr.handler.component.SearchComponent; import org.apache.solr.request.SolrRequestHandler; import org.apache.solr.response.QueryResponseWriter; import org.apache.solr.schema.FieldType; import org.apache.solr.update.processor.UpdateRequestProcessorFactory; -import org.apache.lucene.analysis.util.ResourceLoaderAware; import org.apache.solr.util.plugin.SolrCoreAware; import org.apache.solr.search.QParserPlugin; @@ -447,6 +447,10 @@ assertAwareCompatibility( SolrCoreAware.class, obj ); waitingForCore.add( (SolrCoreAware)obj ); } + if (org.apache.solr.util.plugin.ResourceLoaderAware.class.isInstance(obj)) { + log.warn("Class [{}] uses org.apache.solr.util.plugin.ResourceLoaderAware " + + "which is deprecated. Change to org.apache.lucene.analysis.util.ResourceLoaderAware.", cname); + } if( obj instanceof ResourceLoaderAware ) { assertAwareCompatibility( ResourceLoaderAware.class, obj ); waitingForResources.add( (ResourceLoaderAware)obj ); @@ -479,6 +483,10 @@ if (!live) { //TODO: Does SolrCoreAware make sense here since in a multi-core context // which core are we talking about ? + if (org.apache.solr.util.plugin.ResourceLoaderAware.class.isInstance(obj)) { + log.warn("Class [{}] uses org.apache.solr.util.plugin.ResourceLoaderAware " + + "which is deprecated. Change to org.apache.lucene.analysis.util.ResourceLoaderAware.", cname); + } if( obj instanceof ResourceLoaderAware ) { assertAwareCompatibility( ResourceLoaderAware.class, obj ); waitingForResources.add( (ResourceLoaderAware)obj ); @@ -513,6 +521,10 @@ assertAwareCompatibility( SolrCoreAware.class, obj ); waitingForCore.add( (SolrCoreAware)obj ); } + if (org.apache.solr.util.plugin.ResourceLoaderAware.class.isInstance(obj)) { + log.warn("Class [{}] uses org.apache.solr.util.plugin.ResourceLoaderAware " + + "which is deprecated. Change to org.apache.lucene.analysis.util.ResourceLoaderAware.", cName); + } if( obj instanceof ResourceLoaderAware ) { assertAwareCompatibility( ResourceLoaderAware.class, obj ); waitingForResources.add( (ResourceLoaderAware)obj ); Index: solr/core/src/java/org/apache/solr/util/plugin/ResourceLoaderAware.java =================================================================== --- solr/core/src/java/org/apache/solr/util/plugin/ResourceLoaderAware.java (revision 0) +++ solr/core/src/java/org/apache/solr/util/plugin/ResourceLoaderAware.java (revision 0) @@ -0,0 +1,26 @@ +package org.apache.solr.util.plugin; + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @deprecated This interface has ben kept for backwards compatibility and will + * be removed in (5.0). Use {@link org.apache.lucene.analysis.util.ResourceLoaderAware}. + */ +@Deprecated +public interface ResourceLoaderAware extends org.apache.lucene.analysis.util.ResourceLoaderAware { +} Index: solr/solrj/src/java/org/apache/solr/common/ResourceLoader.java =================================================================== --- solr/solrj/src/java/org/apache/solr/common/ResourceLoader.java (revision 0) +++ solr/solrj/src/java/org/apache/solr/common/ResourceLoader.java (revision 0) @@ -0,0 +1,26 @@ +package org.apache.solr.common; + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @deprecated This interface has ben kept for backwards compatibility and will + * be removed in (5.0). Use {@link org.apache.lucene.analysis.util.ResourceLoader} + */ +@Deprecated +public interface ResourceLoader extends org.apache.lucene.analysis.util.ResourceLoader { +}