|
@@ -118,79 +118,98 @@
|
|
|
<build>
|
|
|
|
|
|
<plugins>
|
|
|
- <plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-clean-plugin</artifactId>
|
|
|
+ <version>2.5</version>
|
|
|
+ <configuration>
|
|
|
+ <filesets>
|
|
|
+ <fileset>
|
|
|
+ <directory>${ui.directory}</directory>
|
|
|
+ <followSymlinks>false</followSymlinks>
|
|
|
+ <includes>
|
|
|
+ <include>public/**</include>
|
|
|
+ <include>node_modules/**</include>
|
|
|
+ <include>bower_components/**</include>
|
|
|
+ <include>node/**</include>
|
|
|
+ </includes>
|
|
|
+ </fileset>
|
|
|
+ </filesets>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
<groupId>com.github.eirslett</groupId>
|
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
|
<version>0.0.14</version>
|
|
|
-
|
|
|
- <!-- optional -->
|
|
|
<configuration>
|
|
|
- <workingDirectory>src/main/resources/ui</workingDirectory>
|
|
|
+ <workingDirectory>${ui.directory}</workingDirectory>
|
|
|
</configuration>
|
|
|
|
|
|
<executions>
|
|
|
- <execution>
|
|
|
- <!-- optional: you don't really need execution ids, but it looks nice
|
|
|
- in your build log. -->
|
|
|
+ <execution>
|
|
|
<id>install node and npm</id>
|
|
|
<goals>
|
|
|
- <goal>install-node-and-npm</goal>
|
|
|
+ <goal>install-node-and-npm</goal>
|
|
|
</goals>
|
|
|
<!-- optional: default phase is "generate-resources" -->
|
|
|
- <phase>generate-resources</phase>
|
|
|
+ <phase>initialize</phase>
|
|
|
<configuration>
|
|
|
- <nodeVersion>v0.10.26</nodeVersion>
|
|
|
- <npmVersion>1.4.3</npmVersion>
|
|
|
+ <nodeVersion>v0.10.26</nodeVersion>
|
|
|
+ <npmVersion>1.4.3</npmVersion>
|
|
|
</configuration>
|
|
|
- </execution>
|
|
|
- <execution>
|
|
|
+ </execution>
|
|
|
+ <execution>
|
|
|
<id>npm install</id>
|
|
|
<goals>
|
|
|
- <goal>npm</goal>
|
|
|
+ <goal>npm</goal>
|
|
|
</goals>
|
|
|
-
|
|
|
- <!-- optional: default phase is "generate-resources" -->
|
|
|
<phase>generate-resources</phase>
|
|
|
-
|
|
|
<configuration>
|
|
|
- <!-- optional: The default argument is actually "install", so unless
|
|
|
- you need to run some other npm command, you can remove this whole <configuration>
|
|
|
- section. -->
|
|
|
- <arguments>install --python="${project.basedir}/../src/main/unix/ambari-python-wrap" --unsafe-perm --registry=http://registry.npmjs.eu</arguments>
|
|
|
+ <!-- optional: The default argument is actually "install", so unless
|
|
|
+ you need to run some other npm command, you can remove this whole <configuration>
|
|
|
+ section. -->
|
|
|
+ <arguments>install --unsafe-perm --registry=http://registry.npmjs.eu</arguments>
|
|
|
</configuration>
|
|
|
- </execution>
|
|
|
+ </execution>
|
|
|
</executions>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
<version>1.2.1</version>
|
|
|
<executions>
|
|
|
- <execution>
|
|
|
+ <execution>
|
|
|
+ <id>node gyp executable</id>
|
|
|
+ <phase>initialize</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>exec</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <skip>${skip.nodegyp.chmod}</skip>
|
|
|
+ <workingDirectory>${ui.directory}</workingDirectory>
|
|
|
+ <executable>chmod</executable>
|
|
|
+ <arguments>
|
|
|
+ <argument>+x</argument>
|
|
|
+ <argument>${ui.directory}/node/npm/bin/node-gyp-bin/node-gyp</argument>
|
|
|
+ </arguments>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ <execution>
|
|
|
<id>Brunch build</id>
|
|
|
<phase>generate-resources</phase>
|
|
|
<goals>
|
|
|
- <goal>exec</goal>
|
|
|
+ <goal>exec</goal>
|
|
|
</goals>
|
|
|
<configuration>
|
|
|
- <workingDirectory>${basedir}/src/main/resources/ui</workingDirectory>
|
|
|
- <executable>node/node</executable>
|
|
|
- <arguments>
|
|
|
- <argument>node_modules/.bin/brunch</argument>
|
|
|
+ <workingDirectory>${ui.directory}</workingDirectory>
|
|
|
+ <executable>${ui.directory}/node/${node.executable}</executable>
|
|
|
+ <arguments>
|
|
|
+ <argument>node_modules/brunch/bin/brunch</argument>
|
|
|
<argument>build</argument>
|
|
|
- </arguments>
|
|
|
+ </arguments>
|
|
|
</configuration>
|
|
|
- </execution>
|
|
|
+ </execution>
|
|
|
</executions>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-compiler-plugin</artifactId>
|
|
|
- <version>3.1</version>
|
|
|
- <configuration>
|
|
|
- <source>1.6</source>
|
|
|
- <target>1.6</target>
|
|
|
- </configuration>
|
|
|
</plugin>
|
|
|
<plugin>
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
@@ -302,5 +321,31 @@
|
|
|
</plugin>
|
|
|
</plugins>
|
|
|
</pluginManagement>
|
|
|
- </build>
|
|
|
+ </build>
|
|
|
+ <profiles>
|
|
|
+ <profile>
|
|
|
+ <id>windows</id>
|
|
|
+ <activation>
|
|
|
+ <os>
|
|
|
+ <family>win</family>
|
|
|
+ </os>
|
|
|
+ </activation>
|
|
|
+ <properties>
|
|
|
+ <node.executable>node.exe</node.executable>
|
|
|
+ <skip.nodegyp.chmod>true</skip.nodegyp.chmod>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>linux</id>
|
|
|
+ <activation>
|
|
|
+ <os>
|
|
|
+ <family>unix</family>
|
|
|
+ </os>
|
|
|
+ </activation>
|
|
|
+ <properties>
|
|
|
+ <node.executable>node</node.executable>
|
|
|
+ <skip.nodegyp.chmod>false</skip.nodegyp.chmod>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ </profiles>
|
|
|
</project>
|