| <!-- |
| ! 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>apache-asterixdb</artifactId> |
| <groupId>org.apache.asterix</groupId> |
| <version>0.9.8-SNAPSHOT</version> |
| </parent> |
| <modelVersion>4.0.0</modelVersion> |
| <artifactId>asterix-dashboard</artifactId> |
| |
| <properties> |
| <root.dir>${basedir}/..</root.dir> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.hyracks</groupId> |
| <artifactId>hyracks-http</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.asterix</groupId> |
| <artifactId>asterix-common</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-api</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-databind</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>io.netty</groupId> |
| <artifactId>netty-codec-http</artifactId> |
| </dependency> |
| </dependencies> |
| |
| <profiles> |
| <profile> |
| <id>include-dashboard</id> |
| <activation> |
| <activeByDefault>true</activeByDefault> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>com.github.eirslett</groupId> |
| <artifactId>frontend-maven-plugin</artifactId> |
| <version>1.11.0</version> |
| <configuration> |
| <nodeVersion>v14.15.4</nodeVersion> |
| <npmVersion>6.14.11</npmVersion> |
| <workingDirectory>target/dashboard</workingDirectory> |
| <installDirectory>target/dashboard</installDirectory> |
| </configuration> |
| <executions> |
| <execution> |
| <id>install node and yarn</id> |
| <goals> |
| <goal>install-node-and-npm</goal> |
| </goals> |
| <phase>generate-resources</phase> |
| </execution> |
| <execution> |
| <id>npm install</id> |
| <phase>process-resources</phase> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <configuration> |
| <arguments>install --cache ${settings.localRepository}/.npm-cache --no-optional</arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>npm run-script mavenbuild</id> |
| <phase>compile</phase> |
| <goals> |
| <goal>npm</goal> |
| </goals> |
| <configuration> |
| <arguments>run-script mavenbuild</arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-resources-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-static</id> |
| <phase>${resource.stage}</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory> |
| ${basedir}/target/classes/dashboard/ |
| </outputDirectory> |
| <resources> |
| <resource> |
| <directory>${basedir}/target/dashboard/static/ |
| </directory> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| <execution> |
| <id>copy-node</id> |
| <phase>validate</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory> |
| ${basedir}/target/dashboard |
| </outputDirectory> |
| <resources> |
| <resource> |
| <directory>${basedir}/src/node |
| </directory> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.hyracks</groupId> |
| <artifactId>license-automation-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>${license.stage}</phase> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <templateRootDir>${basedir}</templateRootDir> |
| <outputDir>${project.build.directory}/classes/META-INF</outputDir> |
| <generatedFiles> |
| <generatedFile> |
| <template>src/main/licenses/dashboard-license.ftl</template> |
| <outputFile>LICENSE</outputFile> |
| </generatedFile> |
| </generatedFiles> |
| <location>repo/</location> |
| <timeoutSecs>10</timeoutSecs> |
| <downloadDir> |
| ${project.build.directory}/generated-resources/license |
| </downloadDir> |
| <excludedScopes> |
| <excludedScope>test</excludedScope> |
| </excludedScopes> |
| <licenseDirectory>${basedir}/src/main/licenses/content</licenseDirectory> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>skip-dashboard</id> |
| </profile> |
| </profiles> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>touch-3rdparty</id> |
| <phase>${skip-npm-touch.stage}</phase> |
| <configuration> |
| <target> |
| <touch file="${basedir}/target/dashboard/static/3rdpartylicenses.txt" mkdirs="true"/> |
| </target> |
| </configuration> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |