Changeset 32792

Show
Ignore:
Timestamp:
21.02.2019 16:43:10 (8 months ago)
Author:
ak19
Message:

Undoing recent commit of forcing the ant force-start-derby target of using the bundled JRE's java. This would only have been correct during the installer. During the installer, launching java directly fails on systems that don't have java installed.

Location:
main/trunk/greenstone3
Files:
15 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r32789 r32792  
    99<project name="greenstone3" default="usage" basedir="."> 
    1010  <echo>os.name: ${os.name}</echo> 
    11  
     11   
    1212  <!-- ============ classpath =================== --> 
    1313  <path id="project.classpath"> 
     
    9696  <condition property="current.os.iswindows"> 
    9797    <os family="windows"/> 
    98   </condition> 
    99  
    100   <!-- Java executable: if packages/jre/bin exists as it does for GS3 binaries, use that. 
    101        JRE not included in svn/devel GS3, for which we attempt to use any installed java 
    102        as before. --> 
    103   <condition property="javaexec" value="packages/jre/bin/java" else="java"> 
    104     <available file="packages/jre/bin/java"/> 
    10598  </condition> 
    10699 
     
    11131106  <target name="force-start-derby"> 
    11141107      <property name="derby.server.classpath.prop" refid="derby.server.classpath" /> 
    1115        
    1116       <exec executable="${javaexec}" spawn="true"><!-- failonerror="true"--> 
     1108      <!-- During the installer, launching java directly fails on systems that don't have java installed. 
     1109       Forcing force-start-derby to always use packages/jre/bin/java is wrong too: as gs3-setup does 
     1110       a lot of work of determining the correct JRE_HOME/JAVA_HOME (not necessarily the GS3 bundled JRE) 
     1111       and we want to be consistent in using the same java throughout. Solution: 
     1112       Refer to the JRE used in executing this ant file, which for installers will always be the bundled one. 
     1113       https://stackoverflow.com/questions/17571595/env-java-home-not-found-ant --> 
     1114      <exec executable="${java.home}/bin/java" spawn="true"><!-- failonerror="true"--> 
    11171115    <env key="CLASSPATH" path="${derby.server.classpath.prop}"/> 
    11181116    <arg value="org.apache.derby.drda.NetworkServerControl"/> 
  • main/trunk/greenstone3/web/sites/localsite/collect/lucene-jdbm-demo/etc/collectionConfig.xml

    r32202 r32792  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    3   <security scope="document" default_access="private" disabled="true"> 
    4     <!-- a sample security configuration. enable it by removing the 'disabled' 
    5      attribute above --> 
    6     <!-- Document level security. All documents are private --> 
    7     <exception> 
    8       <!-- except if you are in demo group --> 
    9       <group name="demo"/> 
    10     </exception> 
    11     <exception> 
    12       <!-- except for the publicset list of documents which are fully public --> 
    13       <documentSet name="publicset"/> 
    14       <group name=""/> 
    15     </exception> 
    16     <documentSet name="publicset"> 
    17       <match>b17mie</match> 
    18       <match>b18ase</match> 
    19       <match>b20cre</match> 
    20       <match>b21wae</match> 
    21     </documentSet> 
    22   </security> 
    23   <metadataList> 
    24     <metadata lang="en" name="creator">Greenstone Project</metadata> 
    25     <metadata lang="en" name="maintainer">Greenstone Project</metadata> 
    26     <metadata lang="en" name="public">true</metadata> 
    27   </metadataList> 
    28   <displayItemList> 
    29     <displayItem assigned="true" name="name" key="name" dictionary="collectionConfig"/> 
    30     <displayItem assigned="true" lang="en" name="name">Demo Collection</displayItem> 
    31     <displayItem assigned="true" name="description" key="description" dictionary="collectionConfig"/> 
    32     <displayItem assigned="true" name="shortDescription" key="shortDescription" dictionary="collectionConfig"/> 
    33  </displayItemList> 
    34   <format> 
    35     <!-- Define any global format statements here --> 
    36  
    37     <!-- Setting the RSS option to true here will display a link to the collection's RSS feed on all 
    38      pages of the collection. Can include the RSS feed link in section specific format statements 
    39      too, such as search, if wishing to display the link only in particular sections.--> 
    40     <gsf:option name="RSS" value="true"/> 
    41   </format> 
    42   <search type="lucene"> 
    43     <level name="section"> 
    44       <displayItem name="name" key="level.chapter"/> 
    45     </level> 
    46     <level name="document"> 
    47       <displayItem name="name" key="level.book"/> 
    48     </level> 
    49     <defaultLevel name="section"/> 
    50     <index name="allfields"/> 
    51     <index name="text"/> 
    52     <index name="dc.Title,Title"/> 
    53     <index name="dc.Subject"/> 
    54     <index name="dls.Organization"/> 
    55     <sort name="rank"/> 
    56     <sort name="dls.Organization"> 
    57       <displayItem name="name" key="Organisation.buttonname"/> 
    58     </sort> 
    59     <sort name="none"/> 
    60     <defaultSort name="rank"/> 
    61     <searchType name="plain"/> 
    62     <searchType name="simpleform"/> 
    63     <searchType name="advancedform"/> 
    64     <format> 
    65       <gsf:template match="documentNode"> 
    66     <td valign="top"> 
    67       <gsf:link type="document"> 
    68         <gsf:icon type="document"/> 
    69       </gsf:link> 
    70     </td> 
    71     <td> 
    72       <gsf:choose-metadata> 
    73         <gsf:metadata name="dc.Title"/> 
    74         <gsf:metadata name="Title"/> 
    75         <gsf:default>Untitled</gsf:default> 
    76       </gsf:choose-metadata> 
    77     </td> 
    78     </gsf:template> 
    79     </format> 
    80   </search> 
    81   <infodb type="jdbm"/> 
    82   <import> 
    83     <pluginList> 
    84       <plugin name="GreenstoneXMLPlugin"/> 
    85       <plugin name="HTMLPlugin"> 
    86     <option name="-description_tags"/> 
    87       </plugin> 
    88       <plugin name="MetadataXMLPlugin"/> 
    89       <plugin name="ArchivesInfPlugin"/> 
    90       <plugin name="DirectoryPlugin"/> 
    91     </pluginList> 
    92   </import> 
    93   <importOption name="OIDtype" value="dirname"/> 
    94   <buildOption name="sections_sort_on_document_metadata" value="unless_section_metadata_exists"/> 
    95   <browse> 
    96     <classifier name="List"> 
    97       <option name="-metadata" value="dc.Title"/> 
    98       <option name="-partition_type_within_level" value="per_letter"/> 
    99       <option name="-use_hlist_for" value="dc.Title"/> 
    100     </classifier> 
    101     <classifier name="Hierarchy"> 
    102       <option name="-metadata" value="dc.Subject"/> 
    103       <option name="-sort" value="dc.Title"/> 
    104     </classifier> 
    105     <classifier name="List"> 
    106       <option name="-metadata" value="dls.Organization"/> 
    107       <option name="-sort_leaf_nodes_using" value="dc.Title"/> 
    108       <option name="-partition_type_within_level" value="constant_size"/> 
    109       <option name="-bookshelf_type" value="always"/> 
    110       <option name="-buttonname" value="Organization"/> 
    111     </classifier> 
    112     <classifier name="List"> 
    113       <option name="-metadata" value="dls.Keyword"/> 
    114       <option name="-buttonname" value="Howto"/> 
    115       <option name="-partition_type_within_level" value="none"/> 
    116       <format> <!-- format statement specific to this classifier --> 
    117     <gsf:template match="documentNode"> 
    118       <td> 
    119         <gsf:link type="document"> 
    120           <gsf:metadata name="dls.Keyword"/> 
    121         </gsf:link> 
    122       </td> 
    123     </gsf:template> 
    124       </format> 
    125     </classifier> 
    126     <format> <!-- general format statements for all classifiers that don't have their own versions --> 
    127       <gsf:template match="documentNode"> 
    128     <td valign="top"> 
    129       <gsf:link type="document"> 
    130         <gsf:icon type="document"/> 
    131       </gsf:link> 
    132     </td> 
    133     <td valign="top"> 
    134       <gsf:choose-metadata> 
    135         <gsf:metadata name="dc.Title"/> 
    136         <gsf:metadata name="Title"/> 
    137         <gsf:default>Untitled</gsf:default> 
    138       </gsf:choose-metadata> 
    139     </td> 
    140       </gsf:template> 
    141       <gsf:template match="classifierNode[@classifierStyle = 'VList']"> 
    142     <td valign="top"> 
    143       <gsf:link type="classifier" style="static"> 
    144         <gsf:icon type="classifier"/> 
    145       </gsf:link> 
    146     </td> 
    147     <td valign="top"> 
    148       <gsf:link type="classifier"> 
    149         <gsf:metadata name="Title"/> 
    150       </gsf:link> 
    151     </td> 
    152       </gsf:template> 
    153       <gsf:template match="classifierNode[@classifierStyle = 'HList']"> 
    154     <gsf:link type="classifier"> 
    155       <gsf:metadata name="Title"/> 
    156     </gsf:link> 
    157        </gsf:template> 
    158     <gsf:option name="turnstyleClassifiers" value="true"/> 
    159     </format> 
    160   </browse> 
    161   <display> 
    162     <format> 
    163       <gsf:option name="TOC" value="true"/>      
    164       <gsf:headMetaTags> 
    165     <gsf:metadata name="dc.Title"/> 
    166     <gsf:metadata name="dc.Subject"/> 
    167     <gsf:metadata name="dls.Organization"/> 
    168       </gsf:headMetaTags> 
    169     </format> 
    170   </display> 
    171   <replaceListRef id="gs2-standard"/> 
    172   <serviceRackList> 
    173     <serviceRack name="RSSRetrieve"/> 
    174     <!-- comment out the following serviceRack if you want to disable OAI for this collection --> 
    175     <serviceRack name="OAIPMH"> 
    176       <setName>Lucene demo collection</setName> 
    177       <setDescription>A demo collection for greenstone, using Lucene and JDBM.</setDescription> 
    178       <!-- uncomment the following and set the name attribute if you want this 
    179        collection to be part of a super set. --> 
    180       <!--<oaiSuperSet name="xxx"/>--> 
    181       <ListMetadataFormats> 
    182     <!--What metadata sets to support for this collection. You can select any set that is specified in OAIConfig.xml. To use a new set, you need to add a set definition in OAIConfig.xml, then reference it here, like: 
     3    <security default_access="private" disabled="true" scope="document"><!-- a sample security configuration. enable it by removing the 'disabled' 
     4     attribute above --><!-- Document level security. All documents are private --> 
     5        <exception><!-- except if you are in demo group --> 
     6            <group name="demo"/> 
     7        </exception> 
     8        <exception><!-- except for the publicset list of documents which are fully public --> 
     9            <documentSet name="publicset"/> 
     10            <group name=""/> 
     11        </exception> 
     12        <documentSet name="publicset"> 
     13            <match>b17mie</match> 
     14            <match>b18ase</match> 
     15            <match>b20cre</match> 
     16            <match>b21wae</match> 
     17        </documentSet> 
     18    </security> 
     19    <metadataList> 
     20        <metadata lang="en" name="creator">Greenstone Project</metadata> 
     21        <metadata lang="en" name="maintainer">Greenstone Project</metadata> 
     22        <metadata lang="en" name="public">true</metadata> 
     23    </metadataList> 
     24    <displayItemList> 
     25        <displayItem assigned="true" dictionary="collectionConfig" key="description" name="description"/> 
     26        <displayItem assigned="true" dictionary="collectionConfig" key="name" name="name"/> 
     27        <displayItem assigned="true" lang="en" name="name">Demo Collection</displayItem> 
     28        <displayItem assigned="true" lang="en" name="document:text">text</displayItem> 
     29        <displayItem assigned="true" lang="en" name="document:ex.Title">Title</displayItem> 
     30        <displayItem assigned="true" lang="en" name="document:ex.Source">Source</displayItem> 
     31        <displayItem assigned="true" key="level.chapter" name="section"/> 
     32        <displayItem assigned="true" key="level.book" name="document"/> 
     33        <displayItem assigned="true" dictionary="collectionConfig" key="shortDescription" name="shortDescription"/> 
     34    </displayItemList> 
     35    <format> 
     36<!-- 
     37Define any global format statements here 
     38--> 
     39<!-- 
     40Setting the RSS option to true here will display a link to the collection's RSS feed on all pages of the collection. Can include the RSS feed link in section specific format statements too, such as search, if wishing to display the link only in particular sections. 
     41--> 
     42            <gsf:option name="RSS" value="true"/> 
     43        </format> 
     44    <search type="lucene"> 
     45        <level name="section"> 
     46            <displayItem key="level.chapter" name="name"/> 
     47        </level> 
     48        <level name="document"> 
     49            <displayItem key="level.book" name="name"/> 
     50        </level> 
     51        <defaultLevel name="section"/> 
     52        <index name="allfields"/> 
     53        <index name="text"/> 
     54        <index name="dc.Title,Title"/> 
     55        <index name="dc.Subject"/> 
     56        <index name="dls.Organization"/> 
     57        <sort name="rank"/> 
     58        <sort name="dls.Organization"> 
     59            <displayItem key="Organisation.buttonname" name="name"/> 
     60        </sort> 
     61        <sort name="none"/> 
     62        <defaultSort name="rank"/> 
     63        <searchType name="plain"/> 
     64        <searchType name="simpleform"/> 
     65        <searchType name="advancedform"/> 
     66        <format> 
     67            <gsf:template match="documentNode"> 
     68                <td valign="top"> 
     69                    <gsf:link type="document"> 
     70                        <gsf:icon type="document"/> 
     71                    </gsf:link> 
     72                </td> 
     73                <td> 
     74                    <gsf:choose-metadata> 
     75                        <gsf:metadata name="dc.Title"/> 
     76                        <gsf:metadata name="Title"/> 
     77                        <gsf:default>Untitled</gsf:default> 
     78                    </gsf:choose-metadata> 
     79                </td> 
     80            </gsf:template> 
     81        </format> 
     82    </search> 
     83    <infodb type="jdbm"/> 
     84    <import> 
     85        <pluginList> 
     86            <plugin name="GreenstoneXMLPlugin"/> 
     87            <plugin name="HTMLPlugin"> 
     88                <option name="-description_tags"/> 
     89            </plugin> 
     90            <plugin name="MetadataXMLPlugin"/> 
     91            <plugin name="ArchivesInfPlugin"/> 
     92            <plugin name="DirectoryPlugin"/> 
     93        </pluginList> 
     94    </import> 
     95    <browse> 
     96        <classifier name="List"> 
     97            <option name="-metadata" value="dc.Title"/> 
     98            <option name="-partition_type_within_level" value="per_letter"/> 
     99            <option name="-use_hlist_for" value="dc.Title"/> 
     100        </classifier> 
     101        <classifier name="Hierarchy"> 
     102            <option name="-metadata" value="dc.Subject"/> 
     103            <option name="-sort" value="dc.Title"/> 
     104        </classifier> 
     105        <classifier name="List"> 
     106            <option name="-metadata" value="dls.Organization"/> 
     107            <option name="-sort_leaf_nodes_using" value="dc.Title"/> 
     108            <option name="-partition_type_within_level" value="constant_size"/> 
     109            <option name="-bookshelf_type" value="always"/> 
     110            <option name="-buttonname" value="Organization"/> 
     111        </classifier> 
     112        <classifier name="List"> 
     113            <option name="-metadata" value="dls.Keyword"/> 
     114            <option name="-buttonname" value="Howto"/> 
     115            <option name="-partition_type_within_level" value="none"/> 
     116            <format> 
     117<!-- 
     118format statement specific to this classifier 
     119--> 
     120            <gsf:template match="documentNode"> 
     121                <td> 
     122                    <gsf:link type="document"> 
     123                        <gsf:metadata name="dls.Keyword"/> 
     124                    </gsf:link> 
     125                </td> 
     126            </gsf:template> 
     127        </format> 
     128        </classifier> 
     129        <format> 
     130<!-- 
     131general format statements for all classifiers that don't have their own versions 
     132--> 
     133            <gsf:template match="documentNode"> 
     134                <td valign="top"> 
     135                    <gsf:link type="document"> 
     136                        <gsf:icon type="document"/> 
     137                    </gsf:link> 
     138                </td> 
     139                <td valign="top"> 
     140                    <gsf:choose-metadata> 
     141                        <gsf:metadata name="dc.Title"/> 
     142                        <gsf:metadata name="Title"/> 
     143                        <gsf:default>Untitled</gsf:default> 
     144                    </gsf:choose-metadata> 
     145                </td> 
     146            </gsf:template> 
     147            <gsf:template match="classifierNode[@classifierStyle = 'VList']"> 
     148                <td valign="top"> 
     149                    <gsf:link style="static" type="classifier"> 
     150                        <gsf:icon type="classifier"/> 
     151                    </gsf:link> 
     152                </td> 
     153                <td valign="top"> 
     154                    <gsf:link type="classifier"> 
     155                        <gsf:metadata name="Title"/> 
     156                    </gsf:link> 
     157                </td> 
     158            </gsf:template> 
     159            <gsf:template match="classifierNode[@classifierStyle = 'HList']"> 
     160                <gsf:link type="classifier"> 
     161                    <gsf:metadata name="Title"/> 
     162                </gsf:link> 
     163            </gsf:template> 
     164            <gsf:option name="turnstyleClassifiers" value="true"/> 
     165        </format> 
     166    </browse> 
     167    <display> 
     168        <format> 
     169            <gsf:option name="TOC" value="true"/> 
     170            <gsf:headMetaTags> 
     171                <gsf:metadata name="dc.Title"/> 
     172                <gsf:metadata name="dc.Subject"/> 
     173                <gsf:metadata name="dls.Organization"/> 
     174            </gsf:headMetaTags> 
     175        </format> 
     176    </display> 
     177    <replaceListRef id="gs2-standard"/> 
     178    <serviceRackList> 
     179        <serviceRack name="RSSRetrieve"/><!-- comment out the following serviceRack if you want to disable OAI for this collection --> 
     180        <serviceRack name="OAIPMH"> 
     181            <setName>Lucene demo collection</setName> 
     182            <setDescription>A demo collection for greenstone, using Lucene and JDBM.</setDescription><!-- uncomment the following and set the name attribute if you want this 
     183       collection to be part of a super set. --><!--<oaiSuperSet name="xxx"/>--> 
     184            <ListMetadataFormats><!--What metadata sets to support for this collection. You can select any set that is specified in OAIConfig.xml. To use a new set, you need to add a set definition in OAIConfig.xml, then reference it here, like: 
    183185        <metadataFormat metadataPrefix="prefix"/> --> 
    184     <metadataFormat metadataPrefix="oai_dc"><!--   a custom mapping as this collection doesn't have exclusive dc metadata --><!-- this will replace the dc:publisher element from the main set --> 
    185       <element name="dc:publisher"> 
    186         <mapping elements="dls.Organization"/> 
    187       </element> 
    188     </metadataFormat> 
    189       </ListMetadataFormats> 
    190     </serviceRack> 
    191   </serviceRackList> 
     186                <metadataFormat metadataPrefix="oai_dc"><!--   a custom mapping as this collection doesn't have exclusive dc metadata --><!-- this will replace the dc:publisher element from the main set --> 
     187                    <element name="dc:publisher"> 
     188                        <mapping elements="dls.Organization"/> 
     189                    </element> 
     190                </metadataFormat> 
     191            </ListMetadataFormats> 
     192        </serviceRack> 
     193    </serviceRackList> 
     194    <importOption name="OIDtype" value="dirname"/> 
     195    <buildOption name="sections_sort_on_document_metadata" value="unless_section_metadata_exists"/> 
    192196</CollectionConfig>