blob: ffa9db026a5a1d7c3378b1aab171e7fae95897ed [file] [log] [blame]
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>zeppelin</artifactId>
<groupId>org.apache.zeppelin</groupId>
<version>0.8.2</version>
<relativePath>..</relativePath>
</parent>
<artifactId>zeppelin-distribution</artifactId>
<packaging>pom</packaging>
<name>Zeppelin: Packaging distribution</name>
<properties>
<deb.pkg.name>zeppelin</deb.pkg.name>
<deb.install.path>/usr/share/${deb.pkg.name}</deb.install.path>
<deb.conf.path>/etc/${deb.pkg.name}</deb.conf.path>
<deb.log.path>/var/log/${deb.pkg.name}</deb.log.path>
<deb.pid.path>/var/run/${deb.pkg.name}</deb.pid.path>
<deb.notebook.path>/var/lib/${deb.pkg.name}</deb.notebook.path>
<!-- NOTE: We can modify this setting with assembly settings -->
<deb.assembly.base.dir>target/zeppelin-${project.version}/zeppelin-${project.version}</deb.assembly.base.dir>
</properties>
<!-- NOTE: These dependency declarations are only required to sort this project to the
end of the line in the multimodule build.
-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scalap</artifactId>
<version>${scala.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>zeppelin-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>zeppelin-web</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>${project.parent.artifactId}-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>src/assemble/distribution.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<!--assembly does all the job here-->
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>scala-2.11</id>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-xml_${scala.binary.version}</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
<profile>
<id>publish-distr</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<!-- skip tests in surefire plugin -->
<!-- assembly:single -->
<!-- publish distribution to S3
to settings.xml add:
<profiles><profile>
<id>inject-s3-credentials</id>
<properties>
<s3-upload.accessKey>your-key</s3-upload.accessKey>
<s3-upload.secretKey>your-secret-key</s3-upload.secretKey>
</properties>
</profile></profiles>
<activeProfiles>
<activeProfile>inject-s3-credentials</activeProfile>
</activeProfiles>
-->
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deb</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<formats>
<format>dir</format>
</formats>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
<configuration>
<shortRevisionLength>8</shortRevisionLength>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.vafer</groupId>
<artifactId>jdeb</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
<deb>${project.build.directory}/zeppelin-${project.version}-${buildNumber}_all.deb</deb>
<attach>false</attach>
<skipPOMs>false</skipPOMs>
<dataSet>
<data>
<type>files</type>
<paths>
<path>${project.parent.basedir}/LICENSE</path>
<path>${project.parent.basedir}/README.md</path>
</paths>
<dst>${deb.install.path}</dst>
</data>
<data>
<type>directory</type>
<src>${project.basedir}/src/deb/init.d</src>
<mapper>
<type>perm</type>
<prefix>/etc/init.d</prefix>
<filemode>755</filemode>
</mapper>
</data>
<data>
<type>link</type>
<linkName>/usr/bin/zeppelin-daemon.sh</linkName>
<linkTarget>${deb.install.path}/bin/zeppelin-daemon.sh</linkTarget>
<symlink>true</symlink>
</data>
<data>
<type>link</type>
<linkName>${deb.install.path}/conf</linkName>
<linkTarget>${deb.conf.path}</linkTarget>
<symlink>true</symlink>
</data>
<data>
<type>link</type>
<linkName>${deb.install.path}/logs</linkName>
<linkTarget>${deb.log.path}</linkTarget>
<symlink>true</symlink>
</data>
<data>
<type>link</type>
<linkName>${deb.install.path}/notebook</linkName>
<linkTarget>${deb.notebook.path}</linkTarget>
<symlink>true</symlink>
</data>
<data>
<type>link</type>
<linkName>${deb.install.path}/run</linkName>
<linkTarget>${deb.pid.path}</linkTarget>
<symlink>true</symlink>
</data>
<data>
<type>directory</type>
<src>${deb.assembly.base.dir}/bin</src>
<mapper>
<type>perm</type>
<prefix>${deb.install.path}/bin</prefix>
<filemode>755</filemode>
</mapper>
</data>
<data>
<type>directory</type>
<src>${deb.assembly.base.dir}/conf</src>
<conffile>true</conffile>
<mapper>
<type>perm</type>
<prefix>${deb.conf.path}</prefix>
</mapper>
</data>
<data>
<type>directory</type>
<src>${deb.assembly.base.dir}/lib</src>
<mapper>
<type>perm</type>
<prefix>${deb.install.path}/lib</prefix>
</mapper>
</data>
<data>
<type>directory</type>
<src>${deb.assembly.base.dir}</src>
<includes>*.jar,*.war</includes>
<mapper>
<type>perm</type>
<prefix>${deb.install.path}</prefix>
</mapper>
</data>
<data>
<type>directory</type>
<src>${deb.assembly.base.dir}/interpreter</src>
<mapper>
<type>perm</type>
<prefix>${deb.install.path}/interpreter</prefix>
</mapper>
</data>
<data>
<type>directory</type>
<src>${deb.assembly.base.dir}/notebook</src>
<includes>2A94M5J1Z/note.json</includes>
<mapper>
<type>perm</type>
<prefix>${deb.notebook.path}</prefix>
</mapper>
</data>
<data>
<type>template</type>
<paths>
<path>${deb.conf.path}</path>
<path>${deb.log.path}</path>
<path>${deb.pid.path}</path>
<paht>${deb.notebook.path}</paht>
</paths>
</data>
</dataSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>