mirror of https://github.com/apache/nifi.git
344 lines
17 KiB
XML
344 lines
17 KiB
XML
<?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>
|
|
<groupId>org.apache.nifi</groupId>
|
|
<artifactId>nifi</artifactId>
|
|
<version>2.0.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>nifi-frontend</artifactId>
|
|
<packaging>jar</packaging>
|
|
|
|
<properties>
|
|
<frontend.source>${basedir}/src/main/frontend</frontend.source>
|
|
<frontend.working.dir>${project.build.directory}/frontend-working-directory</frontend.working.dir>
|
|
<copy-rename-maven-plugin.version>1.0.1</copy-rename-maven-plugin.version>
|
|
<!--
|
|
Path to the theme file to be used.
|
|
-->
|
|
<frontend.theme.dir>${frontend.working.dir}/libs/shared/src/assets/themes</frontend.theme.dir>
|
|
<!--
|
|
Name of the theme file to be used.
|
|
-->
|
|
<frontend.theme.name>material</frontend.theme.name>
|
|
<frontend.skipTests>true</frontend.skipTests>
|
|
</properties>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<executions>
|
|
<!--
|
|
Copy src into frontend working directory.
|
|
-->
|
|
<execution>
|
|
<id>copy-source</id>
|
|
<phase>generate-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${frontend.working.dir}</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${frontend.source}</directory>
|
|
<filtering>false</filtering>
|
|
<excludes>
|
|
<exclude>.angular/**/*</exclude>
|
|
<exclude>.nx/**/*</exclude>
|
|
<exclude>node_modules/**/*</exclude>
|
|
<exclude>coverage/**/*</exclude>
|
|
<exclude>dist/**/*</exclude>
|
|
</excludes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<!--
|
|
Stage the final bundle of the application. Each application needs its own configuration.
|
|
-->
|
|
<execution>
|
|
<id>copy-built-nifi-app</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/${project.build.finalName}/nifi</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${frontend.working.dir}/dist/nifi/browser</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${frontend.working.dir}/dist/nifi</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>3rdpartylicenses.txt</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>copy-built-nifi-jolt-transform-ui-app</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/${project.build.finalName}/nifi-jolt-transform-ui</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${frontend.working.dir}/dist/nifi-jolt-transform-ui/browser</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${frontend.working.dir}/dist/nifi-jolt-transform-ui</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>3rdpartylicenses.txt</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>copy-built-standard-content-viewer-app</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/${project.build.finalName}/standard-content-viewer</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${frontend.working.dir}/dist/standard-content-viewer/browser</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${frontend.working.dir}/dist/standard-content-viewer</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>3rdpartylicenses.txt</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<!--
|
|
Copy the staged applications into the bundle. Each application requires its own configuration.
|
|
-->
|
|
<execution>
|
|
<id>bundle-built-nifi-app</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.outputDirectory}/nifi</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.build.directory}/${project.build.finalName}/nifi</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>bundle-built-nifi-jolt-transform-ui-app</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.outputDirectory}/nifi-jolt-transform-ui</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.build.directory}/${project.build.finalName}/nifi-jolt-transform-ui</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>bundle-built-standard-content-viewer-app</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.outputDirectory}/standard-content-viewer</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.build.directory}/${project.build.finalName}/standard-content-viewer</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>**/*</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.coderplus.maven.plugins</groupId>
|
|
<artifactId>copy-rename-maven-plugin</artifactId>
|
|
<version>${copy-rename-maven-plugin.version}</version>
|
|
<executions>
|
|
<!--
|
|
Copy theme.
|
|
-->
|
|
<execution>
|
|
<id>copy-theme-nifi</id>
|
|
<phase>generate-resources</phase>
|
|
<goals>
|
|
<goal>copy</goal>
|
|
</goals>
|
|
<configuration>
|
|
<sourceFile>${frontend.theme.dir}/${frontend.theme.name}.scss</sourceFile>
|
|
<destinationFile>${frontend.working.dir}/libs/shared/src/assets/themes/material.scss</destinationFile>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.github.eirslett</groupId>
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
<version>${frontend.mvn.plugin.version}</version>
|
|
<configuration>
|
|
<installDirectory>${frontend.working.dir}</installDirectory>
|
|
</configuration>
|
|
<executions>
|
|
<!--
|
|
Install node and npm.
|
|
-->
|
|
<execution>
|
|
<id>install-node-and-npm</id>
|
|
<goals>
|
|
<goal>install-node-and-npm</goal>
|
|
</goals>
|
|
<phase>initialize</phase>
|
|
<configuration>
|
|
<nodeVersion>${node.version}</nodeVersion>
|
|
</configuration>
|
|
</execution>
|
|
<!--
|
|
Install node_modules (build, test, AND client side dependencies).
|
|
-->
|
|
<execution>
|
|
<id>npm-install</id>
|
|
<goals>
|
|
<goal>npm</goal>
|
|
</goals>
|
|
<phase>generate-resources</phase>
|
|
<configuration>
|
|
<arguments>run ci</arguments>
|
|
<workingDirectory>${frontend.working.dir}</workingDirectory>
|
|
</configuration>
|
|
</execution>
|
|
<!--
|
|
Run the code linter
|
|
-->
|
|
<execution>
|
|
<id>lint</id>
|
|
<goals>
|
|
<goal>npx</goal>
|
|
</goals>
|
|
<phase>generate-resources</phase>
|
|
<configuration>
|
|
<arguments>env-cmd -f .build.env nx run-many -t lint</arguments>
|
|
<workingDirectory>${frontend.working.dir}</workingDirectory>
|
|
<skip>${frontend.skipTests}</skip>
|
|
</configuration>
|
|
</execution>
|
|
<!--
|
|
Run the unit tests
|
|
-->
|
|
<execution>
|
|
<id>unit-tests</id>
|
|
<goals>
|
|
<goal>npx</goal>
|
|
</goals>
|
|
<phase>test</phase>
|
|
<configuration>
|
|
<arguments>env-cmd -f .build.env nx run-many -t test --maxWorkers=2</arguments>
|
|
<workingDirectory>${frontend.working.dir}</workingDirectory>
|
|
<skip>${frontend.skipTests}</skip>
|
|
</configuration>
|
|
</execution>
|
|
<!--
|
|
Bundle, minify, and gzip compress all the javascript.
|
|
-->
|
|
<execution>
|
|
<id>package-web-ui</id>
|
|
<goals>
|
|
<goal>npx</goal>
|
|
</goals>
|
|
<phase>generate-resources</phase>
|
|
<configuration>
|
|
<arguments>env-cmd -f .build.env nx run-many -t build</arguments>
|
|
<workingDirectory>${frontend.working.dir}</workingDirectory>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.rat</groupId>
|
|
<artifactId>apache-rat-plugin</artifactId>
|
|
<configuration>
|
|
<excludes combine.children="append">
|
|
<exclude>src/main/frontend/coverage/**/*</exclude>
|
|
<exclude>src/main/frontend/node_modules/**/*</exclude>
|
|
<exclude>src/main/frontend/libs/shared/src/assets/fonts/**/*</exclude>
|
|
<exclude>src/main/frontend/.editorconfig</exclude>
|
|
<exclude>src/main/frontend/.build.env</exclude>
|
|
<exclude>src/main/frontend/README.md</exclude>
|
|
<exclude>src/main/frontend/.prettierrc</exclude>
|
|
<exclude>src/main/frontend/.prettierignore</exclude>
|
|
<exclude>src/main/frontend/dist/**/*</exclude>
|
|
<exclude>src/main/frontend/.angular/**/*</exclude>
|
|
<exclude>src/main/frontend/.nx/**/*</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project> |