Files
SearchServices/packaging/pom.xml
T

200 lines
9.9 KiB
XML

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-search-services</artifactId>
<name>Alfresco Search Services</name>
<description>Alfresco Search Services Solr distribution zip</description>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.timestamp>${maven.build.timestamp}</project.timestamp>
<project.build.key>${bamboo_buildKey}</project.build.key>
</properties>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-solr-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${project.version}</version>
<classifier>libs</classifier>
</dependency>
</dependencies>
<build>
<finalName>alfresco-search-services-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>config.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>unpack-solr-war</id>
<phase>validate</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<version>${solr.version}</version>
<type>zip</type>
<outputDirectory>${project.build.directory}</outputDirectory>
<excludes>**/*solr.xml</excludes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>unpack-solr-config</id>
<phase>validate</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${project.version}</version>
<outputDirectory>${project.build.directory}/alfresco-solr</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>unpack-solr-libs</id>
<phase>validate</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${project.version}</version>
<classifier>libs</classifier>
<outputDirectory>${project.build.directory}/solr-libs</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy</id>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${project.version}</version>
<outputDirectory>${project.build.directory}/solr-libs/libs</outputDirectory>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/wars</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Set the default solr home directory to solrhome -->
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<configuration>
<target>
<replace token= "SOLR_SERVER_DIR/solr" value="SOLR_TIP/../solrhome" dir="target/solr-${solr.version}">
<include name="**/bin/solr"/>
</replace>
<replace token= "%SOLR_SERVER_DIR%\solr" value="%SOLR_TIP%\..\solrhome" dir="target/solr-${solr.version}">
<include name="**/bin/solr.cmd"/>
</replace>
<replace token= "HOME/.solr.in.sh" value="SOLR_TIP/../solr.in.sh" dir="target/solr-${solr.version}">
<include name="**/bin/solr"/>
</replace>
<replace token= "\bin\solr.in.cmd" value="\..\solr.in.cmd" dir="target/solr-${solr.version}">
<include name="**/bin/solr.cmd"/>
</replace>
<replace token= "# Set the thread stack size" value="${alfresco.solr.config}${line.separator}${line.separator}# Set the thread stack size" dir="target/solr-${solr.version}">
<include name="**/bin/solr.in.sh"/>
</replace>
<replace token= "REM Set the thread stack size" value="${alfresco.solr.config.win}${line.separator}${line.separator}REM Set the thread stack size" dir="target/solr-${solr.version}">
<include name="**/bin/solr.in.cmd"/>
</replace>
<replace token= "${alfresco.solr.ssl.token}" value="${alfresco.solr.ssl}${line.separator} ${alfresco.solr.ssl.token}" dir="target/solr-${solr.version}">
<include name="**/server/etc/jetty*.xml"/>
</replace>
<replace token= "${alfresco.solr.ssl.need.token}" value="${alfresco.solr.ssl.need}" dir="target/solr-${solr.version}">
<include name="**/server/etc/jetty-ssl.xml"/>
</replace>
<replace token= "wantClientAuth" value="wantclientauth" dir="target/solr-${solr.version}">
<include name="**/server/etc/jetty-ssl.xml"/>
</replace>
<chmod file="target/solr-${solr.version}/bin/solr" perm="755"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly/solr-distribution.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</project>