|
|
@@ -0,0 +1,336 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!--
|
|
|
+ Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
+ contributor license agreements. See the NOTICE file distributed with
|
|
|
+ this work for additional information regarding copyright ownership.
|
|
|
+ The ASF licenses this file to You 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 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">
|
|
|
+ <parent>
|
|
|
+ <artifactId>ambari-infra</artifactId>
|
|
|
+ <groupId>org.apache.ambari</groupId>
|
|
|
+ <version>2.0.0.0-SNAPSHOT</version>
|
|
|
+ </parent>
|
|
|
+ <modelVersion>4.0.0</modelVersion>
|
|
|
+ <artifactId>ambari-infra-assembly</artifactId>
|
|
|
+ <name>Ambari Infra Solr Assembly</name>
|
|
|
+ <url>http://maven.apache.org</url>
|
|
|
+
|
|
|
+ <properties>
|
|
|
+ <mapping.base.path>/usr/lib</mapping.base.path>
|
|
|
+ <!-- original apache repo location: http://archive.apache.org/dist/lucene/solr/${solr.version}/solr-${solr.version}.tgz -->
|
|
|
+ <solr.tar>http://public-repo-1.hortonworks.com/ARTIFACTS/dist/lucene/solr/${solr.version}/solr-${solr.version}.tgz</solr.tar>
|
|
|
+ <solr.mapping.path>${mapping.base.path}/ambari-infra-solr</solr.mapping.path>
|
|
|
+ <solr.package.name>ambari-infra-solr</solr.package.name>
|
|
|
+ <solr.client.package.name>ambari-infra-solr-client</solr.client.package.name>
|
|
|
+ <solr.client.mapping.path>${mapping.base.path}/${solr.client.package.name}</solr.client.mapping.path>
|
|
|
+ <solr.client.dir>${project.basedir}/../ambari-infra-solr-client</solr.client.dir>
|
|
|
+ <infra.solr.plugin.dir>${project.basedir}/../ambari-infra-solr-plugin</infra.solr.plugin.dir>
|
|
|
+ </properties>
|
|
|
+
|
|
|
+ <profiles>
|
|
|
+
|
|
|
+ <profile>
|
|
|
+ <id>rpm</id>
|
|
|
+ <properties>
|
|
|
+ <download.solr>true</download.solr>
|
|
|
+ </properties>
|
|
|
+ <activation>
|
|
|
+ <property>
|
|
|
+ <name>build-rpm</name>
|
|
|
+ </property>
|
|
|
+ </activation>
|
|
|
+ <build>
|
|
|
+ <plugins>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.codehaus.mojo</groupId>
|
|
|
+ <artifactId>rpm-maven-plugin</artifactId>
|
|
|
+ <version>2.1.4</version>
|
|
|
+ <configuration>
|
|
|
+ <copyright>2012, Apache Software Foundation</copyright>
|
|
|
+ <group>Development</group>
|
|
|
+ <description>Maven Recipe: RPM Package.</description>
|
|
|
+ <autoRequires>false</autoRequires>
|
|
|
+ <prefix>/</prefix>
|
|
|
+ <needarch>noarch</needarch>
|
|
|
+ <targetOS>linux</targetOS>
|
|
|
+
|
|
|
+ <version>${package-version}</version>
|
|
|
+ <release>${package-release}</release>
|
|
|
+
|
|
|
+ <defaultUsername>root</defaultUsername>
|
|
|
+ <defaultGroupname>root</defaultGroupname>
|
|
|
+ </configuration>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>infra-solr</id>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>rpm</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <group>Development</group>
|
|
|
+ <name>${solr.package.name}</name>
|
|
|
+ <mappings>
|
|
|
+ <mapping>
|
|
|
+ <directory>${solr.mapping.path}</directory>
|
|
|
+ <sources>
|
|
|
+ <source>
|
|
|
+ <location>${project.build.directory}/solr</location>
|
|
|
+ </source>
|
|
|
+ </sources>
|
|
|
+ </mapping>
|
|
|
+ </mappings>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ <execution>
|
|
|
+ <id>infra-solr-client</id>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>rpm</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <group>Development</group>
|
|
|
+ <name>${solr.client.package.name}</name>
|
|
|
+ <needarch>noarch</needarch>
|
|
|
+ <targetOS>linux</targetOS>
|
|
|
+ <mappings>
|
|
|
+ <mapping>
|
|
|
+ <directory>${solr.client.mapping.path}</directory>
|
|
|
+ <sources>
|
|
|
+ <source>
|
|
|
+ <location>${solr.client.dir}/target/package</location>
|
|
|
+ </source>
|
|
|
+ </sources>
|
|
|
+ </mapping>
|
|
|
+ </mappings>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-antrun-plugin</artifactId>
|
|
|
+ <version>1.7</version>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <phase>generate-resources</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>run</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <target name="Download Solr">
|
|
|
+ <get
|
|
|
+ src="${solr.tar}"
|
|
|
+ dest="${project.build.directory}/solr.tgz"
|
|
|
+ usetimestamp="true"
|
|
|
+ />
|
|
|
+ <untar
|
|
|
+ src="${project.build.directory}/solr.tgz"
|
|
|
+ dest="${project.build.directory}/"
|
|
|
+ compression="gzip"
|
|
|
+ />
|
|
|
+ <move todir="${project.build.directory}/solr">
|
|
|
+ <fileset dir="${project.build.directory}/solr-${solr.version}"/>
|
|
|
+ </move>
|
|
|
+ <copy file="${project.basedir}/src/main/resources/solr" toDir="${project.build.directory}/solr/bin/" />
|
|
|
+ <copy file="${infra.solr.plugin.dir}/target/ambari-infra-solr-plugin-${project.version}.jar"
|
|
|
+ toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/>
|
|
|
+ <chmod file="${project.build.directory}/solr/bin/**" perm="755"/>
|
|
|
+ <chmod file="${project.build.directory}/solr/server/scripts/**" perm="755"/>
|
|
|
+ </target>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ </plugins>
|
|
|
+ </build>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>deb</id>
|
|
|
+
|
|
|
+ <activation>
|
|
|
+ <property>
|
|
|
+ <name>build-deb</name>
|
|
|
+ </property>
|
|
|
+ </activation>
|
|
|
+
|
|
|
+ <build>
|
|
|
+ <plugins>
|
|
|
+ <plugin>
|
|
|
+ <artifactId>maven-resources-plugin</artifactId>
|
|
|
+ <version>2.7</version>
|
|
|
+
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>copy-resources</id>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>copy-resources</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <outputDirectory>${project.build.directory}/resources/deb</outputDirectory>
|
|
|
+ <resources>
|
|
|
+ <resource>
|
|
|
+ <directory>${project.basedir}/src/main/package/deb</directory>
|
|
|
+ <excludes>
|
|
|
+ <exclude>solr/postinst</exclude>
|
|
|
+ <exclude>solr-client/postinst</exclude>
|
|
|
+ </excludes>
|
|
|
+ <filtering>false</filtering>
|
|
|
+ </resource>
|
|
|
+ <resource>
|
|
|
+ <directory>${project.basedir}/src/main/package/deb</directory>
|
|
|
+ <includes>
|
|
|
+ <include>solr/postinst</include>
|
|
|
+ <include>solr-client/postinst</include>
|
|
|
+ </includes>
|
|
|
+ <filtering>true</filtering>
|
|
|
+ </resource>
|
|
|
+ </resources>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.vafer</groupId>
|
|
|
+ <artifactId>jdeb</artifactId>
|
|
|
+ <version>1.4</version>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <phase>package</phase>
|
|
|
+ <id>jdeb-solr</id>
|
|
|
+ <goals>
|
|
|
+ <goal>jdeb</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <controlDir>${basedir}/src/main/package/deb/solr</controlDir>
|
|
|
+ <deb>${basedir}/target/${solr.package.name}_${package-version}-${package-release}.deb</deb>
|
|
|
+ <skip>false</skip>
|
|
|
+ <skipPOMs>false</skipPOMs>
|
|
|
+ <dataSet>
|
|
|
+ <data>
|
|
|
+ <src>${project.build.directory}/solr</src>
|
|
|
+ <type>directory</type>
|
|
|
+ <mapper>
|
|
|
+ <type>perm</type>
|
|
|
+ <user>root</user>
|
|
|
+ <group>root</group>
|
|
|
+ <prefix>${solr.mapping.path}</prefix>
|
|
|
+ </mapper>
|
|
|
+ <excludes>
|
|
|
+ bin/**,server/scripts/**
|
|
|
+ </excludes>
|
|
|
+ </data>
|
|
|
+ <data>
|
|
|
+ <src>${project.build.directory}/solr</src>
|
|
|
+ <type>directory</type>
|
|
|
+ <mapper>
|
|
|
+ <type>perm</type>
|
|
|
+ <user>root</user>
|
|
|
+ <group>root</group>
|
|
|
+ <filemode>755</filemode>
|
|
|
+ <prefix>${solr.mapping.path}</prefix>
|
|
|
+ </mapper>
|
|
|
+ <includes>
|
|
|
+ bin/**,server/scripts/**
|
|
|
+ </includes>
|
|
|
+ </data>
|
|
|
+ </dataSet>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+
|
|
|
+ <execution>
|
|
|
+ <phase>package</phase>
|
|
|
+ <id>jdeb-solr-client</id>
|
|
|
+ <goals>
|
|
|
+ <goal>jdeb</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <controlDir>${basedir}/src/main/package/deb/solr-client</controlDir>
|
|
|
+ <deb>${basedir}/target/${solr.client.package.name}_${package-version}-${package-release}.deb</deb>
|
|
|
+ <skip>false</skip>
|
|
|
+ <skipPOMs>false</skipPOMs>
|
|
|
+ <dataSet>
|
|
|
+ <data>
|
|
|
+ <src>${solr.client.dir}/target/ambari-infra-solr-client.tar.gz</src>
|
|
|
+ <type>archive</type>
|
|
|
+ <mapper>
|
|
|
+ <type>perm</type>
|
|
|
+ <user>root</user>
|
|
|
+ <group>root</group>
|
|
|
+ <prefix>${solr.client.mapping.path}</prefix>
|
|
|
+ </mapper>
|
|
|
+ </data>
|
|
|
+ </dataSet>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-antrun-plugin</artifactId>
|
|
|
+ <version>1.7</version>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <phase>generate-resources</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>run</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <target name="Download Solr">
|
|
|
+ <get
|
|
|
+ src="${solr.tar}"
|
|
|
+ dest="${project.build.directory}/solr.tgz"
|
|
|
+ usetimestamp="true"
|
|
|
+ />
|
|
|
+ <untar
|
|
|
+ src="${project.build.directory}/solr.tgz"
|
|
|
+ dest="${project.build.directory}/"
|
|
|
+ compression="gzip"
|
|
|
+ />
|
|
|
+ <move todir="${project.build.directory}/solr">
|
|
|
+ <fileset dir="${project.build.directory}/solr-${solr.version}"/>
|
|
|
+ </move>
|
|
|
+ <copy file="${project.basedir}/src/main/resources/solr" toDir="${project.build.directory}/solr/bin/" />
|
|
|
+ <copy file="${infra.solr.plugin.dir}/target/ambari-infra-solr-plugin-${project.version}.jar"
|
|
|
+ toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/>
|
|
|
+ <chmod file="${project.build.directory}/solr/bin/**" perm="755"/>
|
|
|
+ <chmod file="${project.build.directory}/solr/server/scripts/**" perm="755"/>
|
|
|
+ </target>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ </plugins>
|
|
|
+ </build>
|
|
|
+ </profile>
|
|
|
+ </profiles>
|
|
|
+
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.apache.ambari</groupId>
|
|
|
+ <artifactId>ambari-infra-solr-client</artifactId>
|
|
|
+ <version>${project.version}</version>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.apache.ambari</groupId>
|
|
|
+ <artifactId>ambari-infra-solr-plugin</artifactId>
|
|
|
+ <version>${project.version}</version>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
+
|
|
|
+
|
|
|
+</project>
|