Skip to content

Commit

Permalink
added maven task to inject project version into frontend cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
tomek committed Oct 18, 2012
1 parent 374dc59 commit 94ca121
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 43 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/src/main/frontend/contribs/dialog/build/
/src/main/webapp/WEB-INF/logs/
/src/main/webapp/gui/resource/
/src/main/webapp/gui/script/
/src/main/webapp/gui/script/
/src/main/frontend/version.json
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Helenos is a web based GUI Cassandra client that helps you to explore data and m

[Picasa album](https://picasaweb.google.com/tomekkuprowski/Helenos)

## Twitter

You can track my tweets to keep up with new releases [Tweeter] (https://twitter.com/tomekkup)

## Features

* Listing keyspaces and column families
Expand Down
20 changes: 20 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="helenos" basedir=".">

<target name="create-version-signature-file">
<echo file="src/main/frontend/version.json" append="false">{
"let" : {
"HELENOS_VERSION" : "${app_version}"
},
"jobs" : {
"build-withver" : {
"extend" : ["build"],
"environment" : {
"qx.app.version" : "${HELENOS_VERSION}"
}
}
}
}
</echo>
</target>
</project>
79 changes: 45 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
<jsonrpc4j.version>0.23</jsonrpc4j.version>
<jackson.version>1.9.7</jackson.version>
<hector.version>1.1-0</hector.version>
<maven.plugin.compiler.version>2.5.1</maven.plugin.compiler.version>
<maven.plugin.dependency.version>2.4</maven.plugin.dependency.version>
<maven.plugin.resources.version>2.4.3</maven.plugin.resources.version>
<maven.plugin.exec.version>1.2.1</maven.plugin.exec.version>
<maven.plugin.tomcat7.version>2.0-beta-1</maven.plugin.tomcat7.version>
<maven.plugin.surefire.version>2.12</maven.plugin.surefire.version>
<maven.plugin.clean.version>2.5</maven.plugin.clean.version>
<maven.plugin.install.version>2.3.1</maven.plugin.install.version>
<maven.plugin.site.version>3.1</maven.plugin.site.version>
<maven.plugin.war.version>2.2</maven.plugin.war.version>
<maven.plugin.source.version>2.1.2</maven.plugin.source.version>
<maven.plugin.antrun.version>1.7</maven.plugin.antrun.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -124,7 +136,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<version>${maven.plugin.dependency.version}</version>
<executions>
<execution>
<phase>compile</phase>
Expand All @@ -140,7 +152,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<version>${maven.plugin.compiler.version}</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
Expand All @@ -150,35 +162,35 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<version>${maven.plugin.surefire.version}</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<version>${maven.plugin.clean.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<version>${maven.plugin.install.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.1</version>
<version>${maven.plugin.site.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<version>${maven.plugin.war.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<version>${maven.plugin.source.version}</version>
</plugin>

<plugin>
Expand Down Expand Up @@ -221,10 +233,32 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven.plugin.antrun.version}</version>
<executions>
<execution>
<id>create-version-signature-file</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<property name="app_version" value="${project.version}"/>
<ant antfile="${basedir}/build.xml">
<target name="create-version-signature-file"/>
</ant>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<version>${maven.plugin.exec.version}</version>
<executions>
<execution>
<id>clean-frontend</id>
Expand Down Expand Up @@ -255,7 +289,7 @@
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<version>${maven.plugin.tomcat7.version}</version>
<configuration>
<port>8080</port>
<useTestClasspath>false</useTestClasspath>
Expand All @@ -265,7 +299,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<version>${maven.plugin.resources.version}</version>
<executions>
<execution>
<id>copy-webapp-resources</id>
Expand All @@ -288,29 +322,6 @@
</resources>
</configuration>
</execution>
<!--
<execution>
<id>copy-frontend-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${webappDirectory}/helenos</outputDirectory>
<encoding>${project.build.sourceEncoding}</encoding>
<includeEmptyDirs>true</includeEmptyDirs>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>src/main/frontend/build</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
-->
</executions>
</plugin>
</plugins>
Expand Down
12 changes: 4 additions & 8 deletions src/main/frontend/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
[
{
"path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
},
{
"path" : "version.json"
}
],

Expand Down Expand Up @@ -45,8 +48,7 @@
"LOCALES" : [ "en" ],
"CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache",
"ROOT" : ".",
"BUILD_PATH" : "../../../target/helenos-${HELENOS_VER}/gui/",
"HELENOS_VER" : "1.2-beta1"
"BUILD_PATH" : "../../../target/helenos-${HELENOS_VERSION}/gui/"
},

"jobs" :
Expand All @@ -59,12 +61,6 @@
"manifest" : "contribs/dialog/Manifest.json"
}
]
},
"build-withver" : {
"extend" : ["build"],
"environment" : {
"qx.app.version" : "${HELENOS_VER}"
}
}
}
}

0 comments on commit 94ca121

Please sign in to comment.