You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2018/07/27 10:03:46 UTC
[21/53] [partial] brooklyn-ui git commit: Update Brooklyn codebase to
build the newly donated UI
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/47b46402/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a9587bb..f9895b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,23 @@
<?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.
+-->
+<!--
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
@@ -28,15 +46,15 @@
<relativePath></relativePath> <!-- prevent loading of ../pom.xml as the "parent" -->
</parent>
- <groupId>org.apache.brooklyn</groupId>
- <artifactId>brooklyn-jsgui</artifactId>
- <version>1.0.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
- <packaging>war</packaging>
-
- <name>Brooklyn REST JavaScript Web GUI</name>
+ <groupId>org.apache.brooklyn.ui</groupId>
+ <artifactId>brooklyn-ui-parent</artifactId>
+ <version>${revision}</version>
+ <packaging>pom</packaging>
+ <name>Brooklyn UI :: Parent</name>
<description>
- JavaScript+HTML GUI for interacting with Brooklyn, using the REST API
+ Angular JS UI for interacting with Brooklyn, using the REST API,
+ with server-side multi-module support
</description>
<scm>
@@ -66,152 +84,219 @@
</mailingList>
</mailingLists>
+ <modules>
+ <module>modularity-server</module>
+ <module>ui-modules</module>
+ <module>features</module>
+ </modules>
+
<properties>
- <project.build.webapp>
- ${project.build.directory}/${project.build.finalName}
- </project.build.webapp>
- <nodejs.path>${project.basedir}/target/nodejs/node</nodejs.path>
- <jasmine-maven-plugin.version>2.1</jasmine-maven-plugin.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
- <phantomjs.version>2.1.1</phantomjs.version>
- <maven-dependency-plugin.version>2.8</maven-dependency-plugin.version>
- <nodejs-maven-plugin.version>1.0.3</nodejs-maven-plugin.version>
- <maven-war-plugin.version>2.4</maven-war-plugin.version>
- <nodejs-maven-binaries.version>0.10.25</nodejs-maven-binaries.version>
- <requirejs-maven-plugin.version>2.0.0</requirejs-maven-plugin.version>
- <maven-replacer-plugin.version>1.5.2</maven-replacer-plugin.version>
- <maven-resources-plugin.version>2.7</maven-resources-plugin.version>
+ <revision>${brooklyn.ui.version}</revision>
+ <brooklyn.ui.brand.dir>default</brooklyn.ui.brand.dir><!-- empty string not allowed by npm plugin -->
+ <brooklyn.ui.version>${brooklyn.version}</brooklyn.ui.version><!-- this is intended to be overridden by branded projects -->
+ <brooklyn.ui.modules.version>${brooklyn.ui.version}</brooklyn.ui.modules.version>
+ <brooklyn.ui.modularity.version>${brooklyn.ui.version}</brooklyn.ui.modularity.version><!-- this can be set different to ensure correct references if branded project is only rebuilding modules -->
+ <assertj.version>2.2.0</assertj.version>
+ <brooklyn.version>1.0.0-SNAPSHOT</brooklyn.version><!-- BROOKLYN_VERSION -->
+ <build.version>${revision}</build.version>
+ <build.name>Apache Brooklyn</build.name>
+ <buildnumber-maven-plugin.version>1.4</buildnumber-maven-plugin.version>
+ <testng.version>6.8</testng.version>
+ <mockito.version>1.10.19</mockito.version>
+ <commons-lang3.version>3.3.2</commons-lang3.version>
+ <commons-codec.version>1.9</commons-codec.version>
+ <maven-bundle-plugin.version>3.0.1</maven-bundle-plugin.version>
+ <build-helper-maven-plugin.version>1.10</build-helper-maven-plugin.version>
+ <servlet-api.version>2.5</servlet-api.version>
+ <jetty.version>9.3.14.v20161028</jetty.version>
+ <slf4j.version>1.7.14</slf4j.version>
+ <osgi.core.version>6.0.0</osgi.core.version>
+ <frontend-maven-plugin.version>1.3</frontend-maven-plugin.version>
+ <karaf.version>4.1.2</karaf.version>
+ <javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
+ <cxf.version>3.1.10</cxf.version>
+ <fasterxml.jackson.version>2.4.5</fasterxml.jackson.version>
+ <node.version>v8.4.0</node.version>
+ <npm.version>5.4.1</npm.version>
+ <commons-io.version>2.4</commons-io.version>
+ <snakeyaml.version>1.11</snakeyaml.version>
+ <guava.version>18.0</guava.version>
+ <pax-web-extender-whiteboard.version>6.0.6</pax-web-extender-whiteboard.version>
+ <maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
+ <maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
+ <maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
+ <maven-war-plugin.version>3.0.0</maven-war-plugin.version>
</properties>
<build>
- <resources>
- <resource>
- <directory>${project.basedir}/src/test/resources/fixtures</directory>
- <targetPath>${project.build.directory}/jasmine/fixtures</targetPath>
- </resource>
- <resource>
- <targetPath>META-INF</targetPath>
- <directory>${project.basedir}</directory>
- <includes>
- <include>NOTICE</include>
- <include>LICENSE</include>
- </includes>
- </resource>
- </resources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${maven-bundle-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>${karaf.version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>${build-helper-maven-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>${maven-clean-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${maven-compiler-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>${maven-resources-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>${maven-war-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>${buildnumber-maven-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <version>${frontend-maven-plugin.version}</version>
+ <configuration>
+ <installDirectory>${session.executionRootDirectory}/target</installDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>install node and npm</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ <configuration>
+ <nodeVersion>${node.version}</nodeVersion>
+ <npmVersion>${npm.version}</npmVersion>
+ </configuration>
+ </execution>
+ <execution>
+ <id>npm install</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <configuration>
+ <arguments>install</arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>npm build</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <configuration>
+ <arguments>run build</arguments>
+ <environmentVariables>
+ <NODE_ENV>production</NODE_ENV>
+ <BROOKLYN_VERSION>${brooklyn.version}</BROOKLYN_VERSION>
+ <BUILD_VERSION>${build.version}</BUILD_VERSION>
+ <BUILD_NAME>${build.name}</BUILD_NAME>
+ <BUILD_BRANCH>${scmBranch}</BUILD_BRANCH>
+ <BUILD_COMMIT_ID>${buildNumber}</BUILD_COMMIT_ID>
+ <BROOKLYN_UI_BRAND_DIR>${brooklyn.ui.brand.dir}</BROOKLYN_UI_BRAND_DIR>
+ </environmentVariables>
+ </configuration>
+ </execution>
+ <execution>
+ <id>npm test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <configuration>
+ <arguments>test</arguments>
+ <environmentVariables>
+ <NODE_ENV>production</NODE_ENV>
+ <BROOKLYN_VERSION>${brooklyn.version}</BROOKLYN_VERSION>
+ <BUILD_VERSION>${build.version}</BUILD_VERSION>
+ <BUILD_NAME>${build.name}</BUILD_NAME>
+ <BUILD_BRANCH>${scmBranch}</BUILD_BRANCH>
+ <BUILD_COMMIT_ID>${buildNumber}</BUILD_COMMIT_ID>
+ <BROOKLYN_UI_BRAND_DIR>${brooklyn.ui.brand.dir}</BROOKLYN_UI_BRAND_DIR>
+ </environmentVariables>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
- <!-- require maven 3.1. jasmine will fail with cryptic error otherwise,
- so let's make it print a nicer message if running with the wrong maven. -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-maven</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireMavenVersion>
- <version>3.1</version>
- </requireMavenVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!--
- run js tests with: $ mvn clean process-test-resources jasmine:test
- run tests in the browser with: $ mvn jasmine:bdd
- -->
<plugin>
- <groupId>com.github.searls</groupId>
- <artifactId>jasmine-maven-plugin</artifactId>
- <version>${jasmine-maven-plugin.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>test</goal>
- </goals>
- </execution>
- </executions>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <!--Version of phantomjs needs to be specified for linux-->
- <phantomjs>
- <version>${phantomjs.version}</version>
- <checkSystemPath>true</checkSystemPath>
- <enforceVersion>true</enforceVersion>
- <source>REPOSITORY</source>
- <baseUrl/>
- <outputDirectory>target/phantomjs</outputDirectory>
- </phantomjs>
-
- <!--Uses the require.js test spec-->
- <specRunnerTemplate>REQUIRE_JS</specRunnerTemplate>
- <preloadSources>
- <source>js/libs/require.js</source>
- </preloadSources>
-
- <!--Sources-->
- <jsSrcDir>${project.basedir}/src/main/webapp/assets</jsSrcDir>
- <jsTestSrcDir>${project.basedir}/src/test/javascript/specs</jsTestSrcDir>
- <customRunnerConfiguration>
- ${project.basedir}/src/test/javascript/config.txt
- </customRunnerConfiguration>
- <!-- Makes output terser -->
- <format>progress</format>
- <additionalContexts>
- <!-- If context roots start with a / the resource will be available on the server at //root. -->
- <!-- It is an error for context roots to end with a /. -->
- <context>
- <contextRoot>fixtures</contextRoot>
- <directory>${project.build.directory}/jasmine/fixtures</directory>
- </context>
- </additionalContexts>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>${maven-war-plugin.version}</version>
+ <artifactId>maven-resources-plugin</artifactId>
<configuration>
- <useCache>true</useCache> <!-- to prevent replaced files being overwritten -->
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
+ <encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>3.2.0</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <configuration>
+ <shortRevisionLength>7</shortRevisionLength>
+ </configuration>
<executions>
<execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
+ <phase>validate</phase>
<goals>
- <goal>manifest</goal>
+ <goal>create</goal>
</goals>
</execution>
</executions>
- <configuration>
- <supportedProjectTypes>
- <supportedProjectType>war</supportedProjectType>
- </supportedProjectTypes>
- <instructions>
- <Web-ContextPath>/</Web-ContextPath>
- </instructions>
- </configuration>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>flatten-maven-plugin</artifactId>
+ <version>1.0.1</version>
<executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
+ <!-- enable flattening -->
+ <execution>
+ <id>flatten</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>flatten</goal>
+ </goals>
+ </execution>
+ <!-- ensure proper cleanup -->
+ <execution>
+ <id>flatten.clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -220,338 +305,88 @@
<!-- Overrides 0.11 from parent. Remove when parent catches up. -->
<version>0.12</version>
<executions>
- <execution>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
</executions>
<configuration>
<consoleOutput>true</consoleOutput>
<excludes combine.children="append">
- <!-- Exclude sandbox because not part of distribution: not in tgz, and not uploaded to maven-central -->
- <exclude>sandbox/**</exclude>
- <!-- Exclude release because not part of distribution: not in tgz, and not uploaded to maven-central -->
- <exclude>release/**</exclude>
- <exclude>README.md</exclude>
- <exclude>.mvn/jvm.config</exclude>
- <!-- git and IDE project files -->
- <!-- see https://issues.apache.org/jira/browse/RAT-107 -->
- <exclude>**/.git/**</exclude>
- <exclude>**/.gitignore</exclude>
- <exclude>**/.repository/**</exclude>
- <exclude>**/.idea/**</exclude>
- <exclude>**/*.iml</exclude>
- <exclude>**/.classpath/**</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/.settings/**</exclude>
- <exclude>**/*.log</exclude>
- <exclude>**/brooklyn*.log.*</exclude>
- <exclude>**/target/**</exclude>
- <!-- Exclude netbeans config files (not part of the project, but often on users' drives -->
- <exclude>**/nbactions.xml</exclude>
- <exclude>**/nb-configuration.xml</exclude>
- <!-- files not requiring licence -->
- <exclude>ignored/**</exclude>
- <exclude>LICENSE.md</exclude>
- <exclude>**/src/main/license/**</exclude>
- <exclude>**/src/test/license/**</exclude>
- <exclude>**/MANIFEST.MF</exclude>
- <exclude>**/test-output/**</exclude>
-
- <!-- JavaScript & CSS code that is not copyright of Apache Foundation. It is included in NOTICE. -->
- <exclude>**/src/main/webapp/assets/js/libs/**</exclude>
- <exclude>**/src/build/requirejs-maven-plugin/r.js</exclude>
- <exclude>src/main/webapp/assets/js/util/code-complete/brooklyn-yaml-completion-proposals.js</exclude>
- <exclude>src/main/webapp/assets/js/util/code-complete/js-yaml-parser.js</exclude>
- <exclude>src/main/webapp/assets/css/codemirror.css</exclude>
- <exclude>src/main/webapp/assets/css/easy-autocomplete.css</exclude>
- <exclude>src/main/webapp/assets/css/show-hint.css</exclude>
- <exclude>src/main/webapp/assets/images/Sorting icons.psd</exclude>
- <!-- Downloaded if missing, binary - not included in the repo -->
- <exclude>src/main/webapp/assets/img/zeroclipboard/ZeroClipboard.swf</exclude>
-
- <exclude>src/test/resources/fixtures/*</exclude>
-
- <!--
- Copy of swagger-ui from https://github.com/swagger-api/swagger-ui tag::v2.1.3
- -->
- <exclude>**/src/main/webapp/assets/swagger-ui/**</exclude>
- <!-- maven cache -->
- <exclude>**/.m2/**</exclude>
-
- <!-- node JS built artifacts -->
+ <!-- Exclude these because they're technically part of the build (even though it's not in target) -->
<exclude>**/node_modules/**</exclude>
<exclude>**/dist/**</exclude>
- <!-- build files that cannot be changed (must be JSON); contents are trivial -->
+ <!-- babelrc files cannot contain comments so we can't insert the license header -->
<exclude>**/.babelrc</exclude>
- <exclude>new/ui-modules/blueprint-composer/test/fixtures/brooklyn-api/v1/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
-
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- com.github.skwakman.nodejs-maven-plugin
- </groupId>
- <artifactId>
- nodejs-maven-plugin
- </artifactId>
- <versionRange>
- [1.0.3,)
- </versionRange>
- <goals>
- <goal>extract</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>
- wagon-maven-plugin
- </artifactId>
- <versionRange>[1.0,)</versionRange>
- <goals>
- <goal>download-single</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.felix</groupId>
- <artifactId>
- maven-bundle-plugin
- </artifactId>
- <versionRange>
- [2.5.4,)
- </versionRange>
- <goals>
- <goal>manifest</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- <plugin>
- <!-- maven knows there is nothing to compile; but eclipse complains if this block is absent -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.6.1</version>
- <configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
</build>
+ <repositories>
+ <repository>
+ <id>apache-snapshots</id>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
<profiles>
- <profile>
- <id>nodejs-path-override</id>
+ <profile>
+ <id>clean-node</id>
<activation>
- <os>
- <family>linux</family>
- </os>
+ <property>
+ <name>clean-node</name>
+ </property>
</activation>
- <properties>
- <nodejs.path>${project.basedir}/src/build/nodejs</nodejs.path>
- </properties>
- <dependencies>
- <dependency>
- <groupId>com.github.skwakman.nodejs-maven-binaries</groupId>
- <artifactId>nodejs-maven-binaries</artifactId>
- <version>${nodejs-maven-binaries.version}</version>
- <classifier>linux-x64</classifier>
- <type>zip</type>
- </dependency>
- </dependencies>
- <build>
- <plugins>
+ <build>
+ <plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>${maven-dependency-plugin.version}</version>
- <executions>
- <execution>
- <id>unpack-nodejs64</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>unpack-dependencies</goal>
- </goals>
- <configuration>
- <includeGroupIds>com.github.skwakman.nodejs-maven-binaries</includeGroupIds>
- <includeArtifactIds>nodejs-maven-binaries</includeArtifactIds>
- <outputDirectory>
- ${project.basedir}/target/nodejs64/
- </outputDirectory>
- </configuration>
- </execution>
- </executions>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>dist</directory>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ <fileset>
+ <directory>bower_components</directory>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ <fileset>
+ <directory>node_modules</directory>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ </filesets>
+ </configuration>
</plugin>
</plugins>
- </build>
+ </build>
</profile>
-
<profile>
- <id>Optimize resources</id>
+ <id>skip-npm-install</id>
<activation>
<property>
- <name>!skipOptimization</name>
+ <name>skipNpmInstall</name>
</property>
</activation>
<build>
<plugins>
- <!-- Installs node.js in target/. Means we get the benefits of node's speed
- (compared to Rhino) without having to install it manually. -->
- <plugin>
- <groupId>com.github.skwakman.nodejs-maven-plugin</groupId>
- <artifactId>nodejs-maven-plugin</artifactId>
- <version>${nodejs-maven-plugin.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>extract</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <!-- target directory for node binaries -->
- <targetDirectory>${project.basedir}/target/nodejs/</targetDirectory>
- </configuration>
- </plugin>
-
- <!-- Including the exploded goal means sources are in place ready for the replacer plugin. -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>${maven-war-plugin.version}</version>
- <executions>
- <execution>
- <id>prepare-war</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>exploded</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <!-- Runs the require.js optimizer with node to produce a single artifact. -->
- <plugin>
- <groupId>com.github.mcheely</groupId>
- <artifactId>requirejs-maven-plugin</artifactId>
- <version>${requirejs-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>optimize-js</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>optimize</goal>
- </goals>
- <configuration>
- <configFile>${project.basedir}/src/build/optimize-js.conf.js</configFile>
- </configuration>
- </execution>
- <execution>
- <id>optimize-css</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>optimize</goal>
- </goals>
- <configuration>
- <configFile>${project.basedir}/src/build/optimize-css.conf.js</configFile>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <nodeExecutable>${nodejs.path}</nodeExecutable>
- <optimizerFile>${project.basedir}/src/build/requirejs-maven-plugin/r.js</optimizerFile>
- <!-- Replaces Maven tokens in the build file with their values -->
- <filterConfig>true</filterConfig>
- </configuration>
- </plugin>
-
- <!-- Modify index.html to point to the optimized resources generated above. -->
- <plugin>
- <groupId>com.google.code.maven-replacer-plugin</groupId>
- <artifactId>replacer</artifactId>
- <version>${maven-replacer-plugin.version}</version>
- <executions>
- <execution>
- <id>modify-for-optimized</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>replace</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <file>${project.build.webapp}/index.html</file>
- <replacements>
- <replacement>
- <token>assets/js/config.js</token>
- <value>assets/js/gui.all.min.js</value>
- </replacement>
- <replacement>
- <token>assets/css/styles.css</token>
- <value>assets/css/styles.min.css</value>
- </replacement>
- <replacement>
- <token>GIT_SHA_1</token>
- <value>${buildNumber}</value>
- </replacement>
- </replacements>
- </configuration>
- </plugin>
-
- <!-- Compress the minified files. Jetty will serve the gzipped content instead. -->
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
- <id>Compress resources</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <gzip src="${project.build.webapp}/assets/css/styles.min.css"
- destfile="${project.build.webapp}/assets/css/styles.min.css.gz"/>
- <gzip src="${project.build.webapp}/assets/css/brooklyn.css"
- destfile="${project.build.webapp}/assets/css/brooklyn.css.gz"/>
- <gzip src="${project.build.webapp}/assets/js/gui.all.min.js"
- destfile="${project.build.webapp}/assets/js/gui.all.min.js.gz"/>
- <gzip src="${project.build.webapp}/assets/js/libs/require.js"
- destfile="${project.build.webapp}/assets/js/libs/require.js.gz"/>
- </target>
- </configuration>
+ <id>npm install</id>
+ <phase>none</phase>
</execution>
</executions>
</plugin>
@@ -559,39 +394,30 @@
</build>
</profile>
<profile>
- <!-- see README in the directory referenced below -->
- <id>download-zeroclipboard</id>
+ <id>fix-npm-install-windows</id>
<activation>
- <file>
- <missing>src/main/webapp/assets/img/zeroclipboard/ZeroClipboard.swf</missing>
- </file>
+ <os>
+ <family>windows</family>
+ </os>
</activation>
<build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>wagon-maven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>download-zeroclipboard</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>download-single</goal>
- </goals>
- <configuration>
- <url>http://cdnjs.cloudflare.com</url>
- <fromFile>/ajax/libs/zeroclipboard/1.3.5/ZeroClipboard.swf</fromFile>
- <toDir>src/main/webapp/assets/img/zeroclipboard/</toDir>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>npm install</id>
+ <configuration>
+ <arguments>install --force</arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
</profile>
-
</profiles>
-
</project>
-
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/47b46402/src/build/.gitattributes
----------------------------------------------------------------------
diff --git a/src/build/.gitattributes b/src/build/.gitattributes
deleted file mode 100644
index 83a693d..0000000
--- a/src/build/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-#Don't auto-convert line endings for shell scripts on Windows (breaks the scripts)
-nodejs text eol=lf
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/47b46402/src/build/nodejs
----------------------------------------------------------------------
diff --git a/src/build/nodejs b/src/build/nodejs
deleted file mode 100755
index 2b00792..0000000
--- a/src/build/nodejs
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-#
-# 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.
-#
-# nodejs-maven-plugin incorrectly detects the architecture on
-# Linux x64 running 32 bit Java leading to the installation of
-# invalid nodejs binary - 32 bit on 64 bit OS. This is a
-# wrapper which makes a check for the architecture again and
-# forces the usage of the 64 bit binary. The 64 bit nodejs
-# is installed in advance in case we need it.
-#
-# target/nodejs64/node - the forcibly installed 64 bit binary
-# target/nodejs/node - the binary installed by nodejs-maven-plugin
-# could be 32 bit or 64 bit.
-#
-
-MACHINE_TYPE=`uname -m`
-if [ $MACHINE_TYPE = 'x86_64' ]; then
- NODE_PATH=$( dirname "$0" )/../../target/nodejs64/node
- chmod +x $NODE_PATH
- echo Forcing 64 bit nodejs at $NODE_PATH
-else
- NODE_PATH=$( dirname "$0" )/../../target/nodejs/node
-fi
-
-$NODE_PATH "$@"
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/47b46402/src/build/optimize-css.conf.js
----------------------------------------------------------------------
diff --git a/src/build/optimize-css.conf.js b/src/build/optimize-css.conf.js
deleted file mode 100644
index e0e2bc2..0000000
--- a/src/build/optimize-css.conf.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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.
-({
- cssIn: "${project.build.webapp}/assets/css/styles.css",
- out: "${project.build.webapp}/assets/css/styles.min.css",
-
- // CSS optimization options are:
- // - "standard": @import inlining, comment removal and line returns.
- // - "standard.keepLines": like "standard" but keeps line returns.
- // - "standard.keepComments": keeps the file comments, but removes line returns.
- // - "standard.keepComments.keepLines": keeps the file comments and line returns.
- // - "none": skip CSS optimizations.
- optimizeCss: "standard"
-})
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/47b46402/src/build/optimize-js.conf.js
----------------------------------------------------------------------
diff --git a/src/build/optimize-js.conf.js b/src/build/optimize-js.conf.js
deleted file mode 100644
index ca1f987..0000000
--- a/src/build/optimize-js.conf.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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.
-({
- // The entry point to the application. Brooklyn's is in config.js.
- name: "config",
- baseUrl: "${project.build.webapp}/assets/js",
- mainConfigFile: "${project.build.webapp}/assets/js/config.js",
- paths: {
- // Include paths to external resources (e.g. on a CDN) here.
-
- // Optimiser looks for js/requireLib.js by default.
- "requireLib": "libs/require"
- },
-
- // Place the optimised file in target/<war>/assets.
- out: "${project.build.webapp}/assets/js/gui.all.min.js",
-
- // Set to "none" to skip minification
- optimize: "uglify"
-})
-