svn commit: r523149 - in /xml/xindice/trunk: ./ bin/xindice bin/xindice.bat bin/xindice.jar.bat bin/xindice.jar.sh bin/xindice.war.bat bin/xindice.war.sh build.properties build.xml xindice.bat xindice.sh

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: vgritsenko
Date: Tue Mar 27 19:53:46 2007
New Revision: 523149

URL: http://svn.apache.org/viewvc?view=rev&rev=523149
Log:
moving jar and war from dist/ to ./
remove separate bin/xindice files for different releases,
make do with single file.

Removed:
    xml/xindice/trunk/bin/xindice.jar.bat
    xml/xindice/trunk/bin/xindice.jar.sh
    xml/xindice/trunk/bin/xindice.war.bat
    xml/xindice/trunk/bin/xindice.war.sh
Modified:
    xml/xindice/trunk/   (props changed)
    xml/xindice/trunk/bin/xindice
    xml/xindice/trunk/bin/xindice.bat
    xml/xindice/trunk/build.properties
    xml/xindice/trunk/build.xml
    xml/xindice/trunk/xindice.bat
    xml/xindice/trunk/xindice.sh

Propchange: xml/xindice/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Mar 27 19:53:46 2007
@@ -6,3 +6,7 @@
 *.iws
 *.ipr
 *.iml
+xindice-1.*.jar
+xindice-dom-1.*.jar
+xindice-1.*.war
+xindice-1.*.xml

Modified: xml/xindice/trunk/bin/xindice
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/bin/xindice?view=diff&rev=523149&r1=523148&r2=523149
==============================================================================
--- xml/xindice/trunk/bin/xindice (original)
+++ xml/xindice/trunk/bin/xindice Tue Mar 27 19:53:46 2007
@@ -18,7 +18,7 @@
 # $Id$
 
 # -----------------------------------------------------------------------------
-# Xindice Command Line Tool Unix Shell Script for SRC distribution
+# Xindice @VERSION@ Command Line Tool Unix Shell Script
 # -----------------------------------------------------------------------------
 
 # ----- OS specific support ----------------------------------------------------
@@ -34,7 +34,6 @@
            ;;
 esac
 
-
 # ----- Verify and Set Required Environment Variables -------------------------
 
 if [ "$JAVA_HOME" = "" ] ; then
@@ -44,8 +43,11 @@
 
 if [ "$XINDICE_HOME" = "" ] ; then
   XINDICE_HOME=`dirname $0`/..
-  echo "WARNING: The environment variable XINDICE_HOME is not set."
-  echo "         Defaulting to $XINDICE_HOME"
+  if [ ! -f $XINDICE_HOME/xindice-1*.jar ] ; then
+    echo ERROR: You must set XINDICE_HOME to point at your
+    echo        Xindice installation directory.
+    exit 2
+  fi
 fi
 
 if [ "$XINDICE_DB_HOME" = "" ] ; then XINDICE_DB_HOME=$XINDICE_HOME ; fi
@@ -58,7 +60,7 @@
 
 CP=
 for i in `ls $XINDICE_HOME/lib/*.jar` ; do CP=$CP:$i ; done
-for i in `ls $XINDICE_HOME/dist/xindice*.jar` ; do CP=$CP:$i ; done
+for i in `ls $XINDICE_HOME/xindice*.jar` ; do CP=$CP:$i ; done
 
 
 # ----- Run Tools --------------------------------------------------------------

Modified: xml/xindice/trunk/bin/xindice.bat
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/bin/xindice.bat?view=diff&rev=523149&r1=523148&r2=523149
==============================================================================
--- xml/xindice/trunk/bin/xindice.bat (original)
+++ xml/xindice/trunk/bin/xindice.bat Tue Mar 27 19:53:46 2007
@@ -17,7 +17,7 @@
 :: $Id$
 
 :: -----------------------------------------------------------------------------
-:: Xindice Command Line Tool Win32/Win16 Script for SRC distribution
+:: Xindice @VERSION@ Command Line Tool Win32/Win16 Script
 :: -----------------------------------------------------------------------------
 
 if not "%OS%"=="Windows_NT" goto start
@@ -36,14 +36,12 @@
 if not "%_XINDICE_HOME%" == "" goto gotXindiceHome
 :: ----- Use the location of this script
 set _XINDICE_HOME=%~dp0..
-if not exist "%_XINDICE_HOME%\dist\xindice*.jar" goto noXindiceHome
-echo WARNING: The environment variable XINDICE_HOME is not set.
-echo          Defaulting to %_XINDICE_HOME%
+if not exist "%_XINDICE_HOME%\xindice-1*.jar" goto noXindiceHome
 goto gotXindiceHome
 
 :noXindiceHome
 echo ERROR: You must set XINDICE_HOME to point at your
-echo        Xindice WEB-INF directory.
+echo        Xindice installation directory.
 goto end
 
 :gotXindiceHome
@@ -64,7 +62,7 @@
 
 set LOCALCLASSPATH=
 for %%i in ("%_XINDICE_HOME%\java\lib\*.jar") do call "%_XINDICE_HOME%\bin\lcp.bat" %%i
-for %%i in ("%_XINDICE_HOME%\dist\xindice*.jar") do call "%_XINDICE_HOME%\bin\lcp.bat" %%i
+for %%i in ("%_XINDICE_HOME%\xindice*.jar") do call "%_XINDICE_HOME%\bin\lcp.bat" %%i
 
 
 :: ----- Check Command Line Arguments ------------------------------------------

Modified: xml/xindice/trunk/build.properties
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/build.properties?view=diff&rev=523149&r1=523148&r2=523149
==============================================================================
--- xml/xindice/trunk/build.properties (original)
+++ xml/xindice/trunk/build.properties Tue Mar 27 19:53:46 2007
@@ -114,7 +114,7 @@
 test.report.dir=${build.dir}/test-report
 api.dir=${build.dir}/api
 eclipse.temp=${build.dir}/temp
-dist.dir=dist
+release.dir=${build.dir}/dist
 
 # Examples directories
 examples.dir=${root.dir}/examples

Modified: xml/xindice/trunk/build.xml
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/build.xml?view=diff&rev=523149&r1=523148&r2=523149
==============================================================================
--- xml/xindice/trunk/build.xml (original)
+++ xml/xindice/trunk/build.xml Tue Mar 27 19:53:46 2007
@@ -52,8 +52,10 @@
     <!--
       - Build definitions
       -->
+    <fileset id="endorsed.jars" dir="${jar.dir}/endorsed">
+        <include name="*.jar"/>
+    </fileset>
     <fileset id="core.jars" dir="${jar.dir}">
-        <include name="endorsed/*.jar"/>
         <include name="*.jar"/>
         <exclude name="servlet*.jar"/>
     </fileset>
@@ -71,11 +73,17 @@
         <!-- compiled classes directory -->
         <pathelement location="${dom.build.dir}"/>
         <pathelement location="${src.build.dir}"/>
+        <fileset refid="endorsed.jars"/>
         <fileset refid="core.jars"/>
         <fileset refid="servlet.jars"/>
         <fileset refid="tools.jars"/>
     </path>
 
+    <property name="jar.file" value="${project.filename}-${project.version}.jar"/>
+    <property name="dom.file" value="${project.filename}-dom-${project.version}.jar"/>
+    <property name="war.file" value="${project.filename}-${project.version}.war"/>
+    <property name="xml.file" value="${project.filename}-${project.version}.xml"/>
+
     <target name="init">
         <tstamp/>
         <filter token="VERSION" value="${project.version}"/>
@@ -89,11 +97,10 @@
             description="Compiles all the source code">
     </target>
     <target name="build" depends="compile, jar, war"
-            description="* Builds Xindice jar and war files in the dist directory">
+            description="* Builds Xindice jar and war files in the current directory">
     </target>
-    <target name="clean" description="Cleans out all generates files">
+    <target name="clean" depends="jar-clean, war-clean" description="Cleans out all generates files">
         <delete dir="${build.dir}"/>
-        <delete dir="${dist.dir}"/>
     </target>
 
     <!--
@@ -101,13 +108,15 @@
       -->
     <target name="compile-src" depends="init, clover.on">
         <mkdir dir="${dom.build.dir}"/>
-        <javac srcdir="${dom.src.dir}" destdir="${dom.build.dir}" debug="${compile.debug}" optimize="${compile.optimize}" nowarn="${compile.nowarn}" deprecation="${compile.deprecation}" verbose="${compile.verbose}">
+        <javac srcdir="${dom.src.dir}" destdir="${dom.build.dir}"
+               debug="${compile.debug}" optimize="${compile.optimize}" nowarn="${compile.nowarn}" deprecation="${compile.deprecation}" verbose="${compile.verbose}">
             <classpath>
                 <path refid="project.class.path"/>
             </classpath>
         </javac>
         <mkdir dir="${src.build.dir}"/>
-        <javac srcdir="${src.dir}" destdir="${src.build.dir}" debug="${compile.debug}" optimize="${compile.optimize}" nowarn="${compile.nowarn}" deprecation="${compile.deprecation}" verbose="${compile.verbose}">
+        <javac srcdir="${src.dir}" destdir="${src.build.dir}"
+               debug="${compile.debug}" optimize="${compile.optimize}" nowarn="${compile.nowarn}" deprecation="${compile.deprecation}" verbose="${compile.verbose}">
             <classpath>
                 <path path="${dom.build.dir}"/>
                 <path refid="project.class.path"/>
@@ -251,11 +260,21 @@
 
 
     <!--
+      - Prepare bin files
+      -->
+    <target name="bin" depends="init">
+        <mkdir dir="${build.dir}/bin"/>
+        <copy toDir="${build.dir}/bin" filtering="on">
+            <fileset dir="${bin.dir}"/>
+        </copy>
+    </target>
+
+
+    <!--
       - Build the Xindice archives (jar and war)
       -->
     <target name="jar" depends="compile">
-        <mkdir dir="${dist.dir}"/>
-        <jar jarfile="${dist.dir}/${project.filename}-${project.version}.jar"
+        <jar jarfile="${jar.file}"
              basedir="${src.build.dir}">
             <manifest>
                 <attribute name="Built-By" value="${user.name}"/>
@@ -273,7 +292,7 @@
             </manifest>
             <metainf dir="." includes="LICENSE,NOTICE"/>
         </jar>
-        <jar jarfile="${dist.dir}/${project.filename}-dom-${project.version}.jar" basedir="${dom.build.dir}">
+        <jar jarfile="${dom.file}" basedir="${dom.build.dir}">
             <manifest>
                 <attribute name="Built-By" value="${user.name}"/>
             </manifest>
@@ -281,31 +300,25 @@
         </jar>
     </target>
     <target name="jar-clean">
-        <delete file="${dist.dir}/${project.filename}-${project.version}.jar"/>
-        <delete file="${dist.dir}/${project.filename}-dom-${project.version}.jar"/>
+        <delete file="${jar.file}"/>
+        <delete file="${dom.file}"/>
     </target>
 
 
-    <target name="war" depends="jar">
-        <mkdir dir="${dist.dir}"/>
-        <mkdir dir="${build.dir}/war-bin"/>
-        <copy file="${config.dir}/xindice.xml" toFile="${dist.dir}/xindice-${project.version}.xml" filtering="on"/>
-        <copy file="${bin.dir}/xindice.war.bat" toFile="${build.dir}/war-bin/xindice.bat" filtering="on"/>
-        <copy file="${bin.dir}/xindice.war.sh" toFile="${build.dir}/war-bin/xindice" filtering="on"/>
-        <copy file="${bin.dir}/lcp.bat" toFile="${build.dir}/war-bin/lcp.bat" filtering="on"/>
-
-        <war destfile="${dist.dir}/${project.filename}-${project.version}.war"
-             update="false" webxml="config/web.xml">
+    <target name="war" depends="jar, bin">
+        <copy file="${config.dir}/xindice.xml" toFile="${xml.file}" filtering="on"/>
+        <war destfile="${war.file}" update="false" webxml="config/web.xml">
             <webinf dir=".">
                 <include name="${config.dir}/system.xml"/>
                 <include name="${config.dir}/commands.xml"/>
             </webinf>
-            <webinf dir="${build.dir}/war-bin">
-                <include name="*"/>
+            <webinf dir="${build.dir}">
+                <include name="bin/*"/>
             </webinf>
+            <lib refid="endorsed.jars"/>
             <lib refid="core.jars"/>
-            <lib file="${dist.dir}/${project.filename}-${project.version}.jar"/>
-            <lib file="${dist.dir}/${project.filename}-dom-${project.version}.jar"/>
+            <lib file="${jar.file}"/>
+            <lib file="${dom.file}"/>
             <manifest>
                 <attribute name="Built-By" value="${user.name}"/>
                 <attribute name="Xindice-Version" value="${project.version}"/>
@@ -314,15 +327,15 @@
         </war>
     </target>
     <target name="war-clean">
-        <delete file="${dist.dir}/${project.filename}-${project.version}.war"/>
-        <delete file="${dist.dir}/${project.filename}-${project.version}.xml"/>
+        <delete file="${war.file}"/>
+        <delete file="${xml.file}"/>
     </target>
 
 
     <target name="tomcat-deploy" depends="war" description="Deploys the Xindice webapp into the Tomcat installation">
-        <copy file="${dist.dir}/${project.filename}-${project.version}.xml"
+        <copy file="${xml.file}"
               tofile="${tomcat.home}/webapps/${webapp.name}.xml"/>
-        <copy file="${dist.dir}/${project.filename}-${project.version}.war"
+        <copy file="${war.file}"
               tofile="${tomcat.home}/webapps/${webapp.name}.war"/>
     </target>
     <target name="tomcat-clean" description="Removes the deployed Xindice webapp from the Tomcat installation">
@@ -355,10 +368,12 @@
                 <pathelement location="${src.dir}"/>
             </sourcepath>
             <classpath>
+                <fileset refid="endorsed.jars"/>
                 <fileset refid="core.jars"/>
                 <fileset refid="servlet.jars"/>
                 <fileset refid="tools.jars"/>
             </classpath>
+            <link href="http://java.sun.com/j2se/1.3/docs/api/"/>
         </javadoc>
     </target>
     <target name="javadoc-clean">
@@ -430,22 +445,15 @@
     <!--
       - Build Jar Releases (zip, tar.gz)
       -->
-    <target name="release-jar">
-        <mkdir dir="${build.dir}/jar-bin"/>
-        <mkdir dir="${build.dir}/site"/>
-        <mkdir dir="${api.dir}"/>
-        <copy file="${bin.dir}/xindice.jar.bat" toFile="${build.dir}/jar-bin/xindice.bat" filtering="on"/>
-        <copy file="${bin.dir}/xindice.jar.sh" toFile="${build.dir}/jar-bin/xindice" filtering="on"/>
-        <copy file="${bin.dir}/lcp.bat" toFile="${build.dir}/jar-bin/lcp.bat" filtering="on"/>
-
-        <zip destfile="${dist.dir}/xml-xindice-${project.version}-jar.zip">
+    <target name="release-jar" depends="init">
+        <zip destfile="${release.dir}/xml-xindice-${project.version}-jar.zip">
             <zipfileset dir="."
                         prefix="xindice-${project.version}"
                         includes="LICENSE,README,NOTICE,legal"/>
-            <zipfileset dir="${dist.dir}"
+            <zipfileset dir="${build.dir}"
                         prefix="xindice-${project.version}"
                         includes="xindice-${project.version}.jar,xindice-dom-${project.version}.jar"/>
-            <zipfileset dir="${build.dir}/jar-bin"
+            <zipfileset dir="${build.dir}/bin"
                         prefix="xindice-${project.version}/${bin.dir}"/>
             <zipfileset dir="${jar.dir}"
                         prefix="xindice-${project.version}/lib"/>
@@ -464,11 +472,11 @@
                         prefix="xindice-${project.version}"
                         preserveLeadingSlashes="true"
                         includes="LICENSE,README,NOTICE,legal"/>
-            <tarfileset dir="${dist.dir}"
+            <tarfileset dir="${build.dir}"
                         prefix="xindice-${project.version}"
                         preserveLeadingSlashes="true"
                         includes="xindice-${project.version}.jar,xindice-dom-${project.version}.jar"/>
-            <tarfileset dir="${build.dir}/jar-bin"
+            <tarfileset dir="${build.dir}/bin"
                         mode="755"
                         prefix="xindice-${project.version}/${bin.dir}"
                         preserveLeadingSlashes="true"/>
@@ -489,18 +497,18 @@
         </tar>
 
         <gzip src="${build.dir}/xml-xindice-${project.version}-jar.tar"
-              zipfile="${dist.dir}/xml-xindice-${project.version}-jar.tar.gz"/>
+              zipfile="${release.dir}/xml-xindice-${project.version}-jar.tar.gz"/>
     </target>
 
     <!--
       - Build War Releases (zip, tar.gz)
       -->
-    <target name="release-war">
-        <zip destfile="${dist.dir}/xml-xindice-${project.version}-war.zip">
+    <target name="release-war" depends="init">
+        <zip destfile="${release.dir}/xml-xindice-${project.version}-war.zip">
             <zipfileset dir="."
                         prefix="xindice-${project.version}"
                         includes="LICENSE,README,NOTICE,legal"/>
-            <zipfileset dir="${dist.dir}"
+            <zipfileset dir="${build.dir}"
                         prefix="xindice-${project.version}"
                         includes="xindice-${project.version}.xml,xindice-${project.version}.war"/>
             <zipfileset dir="${build.dir}/site"
@@ -515,7 +523,7 @@
                         prefix="xindice-${project.version}"
                         preserveLeadingSlashes="true"
                         includes="LICENSE,README,NOTICE,legal"/>
-            <tarfileset dir="${dist.dir}"
+            <tarfileset dir="${build.dir}"
                         prefix="xindice-${project.version}"
                         preserveLeadingSlashes="true"
                         includes="xindice-${project.version}.xml,xindice-${project.version}.war"/>
@@ -529,14 +537,14 @@
         </tar>
 
         <gzip src="${build.dir}/xml-xindice-${project.version}-war.tar"
-              zipfile="${dist.dir}/xml-xindice-${project.version}-war.tar.gz"/>
+              zipfile="${release.dir}/xml-xindice-${project.version}-war.tar.gz"/>
     </target>
 
     <!--
       - Build Src Releases (zip, tar.gz)
       -->
-    <target name="release-src">
-        <zip destfile="${dist.dir}/xml-xindice-${project.version}-src.zip">
+    <target name="release-src" depends="init">
+        <zip destfile="${release.dir}/xml-xindice-${project.version}-src.zip">
             <zipfileset dir="."
                         prefix="xindice-${project.version}"
                         includes="LICENSE,README,NOTICE,legal,KEYS,build.*,forrest.*,status.xml,xindice.*"/>
@@ -593,10 +601,10 @@
         </tar>
 
         <gzip src="${build.dir}/xml-xindice-${project.version}-src.tar"
-              zipfile="${dist.dir}/xml-xindice-${project.version}-src.tar.gz"/>
+              zipfile="${release.dir}/xml-xindice-${project.version}-src.tar.gz"/>
     </target>
 
-    <target name="release" depends="build, javadoc, site, site, release-jar, release-war, release-src"/>
+    <target name="release" depends="build, javadoc, site, release-jar, release-war, release-src"/>
 
     <!--
       - PMD is a tool that checks for various code mistakes, like unused

Modified: xml/xindice/trunk/xindice.bat
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/xindice.bat?view=diff&rev=523149&r1=523148&r2=523149
==============================================================================
--- xml/xindice/trunk/xindice.bat (original)
+++ xml/xindice/trunk/xindice.bat Tue Mar 27 19:53:46 2007
@@ -50,7 +50,7 @@
 if not "%_XINDICE_HOME%" == "" goto gotXindiceHome
 :: ----- Use the location of this script
 set _XINDICE_HOME=%~dp0.
-if not exist "%_XINDICE_HOME%\dist\xindice*.jar" goto noXindiceHome
+if not exist "%_XINDICE_HOME%\xindice-1*.jar" goto noXindiceHome
 echo WARNING: The environment variable XINDICE_HOME is not set.
 echo          Defaulting to %_XINDICE_HOME%
 goto gotXindiceHome
@@ -98,7 +98,7 @@
 
 set _JETTY_WEBAPP=%JETTY_WEBAPP%
 if not "%_JETTY_WEBAPP%" == "" goto gotWebapp
-set _JETTY_WEBAPP=%_XINDICE_HOME%\dist\xindice-1.1b5-dev.war
+set _JETTY_WEBAPP=%_XINDICE_HOME%\xindice-1.1b5-dev.war
 :gotWebapp
 
 set _JAVA_DEBUG_PORT=%JAVA_DEBUG_PORT%

Modified: xml/xindice/trunk/xindice.sh
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/xindice.sh?view=diff&rev=523149&r1=523148&r2=523149
==============================================================================
--- xml/xindice/trunk/xindice.sh (original)
+++ xml/xindice/trunk/xindice.sh Tue Mar 27 19:53:46 2007
@@ -78,10 +78,12 @@
 fi
 
 if [ "$XINDICE_HOME" = "" ] ; then
-  echo
-  echo "WARNING: The environment variable XINDICE_HOME is not set."
-  echo "         Defaulting to `pwd`"
   XINDICE_HOME=`pwd`
+  if [ ! -f $XINDICE_HOME/xindice-1*.jar ] ; then
+    echo ERROR: You must set XINDICE_HOME to point at your
+    echo        Xindice installation directory.
+    exit 2
+  fi
 fi
 
 if [ "$XINDICE_DB_HOME" = "" ] ; then XINDICE_DB_HOME=$XINDICE_HOME ; fi
@@ -96,7 +98,7 @@
 fi
 
 if [ "$JETTY_WEBAPP" = "" ] ; then
-  JETTY_WEBAPP=$XINDICE_HOME/dist/xindice-1.1b5-dev.war
+  JETTY_WEBAPP=$XINDICE_HOME/xindice-1.1b5-dev.war
 fi
 
 if [ "$JAVA_DEBUG_PORT" = "" ] ; then
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.