Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #68 from vrockai/HAWKULAR-112
Browse files Browse the repository at this point in the history
Updating maven build profiles
  • Loading branch information
mtho11 committed Apr 2, 2015
2 parents 3ee33c3 + e890f08 commit 9cdbb0f
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 8 deletions.
25 changes: 18 additions & 7 deletions ui/README.adoc
Expand Up @@ -23,15 +23,14 @@ http://nodejs.org/[Node.js] and its related modules are managed by the https://g
They are downloaded to the build target (./console/target) directory, where the actual http://gulpjs.com/[Gulp] based build process
(triggered by the maven plugin) happens.

To save some time during the build process, the downloaded http://nodejs.org/[Node.js] files and its related modules are not deleted after the
To save some time during the build process, the downloaded http://nodejs.org/[Node.js] files and its related modules
don't have to be deleted after invoking the `clean` target. If you want to persist the node.js related stuff in the target
directory, please use the `cache` profile:

`mvn clean`
`mvn clean -Pcache`

is executed. If you want to delete the whole target directory, please use the `release` profile:

`mvn clean -Prelease`

In that case, the http://nodejs.org/[Node.js] is downloaded again, together with relevant modules.
In that case, the http://nodejs.org/[Node.js] is not deleted and doesn't have to be downloaded again, together with
npm modules and bower packages. Be aware, this causes the libraries not being updated.

After the console is built, you can access it by traversing to the the build target (./console/target/gulp-build) directory:

Expand All @@ -46,6 +45,18 @@ it's only a front-end and you need the server running for console to work proper
that is scans for file changes in the source directory and apply them directly into the target directory, which is
suitable for console developing since it doesn't require the whole maven build to see the actual changes in the console UI.

== Hawkular-ui-components development

If you want to use your local version of hawkular-ui-components, you can use the `link` profile and the
https://oncletom.io/2013/live-development-bower-component/[bower link functionality]. In the hawkular-ui-components,
link your bower package with:

`bower link`

and then build the kettle with:

`mvn clean install -Plink`

== Dev Install

You can still re-build the console using only java-script based tools. Please do that only after maven build and
Expand Down
76 changes: 75 additions & 1 deletion ui/console/pom.xml
Expand Up @@ -156,6 +156,12 @@
<include>libs/**</include>
<include>dist/**</include>
</includes>
<excludes>
<exclude>node_modules/**</exclude>
<exclude>.bower/**</exclude>
<exclude>node/**</exclude>
<exclude>libs/hawkular-ui-components/node_modules/**</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</webResources>
Expand All @@ -167,7 +173,7 @@

<profiles>
<profile>
<id>dev</id>
<id>cache</id>
<properties>
<hawkular.console.context>/</hawkular.console.context>
<hawkular.console.index.html.base.href>/</hawkular.console.index.html.base.href>
Expand All @@ -194,5 +200,73 @@
</plugins>
</build>
</profile>

<profile>
<id>link</id>
<properties>
<hawkular.console.context>/</hawkular.console.context>
<hawkular.console.index.html.base.href>/</hawkular.console.index.html.base.href>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.20</version>

<configuration>
<workingDirectory>target/gulp-build/</workingDirectory>
</configuration>

<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<nodeVersion>v0.10.33</nodeVersion>
<npmVersion>2.1.10</npmVersion>
</configuration>
</execution>

<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>

<execution>
<id>bower link</id>
<goals>
<goal>bower</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<arguments>link hawkular-ui-components</arguments>
</configuration>
</execution>

<execution>
<id>gulp build</id>
<goals>
<goal>gulp</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<arguments>build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 9cdbb0f

Please sign in to comment.