You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2017/03/22 18:46:39 UTC

[3/3] lucene-solr:jira/solr-10290: SOLR-10342: use ivy-version.properties and std build paths for ref-guide

SOLR-10342: use ivy-version.properties and std build paths for ref-guide


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/017b890f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/017b890f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/017b890f

Branch: refs/heads/jira/solr-10290
Commit: 017b890f7cdde1e1c7ec4b73ed8943db7eff370d
Parents: 183bfbe
Author: Chris Hostetter <ho...@apache.org>
Authored: Wed Mar 22 11:22:19 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Wed Mar 22 11:22:19 2017 -0700

----------------------------------------------------------------------
 lucene/ivy-versions.properties |  8 +++++++
 solr/solr-ref-guide/.gitignore |  1 -
 solr/solr-ref-guide/build.xml  | 48 ++++++++++++++++++-------------------
 solr/solr-ref-guide/ivy.xml    | 11 +++++----
 4 files changed, 37 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/017b890f/lucene/ivy-versions.properties
----------------------------------------------------------------------
diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index 7f57fed..cc03659 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -226,6 +226,10 @@ org.apache.uima.version = 2.3.1
 /org.apache.zookeeper/zookeeper = 3.4.6
 /org.aspectj/aspectjrt = 1.8.0
 
+# v1.5.3 of asciidoctor-ant includes asciidoctorj-pdf 1.5.0-alpha.11,
+# which is the same as asciidoctor-pdf 1.5.0-alpha.11
+/org.asciidoctor/asciidoctor-ant = 1.5.3
+
 org.bouncycastle.version = 1.45
 /org.bouncycastle/bcmail-jdk15 = ${org.bouncycastle.version}
 /org.bouncycastle/bcpkix-jdk15on = 1.47
@@ -284,6 +288,10 @@ org.iq80.leveldb.version = 0.7
 org.jboss.netty.netty.version = 3.2.4.Final
 /org.jboss.netty/netty = ${org.jboss.netty.netty.version}
 
+/org.json/json = 20160810
+
+/org.jsoup/jsoup = 1.8.2
+
 org.kitesdk.kite-morphlines.version = 1.1.0
 /org.kitesdk/kite-morphlines-avro = ${org.kitesdk.kite-morphlines.version}
 /org.kitesdk/kite-morphlines-core = ${org.kitesdk.kite-morphlines.version}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/017b890f/solr/solr-ref-guide/.gitignore
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/.gitignore b/solr/solr-ref-guide/.gitignore
deleted file mode 100644
index 567609b..0000000
--- a/solr/solr-ref-guide/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-build/

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/017b890f/solr/solr-ref-guide/build.xml
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/build.xml b/solr/solr-ref-guide/build.xml
index 84962c5..82a3905 100644
--- a/solr/solr-ref-guide/build.xml
+++ b/solr/solr-ref-guide/build.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
@@ -16,9 +17,9 @@
    specific language governing permissions and limitations
    under the License.    
 -->
-<project xmlns:asciidoctor="antlib:org.asciidoctor.ant" xmlns:ivy="antlib:org.apache.ivy.ant" >
+<project name="solr-ref-guide" default="default" xmlns:asciidoctor="antlib:org.asciidoctor.ant" >
 
-  <import file="../../lucene/common-build.xml"/>
+  <import file="../common-build.xml"/>
 
   <!-- properties to use in our docs -->
   <loadresource property="solr-docs-version">
@@ -42,51 +43,48 @@
   <property name="solr-javadocs" value="https://lucene.apache.org/solr/${solr-docs-version-path}/" />
   <property name="lucene-javadocs" value="https://lucene.apache.org/core/${solr-docs-version-path}/" />
 
-  <target name="resolve">
-    <mkdir dir="build/lib"/>
-    <ivy:retrieve type="jar,bundle" sync="${ivy.sync}" log="download-only" symlink="${ivy.symlink}"
-                  pattern="build/lib/[artifact]-[revision].[ext]" />
-  </target>
-
-  <property name="build.content.dir" location="build/content" />
+  <property name="build.content.dir" location="${build.dir}/content" />
   <property name="main-page" value="apache-solr-reference-guide" />
   <property name="pdf-filename" value="apache-solr-ref-guide-${solr-docs-version}.pdf" />
 
   <!-- ====== TOOLS FOR GENERATING/VALIDATING BITS OF THE SITE / PDF ======= -->
   <property name="tools-jar-name" value="solr-ref-guide-tools.jar" />
   <path id="tools-compile-classpath">
-    <fileset dir="build/lib">
+    <fileset dir="lib">
       <include name="**/*.jar"/>
       <exclude name="**/${tools-jar-name}" />
     </fileset>
   </path>
   <path id="tools-run-classpath">
-    <fileset dir="build/lib">
+    <fileset dir="lib">
+      <include name="**/*.jar"/>
+    </fileset>
+    <fileset dir="${build.dir}">
       <include name="**/*.jar"/>
     </fileset>
   </path>
 
   <target name="clean">
-    <delete dir="build"/>
+    <delete dir="${build.dir}"/>
   </target>
 
   <target name="build-tools-jar" depends="resolve" description="Builds the custom java tools use use for generating some data files from page metdata">
-    <mkdir dir="build/classes"/>
+    <mkdir dir="${build.dir}/classes"/>
     <javac debug="yes"
            debuglevel="source,lines,vars"
-           destdir="build/classes"
+           destdir="${build.dir}/classes"
            includeantruntime="false">
       <compilerarg value="-Xlint:all"/>
       <classpath refid="tools-compile-classpath"/>
       <src path="tools/"/>
     </javac>
-    <jar destfile="build/lib/${tools-jar-name}">
-      <fileset dir="build/classes"
+    <jar destfile="${build.dir}/${tools-jar-name}">
+      <fileset dir="${build.dir}/classes"
                includes="**/*.class"/>
     </jar>
   </target>
 
-  <target name="build-init" description="Prepares the build/content dir, copying over src files and transforming *.template files in the process">
+  <target name="build-init" description="Prepares the build's 'content' dir, copying over src files and transforming *.template files in the process">
     <delete dir="${build.content.dir}" />
     <mkdir dir="${build.content.dir}" />
     <echo>Copying all non template files from src ...</echo>
@@ -123,7 +121,7 @@
           failonerror="true"
           fork="true">
       <classpath refid="tools-run-classpath"/>
-      <arg value="${basedir}/build/html-site"/>
+      <arg value="${build.dir}/html-site"/>
     </java>
   </target>
   
@@ -137,7 +135,7 @@
                  sourceDirectory="${build.content.dir}/pdf"
                  sourceDocumentName="SolrRefGuide-all.adoc"
                  baseDir="${build.content.dir}"
-                 outputDirectory="build"
+                 outputDirectory="${build.dir}"
                  backend="pdf"
                  extensions="adoc"
                  sourceHighlighter="coderay"
@@ -165,8 +163,8 @@
       <attribute key="build-date" value="${DSTAMP}" />
       <attribute key="build-year" value="${current.year}" />
     </asciidoctor:convert>
-    <move file="build/SolrRefGuide-all.pdf" tofile="build/${pdf-filename}" />
-    <echo>Finished Building ${basedir}/build/${pdf-filename}</echo>
+    <move file="${build.dir}/SolrRefGuide-all.pdf" tofile="${build.dir}/${pdf-filename}" />
+    <echo>Finished Building ${build.dir}/${pdf-filename}</echo>
   </target>
 
   <!-- ======= HTML Site Build =======
@@ -179,14 +177,14 @@
     <exec executable="jekyll" dir="${build.content.dir}">
       <arg value="build"/>
     </exec>
-    <echo>Ready to browse site: ${basedir}/build/html-site/${main-page}.html</echo>
+    <echo>Ready to browse site: ${build.dir}/html-site/${main-page}.html</echo>
   </target>
 
-  <target name="build"
+  <target name="default"
           description="Builds both a PDF and HTML versions of the ref guide"
           depends="build-pdf,build-site">
-    <echo>PDF: ${basedir}/build/${pdf-filename}</echo>
-    <echo>SITE: ${basedir}/build/html-site/${main-page}.html</echo>
+    <echo>PDF: ${build.dir}/${pdf-filename}</echo>
+    <echo>SITE: ${build.dir}/html-site/${main-page}.html</echo>
   </target>
 
 </project>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/017b890f/solr/solr-ref-guide/ivy.xml
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/ivy.xml b/solr/solr-ref-guide/ivy.xml
index 47030bd..e59a845 100644
--- a/solr/solr-ref-guide/ivy.xml
+++ b/solr/solr-ref-guide/ivy.xml
@@ -18,11 +18,12 @@
 -->
 <ivy-module version="2.0">
   <info organisation="org.apache.solr" module="ref-guide-tools"/>
+  <configurations defaultconfmapping="compile->master">
+    <conf name="compile" transitive="false" />
+  </configurations>
   <dependencies>
-    <!-- v1.5.3 of asciidoctor-ant includes asciidoctorj-pdf 1.5.0-alpha.11,
-         which is the same as asciidoctor-pdf 1.5.0-alpha.11  -->
-    <dependency org="org.asciidoctor" name="asciidoctor-ant" rev="1.5.3" />
-    <dependency org="org.json" name="json" rev="20160810" />
-    <dependency org="org.jsoup" name="jsoup" rev="1.8.2" />
+    <dependency org="org.asciidoctor" name="asciidoctor-ant" rev="${/org.asciidoctor/asciidoctor-ant}" conf="compile" />
+    <dependency org="org.json" name="json" rev="${/org.json/json}" conf="compile" />
+    <dependency org="org.jsoup" name="jsoup" rev="${/org.jsoup/jsoup}" conf="compile" />
   </dependencies>
 </ivy-module>