Changeset 2651
- Timestamp:
- 03/01/13 12:36:15 (11 years ago)
- 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 19 19 <modules> 20 20 <module>vlo_solr</module> 21 <module>vlo_web app</module>22 <module>vlo_web_app</module>23 </modules>21 <module>vlo_web_app</module> 22 <module>vlo_importer</module> 23 </modules> 24 24 25 25 <properties> -
vlo/branches/vlo-2.13-param/src/main/assembly/installPackageBuilder.xml
r2062 r2651 20 20 <includeBaseDirectory>true</includeBaseDirectory> 21 21 <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 31 23 <!-- DOCS --> 32 24 <fileSet> … … 38 30 </fileSet> 39 31 <fileSet> 40 <directory>vlo_web app</directory>32 <directory>vlo_web_app</directory> 41 33 <includes> 42 34 <include>CHANGES</include> … … 62 54 <!-- Jar File --> 63 55 <fileSet> 64 <directory>vlo_ webapp/target</directory>56 <directory>vlo_importer/target</directory> 65 57 <includes> 66 58 <include>*.jar</include> … … 70 62 <!-- run script --> 71 63 <fileSet> 72 <directory>vlo_ webapp/src/main/bin</directory>64 <directory>vlo_importer/src/main/bin</directory> 73 65 <includes> 74 66 <include>*.sh</include> … … 79 71 <!-- config files --> 80 72 <fileSet> 81 <directory>vlo_ webapp/src/main/bin</directory>73 <directory>vlo_importer/src/main/bin</directory> 82 74 <includes> 83 75 <include>*.properties</include> … … 86 78 </fileSet> 87 79 <fileSet> 88 <directory>vlo_ webapp/src/main/resources</directory>80 <directory>vlo_importer/src/main/resources</directory> 89 81 <includes> 90 <include> importerConfig.xml</include>91 <include> application.properties</include>82 <include>cmdi2xhtml.xsl</include> 83 <include>facetConcepts.xml</include> 92 84 <include>nationalProjectsMapping.xml</include> 85 <include>VloConfig.xml</include> 93 86 </includes> 94 87 <outputDirectory>bin</outputDirectory> … … 97 90 <!-- WAR FILE --> 98 91 <fileSet> 99 <directory>vlo_web app/target</directory>92 <directory>vlo_web_app/target</directory> 100 93 <includes> 101 94 <include>*.war</include> … … 105 98 <!-- config --> 106 99 <fileSet> 107 <directory>vlo_web app/src/main/resources</directory>100 <directory>vlo_web_app/src/main/resources</directory> 108 101 <includes> 109 <include> contextfragment.xml</include>102 <include>VloConfig.xml</include> 110 103 </includes> 111 104 <outputDirectory>config</outputDirectory> -
vlo/branches/vlo-2.13-param/vlo_importer/pom.xml
r2641 r2651 10 10 in the parent's pom.xml --> 11 11 <version>2.13</version> 12 <name> VirtualLanguageObservatory</name>12 <name>vlo_importer</name> 13 13 <description></description> 14 14 -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/assembly/buildjar.xml
r1856 r2651 7 7 <includeBaseDirectory>false</includeBaseDirectory> 8 8 <fileSets> 9 <!-- LIB -->10 <!--<fileSet>11 <directory>target/lib</directory>12 <includes>13 <include>*.*</include>14 </includes>15 <outputDirectory>lib</outputDirectory>16 </fileSet> -->17 9 <!-- CLASSES --> 18 10 <fileSet> … … 21 13 <include>**/*.*</include> 22 14 </includes> 23 <excludes>24 <exclude>applicationContext.xml</exclude>25 <exclude>application.properties</exclude>26 </excludes>27 15 <outputDirectory>/</outputDirectory> 28 16 </fileSet> … … 33 21 <includes> 34 22 <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>48 23 </includes> 49 24 <outputDirectory>/</outputDirectory> -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java
r2641 r2651 90 90 * Make the configuration statically accessible 91 91 */ 92 pr ivatestatic VloConfig config = null;92 protected static VloConfig config = null; 93 93 94 94 /** … … 624 624 } 625 625 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 690 627 } -
vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java
r2641 r2651 378 378 * @throws IOException 379 379 */ 380 /**381 * @param args382 * @throws IOException383 */384 380 public static void main(String[] args) throws MalformedURLException, IOException { 385 381 -
vlo/branches/vlo-2.13-param/vlo_web_app/pom.xml
r2641 r2651 31 31 <artifactId>vlo</artifactId> 32 32 <version>2.13</version> 33 <type>jar</type> 33 34 </dependency> 34 35 <dependency> … … 41 42 42 43 <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 43 54 <plugins> 44 55 <plugin> … … 92 103 <configuration> 93 104 <descriptors> 94 <descriptor>src/main/assembly/build jar.xml</descriptor>105 <descriptor>src/main/assembly/buildwar.xml</descriptor> 95 106 </descriptors> 96 107 </configuration> -
vlo/branches/vlo-2.13-param/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloApplication.java
r2641 r2651 2 2 3 3 import eu.clarin.cmdi.vlo.config.VloConfig; 4 import eu.clarin.cmdi.vlo.config.VloContextConfig; 4 5 import eu.clarin.cmdi.vlo.dao.SearchResultsDao; 5 6 import eu.clarin.cmdi.vlo.pages.FacetedSearchPage; … … 46 47 */ 47 48 48 config = VloCon fig.switchToExternalConfig(servletContext);49 config = VloContextConfig.switchToExternalConfig(servletContext); 49 50 } 50 51
Note: See TracChangeset
for help on using the changeset viewer.