| <!-- |
| 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/maven-v4_0_0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| <groupId>org.apache.ambari.contrib.views</groupId> |
| <artifactId>hawq-view</artifactId> |
| <version>1.0.0.0-SNAPSHOT</version> |
| <name>HAWQ</name> |
| |
| <parent> |
| <groupId>org.apache.ambari.contrib.views</groupId> |
| <artifactId>ambari-contrib-views</artifactId> |
| <version>2.6.2.0.0</version> |
| </parent> |
| |
| <dependencies> |
| <dependency> |
| <groupId>postgresql</groupId> |
| <artifactId>postgresql</artifactId> |
| <version>9.1-901-1.jdbc4</version> |
| </dependency> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.easymock</groupId> |
| <artifactId>easymock</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>javax.servlet</groupId> |
| <artifactId>servlet-api</artifactId> |
| <version>2.5</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>com.sun.jersey</groupId> |
| <artifactId>jersey-server</artifactId> |
| <version>1.8</version> |
| </dependency> |
| <dependency> |
| <groupId>javax.inject</groupId> |
| <artifactId>javax.inject</artifactId> |
| <version>1</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.ambari</groupId> |
| <artifactId>ambari-views</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| <version>1.7.5</version> |
| </dependency> |
| <dependency> |
| <groupId>c3p0</groupId> |
| <artifactId>c3p0</artifactId> |
| <version>0.9.1.2</version> |
| </dependency> |
| <dependency> |
| <groupId>org.powermock</groupId> |
| <artifactId>powermock-module-junit4</artifactId> |
| <version>1.6.3</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.powermock</groupId> |
| <artifactId>powermock-api-easymock</artifactId> |
| <version>1.6.3</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <properties> |
| <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir> |
| <ui.dir>${basedir}/src/main/resources/ui</ui.dir> |
| <hawq-version>1.0.0</hawq-version> |
| <ambari.version>2.6.2.0.0</ambari.version> |
| <executable.node>node/node</executable.node> |
| <executable.npm>npm</executable.npm> |
| <args.npm></args.npm> |
| </properties> |
| |
| <build> |
| |
| <plugins> |
| <plugin> |
| <!-- Cleanup ui files --> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-clean-plugin</artifactId> |
| <version>2.5</version> |
| <configuration> |
| <filesets> |
| <fileset> |
| <directory>${ui.dir}</directory> |
| <followSymlinks>false</followSymlinks> |
| <includes> |
| <include>dist/**</include> |
| <include>tmp/**</include> |
| <include>node/**</include> |
| <include>node_modules/**</include> |
| <include>bower_components/**</include> |
| </includes> |
| <excludes> |
| <exclude>dist/view.xml</exclude> |
| <exclude>dist/WEB-INF</exclude> |
| <exclude>dist/org</exclude> |
| </excludes> |
| </fileset> |
| </filesets> |
| </configuration> |
| </plugin> |
| |
| <plugin> |
| <!-- Building frontend --> |
| <groupId>com.github.eirslett</groupId> |
| <artifactId>frontend-maven-plugin</artifactId> |
| <version>1.4</version> |
| <configuration> |
| <nodeVersion>v4.5.0</nodeVersion> |
| <yarnVersion>v0.23.2</yarnVersion> |
| <workingDirectory>${ui.dir}</workingDirectory> |
| <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven> |
| <!-- setting npm_config_tmp environment variable is a workaround for |
| https://github.com/Medium/phantomjs/issues/673 --> |
| <environmentVariables> |
| <npm_config_tmp>/tmp/npm_config_tmp</npm_config_tmp> |
| </environmentVariables> |
| </configuration> |
| <executions> |
| <execution> |
| <id>install node and yarn</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>install-node-and-yarn</goal> |
| </goals> |
| </execution> |
| <execution> |
| <id>yarn install --pure-lockfile</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>yarn</goal> |
| </goals> |
| <configuration> |
| <arguments>install --unsafe-perm</arguments> |
| <arguments>--ignore-engines</arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.3.2</version> |
| <executions> |
| <execution> |
| <id>HAWQ View build</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <workingDirectory>${ui.dir}</workingDirectory> |
| <executable>${executable.node}</executable> |
| <arguments> |
| <argument>node_modules/.bin/ember</argument> |
| <argument>build</argument> |
| <argument>--environment=production</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>HAWQ View Javascript Tests</id> |
| <phase>test</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <skip>${skipTests}</skip> |
| <executable>${executable.npm}</executable> |
| <workingDirectory>${ui.dir}</workingDirectory> |
| <commandlineArgs>${args.npm} test</commandlineArgs> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>generate-resources</phase> |
| <goals> |
| <goal>copy-dependencies</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.outputDirectory}/WEB-INF/lib</outputDirectory> |
| <includeScope>runtime</includeScope> |
| </configuration> |
| </execution> |
| <execution> |
| <id>copy-artifact</id> |
| <phase>package</phase> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>${project.groupId}</groupId> |
| <artifactId>${project.artifactId}</artifactId> |
| <version>${project.version}</version> |
| <type>${project.packaging}</type> |
| </artifactItem> |
| </artifactItems> |
| <outputDirectory>${views.jars.dir.rel}</outputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>false</filtering> |
| <includes> |
| <include>view.xml</include> |
| <include>view.log4j.properties</include> |
| </includes> |
| </resource> |
| |
| <resource> |
| <directory>${ui.dir}/dist</directory> |
| <filtering>false</filtering> |
| <includes> |
| <include>index.html</include> |
| <include>crossdomain.xml</include> |
| <include>robots.txt</include> |
| <include>assets/**/*</include> |
| </includes> |
| <excludes> |
| <exclude>assets/**/test*.*</exclude> |
| <exclude>assets/*.map</exclude> |
| <exclude>assets/passed.png</exclude> |
| <exclude>assets/failed.png</exclude> |
| </excludes> |
| </resource> |
| </resources> |
| |
| </build> |
| </project> |