Update to Hibernate Search 5.0.0-SNAPSHOT
Delete deprecated InfinispanDirectory
Pom updates
Merge updates from lucene-directory-v4 into lucene-directory-v3
Remove module lucene-v4
No longer need a LuceneVersionDetector and Reflection to use the appropriate implementations
Remove more old stuff
update tests to new Lucene 4 API
New needed dependency for tests
EXCLUSIONS
Apply all package renaming via a replacement script

This is the applied script:

    find . -type f -name \*.java -o -name \*.xml | xargs sed -i '' -f ~/sources/Lucene4Migration.sedscript

where Lucene4Migration.sedscript contains:

s/org.apache.lucene.util.collections.IntToDoubleMap/org.apache.lucene.facet.collections.IntToDoubleMap/g
s/org.apache.lucene.search.Similarity/org.apache.lucene.search.similarities.Similarity/g
s/org.apache.lucene.analysis.KeywordAnalyzer/org.apache.lucene.analysis.core.KeywordAnalyzer/g
s/org.apache.lucene.analysis.SimpleAnalyzer/org.apache.lucene.analysis.core.SimpleAnalyzer/g
s/org.apache.lucene.analysis.StopAnalyzer/org.apache.lucene.analysis.core.StopAnalyzer/g
s/org.apache.solr.analysis.TokenizerFactory/org.apache.lucene.analysis.util.TokenizerFactory/g
s/org.apache.lucene.util.ReaderUtil/org.apache.lucene.index.ReaderUtil/g
s/org.apache.solr.analysis.CharFilterFactory/org.apache.lucene.analysis.util.CharFilterFactory/g
s/org.apache.lucene.analysis.CharTokenizer/org.apache.lucene.analysis.util.CharTokenizer/g
s/org.apache.lucene.search.DefaultSimilarity/org.apache.lucene.search.similarities.DefaultSimilarity/g
s/org.apache.solr.analysis.TokenFilterFactory/org.apache.lucene.analysis.util.TokenFilterFactory/g
s/org.apache.lucene.analysis.ASCIIFoldingFilter/org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilter/g
s/org.apache.solr.analysis.HTMLStripCharFilterFactory/org.apache.lucene.analysis.charfilter.HTMLStripCharFilterFactory/g
s/org.apache.solr.analysis.ASCIIFoldingFilterFactory/org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilterFactory/g
s/org.apache.solr.analysis.LengthFilterFactory/org.apache.lucene.analysis.miscellaneous.LengthFilterFactory/g
s/org.apache.solr.analysis.LowerCaseFilterFactory/org.apache.lucene.analysis.core.LowerCaseFilterFactory/g
s/org.apache.solr.analysis.LowerCaseTokenizerFactory/org.apache.lucene.analysis.core.LowerCaseTokenizerFactory/g
s/org.apache.solr.analysis.MappingCharFilterFactory/org.apache.lucene.analysis.charfilter.MappingCharFilterFactory/g
s/org.apache.solr.analysis.ShingleFilterFactory/org.apache.lucene.analysis.shingle.ShingleFilterFactory/g
s/org.apache.solr.analysis.PorterStemFilterFactory/org.apache.lucene.analysis.en.PorterStemFilterFactory/g
s/org.apache.solr.analysis.SnowballPorterFilterFactory/org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory/g
s/org.apache.solr.analysis.StandardFilterFactory/org.apache.lucene.analysis.standard.StandardFilterFactory/g
s/org.apache.solr.analysis.StandardTokenizerFactory/org.apache.lucene.analysis.standard.StandardTokenizerFactory/g
s/org.apache.solr.analysis.StopFilterFactory/org.apache.lucene.analysis.core.StopFilterFactory/g
s/org.apache.solr.analysis.SynonymFilterFactory/org.apache.lucene.analysis.synonym.SynonymFilterFactory/g
s/org.apache.solr.analysis.TrimFilterFactory/org.apache.lucene.analysis.miscellaneous.TrimFilterFactory/g
s/org.apache.solr.analysis.WordDelimiterFilterFactory/org.apache.lucene.analysis.miscellaneous.WordDelimiterFilterFactory/g
s/org.apache.solr.analysis.PhoneticFilterFactory/org.apache.lucene.analysis.phonetic.PhoneticFilterFactory/g
s/org.apache.solr.analysis.PatternTokenizerFactory/org.apache.lucene.analysis.pattern.PatternTokenizerFactory/g
s/org.apache.lucene.queryParser.ParseException/org.apache.lucene.queryparser.classic.ParseException/g
s/org.apache.lucene.queryParser.QueryParser/org.apache.lucene.queryparser.classic.QueryParser/g
s/org.apache.lucene.queryParser.MultiFieldQueryParser/org.apache.lucene.queryparser.classic.MultiFieldQueryParser/g
s/org.apache.solr.analysis.GermanStemFilterFactory/org.apache.lucene.analysis.de.GermanStemFilterFactory/g
s/org.apache.solr.analysis.NGramFilterFactory/org.apache.lucene.analysis.ngram.NGramFilterFactory/g
s/org.apache.lucene.index.TermPositions/org.apache.lucene.index.DocsAndPositionsEnum/g
s/import org.apache.lucene.document.NumericField;/\/\/NumericField was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.document.FieldSelector;/\/\/FieldSelector was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.index.TermDocs;/\/\/TermDocs was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.index.TermEnum;/\/\/TermEnum was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.index.TermFreqVector;/\/\/TermFreqVector was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.document.FieldSelector;/\/\/FieldSelector was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.index.TermVectorMapper;/\/\/TermVectorMapper was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.document.Fieldable;/\/\/Fieldable was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.document.MapFieldSelector;/\/\/MapFieldSelector was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.index.Payload;/\/\/Payload was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.analysis.tokenattributes.TermAttribute;/\/\/TermAttribute was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.document.FieldSelectorResult;/\/\/FieldSelectorResult was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.index.TermPositionVector;/\/\/org.apache.lucene.index.TermPositionVector was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.index.TermVectorOffsetInfo;/\/\/org.apache.lucene.index.TermVectorOffsetInfo was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.lucene.util.SortedVIntList;/\/\/SortedVIntList was removed in Lucene 4 with no alternative replacement/g
s/import org.apache.solr.analysis.BaseTokenFilterFactory;/\/\/org.apache.solr.analysis.BaseTokenFilterFactory was removed in Lucene 4 with no alternative replacement/g