https://www.mediawiki.org/wiki/Special:Code/MediaWiki/109364
Revision: 109364 Author: oren Date: 2012-01-18 13:59:49 +0000 (Wed, 18 Jan 2012) Log Message: ----------- based a Maven archtype for SOLR deployment Added Paths: ----------- trunk/lucene-search-3/pom.xml Added: trunk/lucene-search-3/pom.xml =================================================================== --- trunk/lucene-search-3/pom.xml (rev 0) +++ trunk/lucene-search-3/pom.xml 2012-01-18 13:59:49 UTC (rev 109364) @@ -0,0 +1,402 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + | Copyright 2010 Sourcesense + | + | Licensed under the Apache License, Version 2.0 (the "License"); + | you may not use this file except in compliance with the License. + | You may obtain a copy of the License at + | + | http://www.apache.org/licenses/LICENSE-2.0 + | + | Unless required by applicable law or agreed to in writing, software + | distributed under the License is distributed on an "AS IS" BASIS, + | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + | See the License for the specific language governing permissions and + | limitations under the License. +--> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <modelVersion>4.0.0</modelVersion> + <groupId>bazzar</groupId> + <artifactId>bazzar</artifactId> + <version>0.0.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <properties> + <!-- + | libraries version + --> + <tomcat.version>6.0.29</tomcat.version> + <solr.version>1.4.1</solr.version> + <slf4j.version>1.5.5</slf4j.version> + <solrp.version>1.0.2</solrp.version> + + <!-- + | Solr properties + --> + <webapp.description>${project.artifactId}-${environment} - v${project.version}</webapp.description> + <solr.webapp.name>ROOT</solr.webapp.name> + + <!-- + | common useful properties + --> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <javac.src.version>1.5</javac.src.version> + <javac.target.version>1.5</javac.target.version> + <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZ</maven.build.timestamp.format> + <implementation.build>${maven.build.timestamp}</implementation.build> + </properties> + + <build> + <defaultGoal>package</defaultGoal> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.2.1</version> + <dependencies> + <dependency> + <groupId>com.sourcesense.solr</groupId> + <artifactId>solr-assemblies</artifactId> + <version>${solrp.version}</version> + </dependency> + </dependencies> + <executions> + <execution> + <id>package-solr</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptorRefs> + <descriptorRef>bootstrap</descriptorRef> + <descriptorRef>multicore</descriptorRef> + </descriptorRefs> + </configuration> + </execution> + </executions> + <configuration> + <archive> + <manifest> + <mainClass>org.apache.catalina.startup.Bootstrap</mainClass> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> + </manifest> + <manifestEntries> + <Class-Path>juli-${tomcat.version}.jar</Class-Path> + </manifestEntries> + </archive> + </configuration> + </plugin> + </plugins> + </pluginManagement> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.1.1</version> + <inherited>true</inherited> + + <executions> + <execution> + <id>package-config</id> + <phase>prepare-package</phase> + <goals> + <goal>war</goal> + </goals> + </execution> + </executions> + + <configuration> + <webXml>${project.build.directory}/resources/solr-webapp/WEB-INF/web.xml</webXml> + <classifier>${environment}</classifier> + <webResources> + <!-- + | webResources is overridden so can't be moved in a common place + --> + <resource> + <directory>${project.build.directory}/resources/solr-webapp</directory> + <excludes> + <exclude>**/*.ico</exclude> + <exclude>**/web.xml</exclude> + </excludes> + <filtering>true</filtering> + </resource> + + <resource> + <directory>${project.build.directory}/resources/solr-webapp</directory> + <includes> + <include>**/*.ico</include> + </includes> + </resource> + + <resource> + <directory>${project.build.directory}/resources/solr-commons</directory> + <targetPath>/WEB-INF/classes</targetPath> + </resource> + </webResources> + + <archive> + <manifest> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> + </manifest> + <manifestEntries> + <Implementation-Build>${implementation.build}</Implementation-Build> + <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK> + <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK> + </manifestEntries> + </archive> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>unpack-shared-resources</id> + <phase>generate-resources</phase> + <goals> + <goal>unpack-dependencies</goal> + </goals> + <configuration> + <outputDirectory>${project.build.directory}/resources</outputDirectory> + <includeTypes>zip</includeTypes> + <excludeTransitive>true</excludeTransitive> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>dev</id> + + <properties> + <environment>dev</environment> + </properties> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <filters> + <filter>${basedir}/src/main/filters/prod.properties</filter> + <filter>${basedir}/src/main/filters/dev.properties</filter> + </filters> + </configuration> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>stage</id> + + <properties> + <environment>stage</environment> + </properties> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <filters> + <filter>${basedir}/src/main/filters/prod.properties</filter> + <filter>${basedir}/src/main/filters/stage.properties</filter> + </filters> + </configuration> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>test</id> + + <properties> + <environment>test</environment> + </properties> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <filters> + <filter>${basedir}/src/main/filters/prod.properties</filter> + <filter>${basedir}/src/main/filters/test.properties</filter> + </filters> + </configuration> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>prod</id> + + <properties> + <environment>prod</environment> + </properties> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <filters> + <filter>${basedir}/src/main/filters/prod.properties</filter> + </filters> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + + <dependencies> + <!-- + | Resources dependencies + --> + <dependency> + <groupId>com.sourcesense.solr</groupId> + <artifactId>solr-commons</artifactId> + <version>${solrp.version}</version> + <classifier>resources</classifier> + <type>zip</type> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>com.sourcesense.solr</groupId> + <artifactId>solr-webapp</artifactId> + <version>${solrp.version}</version> + <classifier>resources</classifier> + <type>zip</type> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>com.sourcesense.solr</groupId> + <artifactId>tomcat-resources</artifactId> + <version>${solrp.version}</version> + <classifier>resources</classifier> + <type>zip</type> + <scope>provided</scope> + </dependency> + + <!-- + | Tomcat dependencies + --> + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>catalina</artifactId> + <version>${tomcat.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>coyote</artifactId> + <version>${tomcat.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>jasper</artifactId> + <version>${tomcat.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>juli</artifactId> + <version>${tomcat.version}</version> + <scope>provided</scope> + </dependency> + + <!-- + | Solr Dependencies + --> + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-core</artifactId> + <version>${solr.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-solrj</artifactId> + <version>${solr.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-clustering</artifactId> + <version>${solr.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-cell</artifactId> + <version>${solr.version}</version> + <scope>runtime</scope> + </dependency> + + <!-- + | Just templates, replace them with your own modules + | + <dependency> + <groupId>bazzar</groupId> + <artifactId>core01</artifactId> + <version>0.0.1-SNAPSHOT</version> + <classifier>master-resources-${environment}</classifier> + <type>zip</type> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>bazzar</groupId> + <artifactId>core02</artifactId> + <version>0.0.1-SNAPSHOT</version> + <classifier>master-resources-${environment}</classifier> + <type>zip</type> + <scope>provided</scope> + </dependency> + --> + + <!-- + | Missing slf4j stuff + --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>${slf4j.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-jdk14</artifactId> + <version>${slf4j.version}</version> + <scope>runtime</scope> + </dependency> + </dependencies> + +</project> _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs