Changeset 2651


Ignore:
Timestamp:
03/01/13 12:36:15 (11 years ago)
Author:
keeloo
Message:

Repaired packaging. Still need to check the contents of the new
package, compare it with the old one, and test both the web
application and the importer by installing them outside the Netbeans
environment.

Location:
vlo/branches/vlo-2.13-param
Files:
1 deleted
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-2.13-param/pom.xml

    r2641 r2651  
    1919    <modules>
    2020        <module>vlo_solr</module>
    21         <module>vlo_webapp</module>
    22     <module>vlo_web_app</module>
    23   </modules>
     21        <module>vlo_web_app</module>
     22        <module>vlo_importer</module>
     23    </modules>
    2424
    2525    <properties>
  • vlo/branches/vlo-2.13-param/src/main/assembly/installPackageBuilder.xml

    r2062 r2651  
    2020    <includeBaseDirectory>true</includeBaseDirectory>
    2121    <fileSets>
    22 <!-- COOL SCRIPT FOR Application management -->
    23         <fileSet>
    24             <directory>src/main/resources</directory>
    25             <includes>
    26                 <include>setvalues.pl</include>
    27             </includes>
    28             <fileMode>777</fileMode>
    29             <outputDirectory>.</outputDirectory>
    30         </fileSet>
     22
    3123<!-- DOCS -->
    3224        <fileSet>
     
    3830        </fileSet>
    3931        <fileSet>
    40             <directory>vlo_webapp</directory>
     32            <directory>vlo_web_app</directory>
    4133            <includes>
    4234                <include>CHANGES</include>
     
    6254        <!-- Jar File -->
    6355        <fileSet>
    64             <directory>vlo_webapp/target</directory>
     56            <directory>vlo_importer/target</directory>
    6557            <includes>
    6658                <include>*.jar</include>
     
    7062        <!-- run script -->
    7163        <fileSet>
    72             <directory>vlo_webapp/src/main/bin</directory>
     64            <directory>vlo_importer/src/main/bin</directory>
    7365            <includes>
    7466                <include>*.sh</include>
     
    7971        <!-- config files -->
    8072        <fileSet>
    81             <directory>vlo_webapp/src/main/bin</directory>
     73            <directory>vlo_importer/src/main/bin</directory>
    8274            <includes>
    8375                <include>*.properties</include>
     
    8678        </fileSet>
    8779        <fileSet>
    88             <directory>vlo_webapp/src/main/resources</directory>
     80            <directory>vlo_importer/src/main/resources</directory>
    8981            <includes>
    90                 <include>importerConfig.xml</include>
    91                 <include>application.properties</include>
     82                <include>cmdi2xhtml.xsl</include>
     83                <include>facetConcepts.xml</include>
    9284                <include>nationalProjectsMapping.xml</include>
     85                <include>VloConfig.xml</include>
    9386            </includes>
    9487            <outputDirectory>bin</outputDirectory>
     
    9790        <!-- WAR FILE -->
    9891        <fileSet>
    99             <directory>vlo_webapp/target</directory>
     92            <directory>vlo_web_app/target</directory>
    10093            <includes>
    10194                <include>*.war</include>
     
    10598        <!-- config -->
    10699        <fileSet>
    107             <directory>vlo_webapp/src/main/resources</directory>
     100            <directory>vlo_web_app/src/main/resources</directory>
    108101            <includes>
    109                 <include>contextfragment.xml</include>
     102                <include>VloConfig.xml</include>
    110103            </includes>
    111104            <outputDirectory>config</outputDirectory>
  • vlo/branches/vlo-2.13-param/vlo_importer/pom.xml

    r2641 r2651  
    1010    in the parent's pom.xml -->
    1111    <version>2.13</version>
    12     <name>VirtualLanguageObservatory</name>
     12    <name>vlo_importer</name>
    1313    <description></description>
    1414
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/assembly/buildjar.xml

    r1856 r2651  
    77    <includeBaseDirectory>false</includeBaseDirectory>
    88    <fileSets>
    9         <!-- LIB -->
    10        <!--<fileSet>
    11             <directory>target/lib</directory>
    12             <includes>
    13                 <include>*.*</include>
    14             </includes>
    15             <outputDirectory>lib</outputDirectory>
    16         </fileSet> -->
    179        <!-- CLASSES -->
    1810        <fileSet>
     
    2113                <include>**/*.*</include>
    2214            </includes>
    23             <excludes>
    24                 <exclude>applicationContext.xml</exclude>
    25                 <exclude>application.properties</exclude>
    26             </excludes>
    2715            <outputDirectory>/</outputDirectory>
    2816        </fileSet>
     
    3321            <includes>
    3422                <include>**/*.*</include>
    35             </includes>
    36             <excludes>
    37                 <exclude>applicationContext.xml</exclude>
    38                 <exclude>application.properties</exclude>
    39             </excludes>
    40             <outputDirectory>/</outputDirectory>
    41         </fileSet>
    42 
    43         <!-- Overwrite applicationContext.xml -->
    44         <fileSet>
    45             <directory>src/test/resources</directory>
    46             <includes>
    47                 <include>applicationContext.xml</include>
    4823            </includes>
    4924            <outputDirectory>/</outputDirectory>
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java

    r2641 r2651  
    9090     * Make the configuration statically accessible
    9191     */
    92     private static VloConfig config = null;
     92    protected static VloConfig config = null;
    9393
    9494    /**
     
    624624    }
    625625           
    626     /**
    627      * Switch to external configuration.<br><br>
    628      *
    629      * In addition to the definition of the configuration by the packaged in the
    630      * {@literal VloConfig.xml} file, you can configure the web application by
    631      * means of an XML file that resides outside the package. By letting a
    632      * parameter named<br><br>
    633      *
    634      * externalConfig<br><br>
    635      *
    636      * in the context reference an XML file similar to the packaged one, the
    637      * parameters defined in this file will override the packaged parameters.
    638      * Please note that the use of an external XML file is not
    639      * compulsory.<br><br>
    640      *
    641      * Another way to externally configure the web application is to define
    642      * parameters by including them in the context fragment not via an XML file,
    643      * but directly. At the moment, only the packaged <br><br>
    644      *
    645      * solrUrl<br><br>
    646      *
    647      * parameter can be overridden in this way.
    648      *
    649      * @param config static configuration
    650      *
    651      * @return the static WebAppConfig member
    652      */
    653     public static VloConfig switchToExternalConfig(ServletContext context) {
    654              
    655         // assume that there is no file outside the package defining parameters
    656 
    657         boolean externalConfig = false;
    658        
    659         // check for a reference to of such a file
    660 
    661         String fileName;
    662         fileName = context.getInitParameter("externalConfig");
    663                
    664         if (fileName == null) {
    665             // no external configuration file
    666         } else {
    667             config = (VloConfig) read(fileName, config);
    668         }
    669        
    670         /**
    671          * In addition to modifications via an external configuration file,
    672          * check if the current configuration needs to be modified because of a
    673          * parameter defined in the context directly.
    674          */       
    675         String url = context.getInitParameter("solrUrl");
    676        
    677         if (url == null){
    678             // no overruling parameter in the context
    679         } else
    680         {
    681             // overrule the current value of solrUrl
    682 
    683             VloConfig.get().setSolrUrl(url);
    684         }
    685        
    686         // return the current configuration, modified or not
    687 
    688         return config;
    689     }   
     626   
    690627}
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java

    r2641 r2651  
    378378     * @throws IOException
    379379     */
    380     /**
    381      * @param args
    382      * @throws IOException
    383      */
    384380    public static void main(String[] args) throws MalformedURLException, IOException {
    385381
  • vlo/branches/vlo-2.13-param/vlo_web_app/pom.xml

    r2641 r2651  
    3131            <artifactId>vlo</artifactId>
    3232            <version>2.13</version>
     33            <type>jar</type>
    3334        </dependency>
    3435        <dependency>
     
    4142
    4243    <build>
     44        <!-- added by kj, need to check this -->
     45        <resources>
     46            <resource>
     47                <directory>src/main/java</directory>
     48                <excludes>
     49                    <exclude>**/*.java</exclude>
     50                </excludes>
     51            </resource>
     52        </resources>
     53
    4354        <plugins>
    4455            <plugin>
     
    92103                <configuration>
    93104                    <descriptors>
    94                         <descriptor>src/main/assembly/buildjar.xml</descriptor>
     105                        <descriptor>src/main/assembly/buildwar.xml</descriptor>
    95106                    </descriptors>
    96107                </configuration>
  • vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloApplication.java

    r2641 r2651  
    22
    33import eu.clarin.cmdi.vlo.config.VloConfig;
     4import eu.clarin.cmdi.vlo.config.VloContextConfig;
    45import eu.clarin.cmdi.vlo.dao.SearchResultsDao;
    56import eu.clarin.cmdi.vlo.pages.FacetedSearchPage;
     
    4647             */
    4748           
    48             config = VloConfig.switchToExternalConfig(servletContext);
     49            config = VloContextConfig.switchToExternalConfig(servletContext);
    4950        }
    5051
Note: See TracChangeset for help on using the changeset viewer.