[NIFI-2781] removing bower and allowing npm to manage client side resources in nifi-web-ui and nifi-jolt-transform-json-ui. This closes #1030

This commit is contained in:
Scott Aslan 2016-09-19 13:16:07 -04:00 committed by Matt Gilman
parent 0218bc61ef
commit e973874793
8 changed files with 75 additions and 75 deletions

View File

@ -136,7 +136,26 @@
</configuration>
</execution>
<execution>
<id>copy-bower-json</id>
<id>copy-client-side-deps</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${frontend.assets}</outputDirectory>
<resources>
<resource>
<directory>${frontend.working.dir}/node_modules</directory>
<filtering>false</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-package-json</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
@ -148,7 +167,7 @@
<directory>${frontend.dependency.configs}</directory>
<filtering>false</filtering>
<includes>
<include>bower.json</include>
<include>package.json</include>
</includes>
</resource>
</resources>
@ -271,22 +290,12 @@
</configuration>
</execution>
<execution>
<id>install-bower</id>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install bower</arguments>
<workingDirectory>${frontend.working.dir}</workingDirectory>
</configuration>
</execution>
<execution>
<id>bower-install</id>
<goals>
<goal>bower</goal>
</goals>
<configuration>
<arguments>install ${bower.options} --config.directory=${frontend.assets}</arguments>
<arguments>--cache-min Infinity install</arguments>
<workingDirectory>${frontend.working.dir}</workingDirectory>
</configuration>
</execution>
@ -787,7 +796,7 @@
<configuration>
<excludes combine.children="append">
<exclude>nbactions.xml</exclude>
<exclude>src/main/frontend/bower.json</exclude>
<exclude>src/main/frontend/package.json</exclude>
<exclude>src/main/webapp/js/json2.js</exclude>
<exclude>src/main/webapp/js/jquery/</exclude>
<exclude>src/main/webapp/js/d3/d3.min.js</exclude>

View File

@ -1,20 +0,0 @@
{
"name": "apache-nifi",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"font-awesome": "fontawesome#4.6.1",
"angular-material": "1.0.8",
"angular-resource": "1.5.5",
"angular-route": "1.5.5"
},
"resolutions": {
"angular": "1.5.8"
}
}

View File

@ -0,0 +1,14 @@
{
"name": "apache-nifi",
"dependencies": {
"font-awesome": "4.6.1",
"angular-material": "1.0.8",
"angular-resource": "1.5.5",
"angular-route": "1.5.5"
},
"description": "Apache NiFi 3rd party client side resources.",
"repository": {
"type": "git",
"url": "https://github.com/apache/nifi"
}
}

View File

@ -144,7 +144,26 @@ language governing permissions and limitations under the License. -->
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-bower-json</id>
<id>copy-client-side-deps</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${frontend.assets}</outputDirectory>
<resources>
<resource>
<directory>${frontend.working.dir}/node_modules</directory>
<filtering>false</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-package-json</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
@ -156,8 +175,7 @@ language governing permissions and limitations under the License. -->
<directory>${frontend.dependency.configs}</directory>
<filtering>false</filtering>
<includes>
<include>bower.json</include>
<include>.bowerrc</include>
<include>package.json</include>
</includes>
</resource>
</resources>
@ -172,7 +190,6 @@ language governing permissions and limitations under the License. -->
<configuration>
<installDirectory>${frontend.working.dir}</installDirectory>
</configuration>
<executions>
<execution>
<id>install-node-and-npm</id>
@ -186,22 +203,12 @@ language governing permissions and limitations under the License. -->
</configuration>
</execution>
<execution>
<id>install-bower</id>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install bower</arguments>
<workingDirectory>${frontend.working.dir}</workingDirectory>
</configuration>
</execution>
<execution>
<id>bower-install</id>
<goals>
<goal>bower</goal>
</goals>
<configuration>
<arguments>install --config.directory=${frontend.assets}</arguments>
<arguments>--cache-min Infinity install</arguments>
<workingDirectory>${frontend.working.dir}</workingDirectory>
</configuration>
</execution>
@ -212,8 +219,7 @@ language governing permissions and limitations under the License. -->
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<exclude>src/main/frontend/.bowerrc</exclude>
<exclude>src/main/frontend/bower.json</exclude>
<exclude>src/main/frontend/package.json</exclude>
<exclude>src/main/webapp/css/main.css</exclude>
<exclude>src/main/webapp/js/jsonlint/*</exclude>
<exclude>src/main/webapp/js/js-beautify/*</exclude>

View File

@ -1,6 +0,0 @@
{
"ignoredDependencies": [
"angular",
"codemirror"
]
}

View File

@ -1,15 +0,0 @@
{
"name": "apache-nifi",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"angular-ui-codemirror": "^0.3.0",
"angular-ui-router": "^0.2.18"
}
}

View File

@ -0,0 +1,12 @@
{
"name": "nifi-jolt-transform-json-ui",
"dependencies": {
"angular-ui-codemirror": "^0.3.0",
"angular-ui-router": "^0.2.18"
},
"description": "Apache NiFi Jolt Transform JSON UI 3rd party client side resources.",
"repository": {
"type": "git",
"url": "https://github.com/apache/nifi"
}
}

View File

@ -38,7 +38,7 @@
<script type="text/javascript" src="../nifi/assets/angular-material/angular-material.min.js"></script>
<!--Bower Libraries-->
<script type="text/javascript" src="assets/angular-ui-codemirror/ui-codemirror.min.js"></script>
<script type="text/javascript" src="assets/angular-ui-codemirror/src/ui-codemirror.js"></script>
<script type="text/javascript" src="assets/angular-ui-router/release/angular-ui-router.min.js"></script>
<!--Local Libraries-->