common.compile-core:
[javac] Compiling 1 source file to C:\wip\solr\trunk\solr\build\contrib\solr
-auth\classes\java
[javac] C:\wip\solr\trunk\solr\contrib\auth\src\java\org\apache\solr\auth\Ma
nifoldCFSecurityFilter.java:163: cannot find symbol
[javac] symbol : class BooleanFilter
[javac] location: class org.apache.solr.auth.ManifoldCFSecurityFilter
[javac] BooleanFilter bf = new BooleanFilter();
[javac] ^
… and many others, despite:
import org.apache.lucene.index.*;
import org.apache.lucene.search.*;
import org.apache.solr.search.*;
So, clearly the compilation classpath is not correct.
Karl
From: ext Steven A Rowe [mailto:[email protected]]
Sent: Friday, September 16, 2011 4:04 PM
To: [email protected]
Subject: RE: How to access a Lucene contrib package from a Solr contrib package?
The lucene-libs/ dir doesn’t need to be created for compilation.
What problem(s) are you seeing, exactly?
From: [email protected] [mailto:[email protected]]
Sent: Friday, September 16, 2011 3:57 PM
To: [email protected]
Subject: RE: How to access a Lucene contrib package from a Solr contrib package?
Thanks for the reply!
Unfortunately, there must be something more to it. This is what I have:
>>>>>>
<project name="solr-auth" default="default">
<description>
Solr Integration with ManifoldCF, for repository document authorization
</description>
<import file="../contrib-build.xml"/>
<path id="classpath">
<pathelement path="${queries.jar}"/>
<path refid="solr.base.classpath"/>
</path>
<target name="module-jars-to-solr" depends="jar-queries">
<mkdir dir="${build.dir}/lucene-libs"/>
<copy todir="${build.dir}/lucene-libs" preservelastmodified="true"
flatten="true" failonerror="true" overwrite="true">
<fileset file="${queries.jar}"/>
</copy>
</target>
<target name="compile-core" depends="jar-queries,
solr-contrib-build.compile-core"/>
<target name="dist" depends="module-jars-to-solr, common-solr.dist"/>
</project>
<<<<<<
The lucene-libs directory is not even created. I experimented by adding
“module-jars-to-solr” to the compile-core depends, but that didn’t help either.
Any further suggestions?
Karl
From: ext Steven A Rowe [mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Friday, September 16, 2011 3:09 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: How to access a Lucene contrib package from a Solr contrib package?
Hi Karl,
Take a look at solr/contrib/analysis-extras/build.xml – it should provide a
good model for how to do this.
The redefined “compile-core” target invokes the “jar-*” targets in order to
produce the lucene modules’ jars on which there is a dependency, then invokes
the “solr-contrib-build.compile-core” to do the compilation work.
The redefined “classpath” path includes the depended-on lucene modules’ jars,
which are built prior to compilation by the redefined “compile-core” target.
The referenced “jar-*” targets, which build the named lucene modules’ jars, are
defined in lucene/contrib-build.xml. If what you need isn’t already defined
there, you can add it using the existing definitions as templates.
The redefined “dist” target depends on the “contrib-jars-to-solr” copies the
depended-on lucene module jars over to where they will be collected when the
Solr war is built, then invokes the “common-solr.dist” target to do the basic
distribution work.
Steve
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Friday, September 16, 2011 2:33 PM
To: [email protected]<mailto:[email protected]>
Subject: How to access a Lucene contrib package from a Solr contrib package?
Hi folks,
I’m trying to turn SOLR-1895 into a real contrib module but I’m having some
trouble with the ant build for it. Specifically, the module needs the lucene
contrib jar lucene-queries.jar, but I don’t know the right way to indicate that
in my new solr/contrib/auth/build.xml file. Does anyone know how this was
intended to work?
Karl