Repository: incubator-ranger Updated Branches: refs/heads/master cc74ff2e9 -> 2b0462069
RANGER-342 : Bust JS cache during version change to fetch new files from server Signed-off-by: Velmurugan Periasamy <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/2b046206 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/2b046206 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/2b046206 Branch: refs/heads/master Commit: 2b046206975e4e7d37ea399e50d5113e526f61a9 Parents: cc74ff2 Author: Gautam Borad <[email protected]> Authored: Thu Mar 26 14:14:42 2015 +0530 Committer: Velmurugan Periasamy <[email protected]> Committed: Thu Mar 26 15:45:26 2015 -0400 ---------------------------------------------------------------------- security-admin/pom.xml | 70 +++++++++++++++++++++----- security-admin/src/main/webapp/index.html | 2 +- 2 files changed, 58 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/2b046206/security-admin/pom.xml ---------------------------------------------------------------------- diff --git a/security-admin/pom.xml b/security-admin/pom.xml index 57d93c4..3220886 100644 --- a/security-admin/pom.xml +++ b/security-admin/pom.xml @@ -412,19 +412,6 @@ <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-war-plugin</artifactId> - <version>2.4</version> - <configuration> - <packagingExcludes> - WEB-INF/lib/spring-*.SEC03.jar, - WEB-INF/lib/spring-*.RC3.jar, - WEB-INF/lib/spring-2.*.jar - </packagingExcludes> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.9</version> <configuration> @@ -446,6 +433,63 @@ </plugins> </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.4</version> + <executions> + <execution> + <id>prepare</id> + <phase>prepare-package</phase> + <goals> + <goal>exploded</goal> + </goals> + </execution> + <execution> + <id>default-war</id> + <phase>package</phase> + <goals> + <goal>war</goal> + </goals> + <configuration> + <packagingExcludes> + WEB-INF/lib/spring-*.SEC03.jar, + WEB-INF/lib/spring-*.RC3.jar, + WEB-INF/lib/spring-2.*.jar + </packagingExcludes> + <warSourceDirectory>${project.build.directory}/${project.build.finalName}</warSourceDirectory> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>com.google.code.maven-replacer-plugin</groupId> + <artifactId>replacer</artifactId> + <version>1.5.2</version> + <executions> + <execution> + <phase>prepare-package</phase> + <goals> + <goal>replace</goal> + </goals> + <configuration> + <includes> + <include>security-admin/target/${project.build.finalName}/index.html</include> + <include>security-admin/target/${project.build.finalName}/scripts/Init.js</include> + </includes> + <replacements> + <replacement> + <token>build.version</token> + <value>${project.version}</value> + </replacement> + </replacements> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + <resources> <resource> <directory>src/main/resources</directory> http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/2b046206/security-admin/src/main/webapp/index.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/index.html b/security-admin/src/main/webapp/index.html index 91c0931..f1d0b75 100644 --- a/security-admin/src/main/webapp/index.html +++ b/security-admin/src/main/webapp/index.html @@ -127,7 +127,7 @@ <!-- build:js scripts/main.js --> - <script data-main="scripts/Init" src="libs/bower/requirejs/js/require.js"></script> + <script data-main="scripts/Init.js?ver=build.version" src="libs/bower/requirejs/js/require.js"></script> <!-- endbuild --> <script type="text/javascript"> require.config({
