Skip to content

Commit

Permalink
Updated build files - so that ant/ivy is happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Oct 27, 2014
1 parent b14f52d commit 6fd7dce
Show file tree
Hide file tree
Showing 8 changed files with 335 additions and 58 deletions.
61 changes: 32 additions & 29 deletions common-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@

<property name="common.classpath.excludes" value="**/*.txt,**/*.template,**/*.sha1" />

<property name="ivy.bootstrap.version" value="2.2.0" />
<property name="ivy.resource" value="org/apache/ivy/ant/antlib.xml" />
<available resource="${ivy.resource}" property="ivy.available" />
<property name="ivy.default.configuration" value="*"/>
<property name="ivy.sync" value="true"/>
<property name="ivy.bootstrap.version" value="2.3.0" />
<property name="ivy.default.configuration" value="*"/>
<property name="ivy.sync" value="true"/>

<property name="junit.jar" value="junit-4.10.jar"/>
<property name="junit-location.jar" value="${common.dir}/lib/${junit.jar}"/>
Expand Down Expand Up @@ -320,29 +318,36 @@
</target>

<target name="ivy-configure">
<!-- [DW] ivy loses its configuration for some reason. cannot explain this. if
you have an idea, fix it.
unless="ivy.settings.uptodate" -->
<!-- override: just for safety, should be unnecessary -->
<ivy:configure file="${common.dir}/ivy-settings.xml" override="true"/>
<!-- <property name="ivy.settings.uptodate" value="true"/> -->
</target>

<target name="resolve" depends="ivy-availability-check,ivy-fail,ivy-configure">
<!-- todo, make this a property or something.
only special cases need bundles -->
<ivy:retrieve type="jar,bundle" log="download-only"
conf="${ivy.default.configuration}"/>
</target>
<!-- [DW] ivy loses its configuration for some reason. cannot explain this. if
you have an idea, fix it.
unless="ivy.settings.uptodate" -->
<!-- override: just for safety, should be unnecessary -->
<ivy:configure file="${common.dir}/ivy-settings.xml" override="true"/>
<!-- <property name="ivy.settings.uptodate" value="true"/> -->
</target>

<target name="resolve" depends="ivy-availability-check,ivy-configure">
<!-- todo, make this a property or something.
only special cases need bundles -->
<ivy:retrieve type="jar,bundle,test,test-jar,tests" log="download-only"
conf="${ivy.default.configuration}" sync="${ivy.sync}"/>
</target>

<property name="ivy_install_path" location="${user.home}/.ant/lib" />
<property name="ivy_bootstrap_url1" value="http://repo1.maven.org/maven2"/>
<!-- you might need to tweak this from china so it works -->
<property name="ivy_bootstrap_url2" value="http://mirror.netcologne.de/maven2"/>
<property name="ivy_checksum_sha1" value="f9d1e83e82fc085093510f7d2e77d81d52bc2081"/>
<property name="ivy_bootstrap_url1" value="http://repo1.maven.org/maven2"/>
<!-- you might need to tweak this from china so it works -->
<property name="ivy_bootstrap_url2" value="http://uk.maven.org/maven2"/>
<property name="ivy_checksum_sha1" value="c5ebf1c253ad4959a29f4acfe696ee48cdd9f473"/>

<target name="ivy-availability-check" unless="ivy.available">
<echo>
<condition property="ivy.available">
<typefound uri="antlib:org.apache.ivy.ant" name="configure" />
</condition>
<antcall target="ivy-fail" />
</target>

<target name="ivy-fail" unless="ivy.available">
<echo>
This build requires Ivy and Ivy could not be found in your ant classpath.

(Due to classpath issues and the recursive nature of the Lucene/Solr
Expand Down Expand Up @@ -374,11 +379,9 @@
try using the "--noconfig" option when running ant, or editing your global
ant config to allow the user lib to be loaded. See the wiki for more details:
http://wiki.apache.org/lucene-java/HowToContribute#antivy
</echo>
</target>
<target name="ivy-fail" unless="ivy.available">
<fail>Ivy is not available</fail>
</target>
</echo>
<fail>Ivy is not available</fail>
</target>
<target name="ivy-bootstrap" description="Download and install Ivy in the users ant lib dir" depends="ivy-bootstrap1,ivy-bootstrap2,ivy-checksum"/>

<!-- try to download from repo1.maven.org -->
Expand Down
18 changes: 15 additions & 3 deletions contrib/adsabs/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,22 @@
<dependencies>
<dependency org="org.antlr" name="antlr" rev="3.4" transitive="false"/>
<dependency org="org.python" name="jython-standalone" rev="2.7-b1" transitive="false"/>

<dependency org="org.eclipse.jetty.orbit" name="javax.servlet" rev="3.0.0.v201112011016" transitive="false" conf="servlet->default">

<dependency org="org.eclipse.jetty" name="jetty-continuation" rev="${/org.eclipse.jetty/jetty-continuation}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-deploy" rev="${/org.eclipse.jetty/jetty-deploy}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-http" rev="${/org.eclipse.jetty/jetty-http}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-io" rev="${/org.eclipse.jetty/jetty-io}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-jmx" rev="${/org.eclipse.jetty/jetty-jmx}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-security" rev="${/org.eclipse.jetty/jetty-security}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-server" rev="${/org.eclipse.jetty/jetty-server}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-servlet" rev="${/org.eclipse.jetty/jetty-servlet}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-util" rev="${/org.eclipse.jetty/jetty-util}" transitive="false" />
<dependency org="org.eclipse.jetty" name="jetty-webapp" rev="${/org.eclipse.jetty/jetty-webapp}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-xml" rev="${/org.eclipse.jetty/jetty-xml}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty" name="jetty-start" rev="${/org.eclipse.jetty/jetty-start}" transitive="false" conf="servlet->default"/>
<dependency org="org.eclipse.jetty.orbit" name="javax.servlet" rev="${/org.eclipse.jetty.orbit/javax.servlet}" transitive="false" conf="servlet->default">
<artifact name="javax.servlet" type="orbit" ext="jar"/>
</dependency>
</dependency>

<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ public void testSpecialCases() throws Exception {


// added ability to interactively tweak queries
assertQueryEquals(req("defType", "aqp", "q", "tweak(collector_final_value=ARITHM_MEAN, citations(author:muller))"),
"SecondOrderQuery(author:muller, author:muller,*, filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))",
assertQueryEquals(req("defType", "aqp", "q", "tweak(collector_final_value=ARITHM_MEAN, citations(author:foo))"),
"SecondOrderQuery(author:foo, author:foo,*, filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))",
SecondOrderQuery.class);


Expand Down Expand Up @@ -522,57 +522,57 @@ public void testSpecialCases() throws Exception {
*/

// references()
assertQueryEquals(req("defType", "aqp", "q", "references(author:muller)"),
"SecondOrderQuery(author:muller, author:muller,*, filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))", SecondOrderQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "references(author:foo)"),
"SecondOrderQuery(author:foo, author:foo,*, filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))", SecondOrderQuery.class);


// various searches
assertQueryEquals(req("defType", "aqp", "q", "all:x OR all:z references(author:muller OR title:body)"),
"+(all:x all:z) +SecondOrderQuery((author:muller, author:muller,*) title:body, filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))", BooleanQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "all:x OR all:z references(author:foo OR title:body)"),
"+(all:x all:z) +SecondOrderQuery((author:foo, author:foo,*) title:body, filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))", BooleanQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "citations((title:(lectures physics) and author:Feynman))"),
"SecondOrderQuery(+(+title:lectures +title:physics) +(author:feynman, author:feynman,*), filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))",
SecondOrderQuery.class);



// citations()
assertQueryEquals(req("defType", "aqp", "q", "citations(author:muller)"),
"SecondOrderQuery(author:muller, author:muller,*, filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))", SecondOrderQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "citations(author:foo)"),
"SecondOrderQuery(author:foo, author:foo,*, filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))", SecondOrderQuery.class);


// useful() - ads classic implementation
assertQueryEquals(req("defType", "aqp", "q", "useful(author:muller)"),
"SecondOrderQuery(SecondOrderQuery(SecondOrderQuery(author:muller, author:muller,*, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))",
assertQueryEquals(req("defType", "aqp", "q", "useful(author:foo)"),
"SecondOrderQuery(SecondOrderQuery(SecondOrderQuery(author:foo, author:foo,*, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))",
SecondOrderQuery.class);

assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) useful(author:muller OR title:body)"),
"+(all:x all:z) +SecondOrderQuery(SecondOrderQuery(SecondOrderQuery((author:muller, author:muller,*) title:body, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))",
assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) useful(author:foo OR title:body)"),
"+(all:x all:z) +SecondOrderQuery(SecondOrderQuery(SecondOrderQuery((author:foo, author:foo,*) title:body, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitesRAM(cache:citations-cache))",
BooleanQuery.class);


// useful2() - original implementation
assertQueryEquals(req("defType", "aqp", "q", "useful2(author:muller)"),
"SecondOrderQuery(author:muller, author:muller,*, filter=null, collector=SecondOrderCollectorOperatorExpertsCiting(cache=citations-cache, boost=float[] cite_read_boost))", SecondOrderQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "useful2(author:foo)"),
"SecondOrderQuery(author:foo, author:foo,*, filter=null, collector=SecondOrderCollectorOperatorExpertsCiting(cache=citations-cache, boost=float[] cite_read_boost))", SecondOrderQuery.class);

assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) useful2(author:muller OR title:body)"),
"+(all:x all:z) +SecondOrderQuery((author:muller, author:muller,*) title:body, filter=null, collector=SecondOrderCollectorOperatorExpertsCiting(cache=citations-cache, boost=float[] cite_read_boost))", BooleanQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) useful2(author:foo OR title:body)"),
"+(all:x all:z) +SecondOrderQuery((author:foo, author:foo,*) title:body, filter=null, collector=SecondOrderCollectorOperatorExpertsCiting(cache=citations-cache, boost=float[] cite_read_boost))", BooleanQuery.class);


// reviews() - ADS classic impl
assertQueryEquals(req("defType", "aqp", "q", "reviews(author:muller)"),
"SecondOrderQuery(SecondOrderQuery(SecondOrderQuery(author:muller, author:muller,*, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))",
assertQueryEquals(req("defType", "aqp", "q", "reviews(author:foo)"),
"SecondOrderQuery(SecondOrderQuery(SecondOrderQuery(author:foo, author:foo,*, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))",
SecondOrderQuery.class);

assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) reviews(author:muller OR title:body)"),
"+(all:x all:z) +SecondOrderQuery(SecondOrderQuery(SecondOrderQuery((author:muller, author:muller,*) title:body, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))",
assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) reviews(author:foo OR title:body)"),
"+(all:x all:z) +SecondOrderQuery(SecondOrderQuery(SecondOrderQuery((author:foo, author:foo,*) title:body, filter=null, collector=SecondOrderCollectorAdsClassicScoringFormula(cache=citations-cache, boost=float[] cite_read_boost, outOfOrder=false, lucene=0.5, adsPart=0.5)), filter=null, collector=SecondOrderCollectorTopN(200, outOfOrder=false)), filter=null, collector=SecondOrderCollectorCitedBy(cache:citations-cache))",
BooleanQuery.class);

// reviews2() - original impl
assertQueryEquals(req("defType", "aqp", "q", "reviews2(author:muller)"),
"SecondOrderQuery(author:muller, author:muller,*, filter=null, collector=SecondOrderCollectorCitingTheMostCited(cache=citations-cache, boost=float[] cite_read_boost))", SecondOrderQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "reviews2(author:foo)"),
"SecondOrderQuery(author:foo, author:foo,*, filter=null, collector=SecondOrderCollectorCitingTheMostCited(cache=citations-cache, boost=float[] cite_read_boost))", SecondOrderQuery.class);

assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) reviews2(author:muller OR title:body)"),
"+(all:x all:z) +SecondOrderQuery((author:muller, author:muller,*) title:body, filter=null, collector=SecondOrderCollectorCitingTheMostCited(cache=citations-cache, boost=float[] cite_read_boost))", BooleanQuery.class);
assertQueryEquals(req("defType", "aqp", "q", "all:(x OR z) reviews2(author:foo OR title:body)"),
"+(all:x all:z) +SecondOrderQuery((author:foo, author:foo,*) title:body, filter=null, collector=SecondOrderCollectorCitingTheMostCited(cache=citations-cache, boost=float[] cite_read_boost))", BooleanQuery.class);

// classic_relevance() - cr()
assertQueryEquals(req("defType", "aqp", "q", "classic_relevance(title:foo)"),
Expand Down
4 changes: 3 additions & 1 deletion contrib/antlrqueryparser/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
<path refid="classpath"/>
<pathelement location="${build.dir}/classes/test" />
<fileset dir="${common.dir}/contrib/antlrqueryparser/lib">
<include name="**/antlr*complete*.jar"/>
<include name="**/antlr-3*.jar"/>
<include name="**/ST4*.jar"/>
<include name="**/stringtemplate*.jar"/>
</fileset>
</path>

Expand Down
1 change: 1 addition & 0 deletions contrib/antlrqueryparser/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<dependency org="org.antlr" name="antlr-runtime" rev="3.4" transitive="false"/>
<dependency org="org.antlr" name="antlr" rev="3.4" transitive="false"/>
<dependency org="org.antlr" name="ST4" rev="4.0.4"/>

<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
Expand Down
Binary file removed contrib/antlrqueryparser/lib/antlr-3.4-complete.jar
Binary file not shown.
29 changes: 28 additions & 1 deletion ivy-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,47 @@
<ivysettings>
<settings defaultResolver="default"/>

<property name="local-maven2-dir" value="${user.home}/.m2/repository/" />

<properties file="${ivy.settings.dir}/ivy-versions.properties" override="false"/>

<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>

<caches lockStrategy="artifact-lock" resolutionCacheDir="${common.build.dir}/ivy-resolution-cache" />

<resolvers>
<ibiblio name="sonatype-releases" root="http://oss.sonatype.org/content/repositories/releases" m2compatible="true" />
<ibiblio name="maven.restlet.org" root="http://maven.restlet.org" m2compatible="true" />
<ibiblio name="cloudera" root="http://repository.cloudera.com/artifactory/repo" m2compatible="true" />
<ibiblio name="releases.cloudera.com" root="http://repository.cloudera.com/content/repositories/releases" m2compatible="true" />

<!-- needed only for newer svnkit releases, e.g. 1.8.x -->
<ibiblio name="svnkit-releases" root="http://maven.tmatesoft.com/content/repositories/releases" m2compatible="true" />

<!-- you might need to tweak this from china so it works -->
<ibiblio name="working-chinese-mirror" root="http://mirror.netcologne.de/maven2" m2compatible="true" />
<ibiblio name="working-chinese-mirror" root="http://uk.maven.org/maven2" m2compatible="true" />

<!--
<filesystem name="local-maven-2" m2compatible="true" local="true">
<artifact
pattern="${local-maven2-dir}/[organisation]/[module]/[revision]/[module]-[revision].[ext]" />
<ivy
pattern="${local-maven2-dir}/[organisation]/[module]/[revision]/[module]-[revision].pom" />
</filesystem>
-->

<chain name="default" returnFirst="true" checkmodified="true" changingPattern=".*SNAPSHOT">
<resolver ref="local"/>
<!-- <resolver ref="local-maven-2" /> -->
<resolver ref="main"/>
<resolver ref="cloudera"/>
<resolver ref="releases.cloudera.com"/>
<resolver ref="sonatype-releases" />
<resolver ref="maven.restlet.org" />
<resolver ref="svnkit-releases" />
<resolver ref="working-chinese-mirror" />
</chain>
</resolvers>
Expand Down
Loading

0 comments on commit 6fd7dce

Please sign in to comment.