Added the git commit and branch to war file

This commit is contained in:
ahuang 2013-07-11 17:33:12 -07:00
parent e93ef73e9f
commit 96d29c7f3d
3 changed files with 123 additions and 115 deletions

View File

@ -1,13 +1,12 @@
<!-- 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. -->
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. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@ -44,7 +43,7 @@
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-api-limit-account-based</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-api-discovery</artifactId>
@ -121,9 +120,9 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-hypervisor-ovm</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-hypervisor-ovm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
@ -178,96 +177,96 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-ipc</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-ipc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-rest</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-rest</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-api</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-components-api</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-components-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-compute</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-compute</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-network</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-network</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-orchestration</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-orchestration</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-schema</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-schema</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-cache</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-cache</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-image</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-image</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-datamotion</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-datamotion</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-snapshot</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-snapshot</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-volume</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-volume</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-volume-default</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-volume-default</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-default</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-default</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-s3</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-s3</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-swift</artifactId>
<version>${project.version}</version>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-swift</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
@ -293,6 +292,20 @@
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>ru.concerteza.buildnumber</groupId>
<artifactId>maven-jgit-buildnumber-plugin</artifactId>
<version>1.2.6</version>
<executions>
<execution>
<id>git-buildnumber</id>
<goals>
<goal>extract-buildnumber</goal>
</goals>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
@ -300,6 +313,15 @@
<configuration>
<webXml>./target/generated-webapp/WEB-INF/web.xml</webXml>
<warSourceDirectory>./target/generated-webapp</warSourceDirectory>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Implementation-Revision>${git.revision}</Implementation-Revision>
<Implementation-Branch>${git.branch}</Implementation-Branch>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
@ -336,9 +358,8 @@
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<!-- Copy the systemvm in the package phase as it is generated
by console-proxy in the package phase.
-->
<!-- Copy the systemvm in the package phase as it is generated by console-proxy
in the package phase. -->
<execution>
<id>copy-systemvm</id>
<phase>process-resources</phase>
@ -364,21 +385,21 @@
</goals>
<configuration>
<target>
<copy todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
<copy
todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
<fileset dir="${basedir}/../scripts" />
</copy>
<!-- CLOUDSTACK-1304 -->
<chmod perm="755" >
<fileset dir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts" />
<!-- CLOUDSTACK-1304 -->
<chmod perm="755">
<fileset
dir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts" />
</chmod>
<copy
todir="${basedir}/target/generated-webapp/WEB-INF/">
<copy todir="${basedir}/target/generated-webapp/WEB-INF/">
<fileset dir="${basedir}/WEB-INF/">
<include name="web.xml" />
</fileset>
</copy>
<copy
todir="${basedir}/target/generated-webapp/WEB-INF/classes">
<copy todir="${basedir}/target/generated-webapp/WEB-INF/classes">
<fileset dir="${basedir}/WEB-INF/classes">
<include name="resources/**/*" />
</fileset>
@ -393,14 +414,13 @@
</fileset>
<globmapper from="*.in" to="*" />
<filterchain>
<filterreader
classname="org.apache.tools.ant.filters.ReplaceTokens">
<param type="propertiesfile"
value="${cs.replace.properties}" />
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
<param type="propertiesfile" value="${cs.replace.properties}" />
</filterreader>
</filterchain>
</copy>
<copy overwrite="true" todir="${basedir}/target/generated-webapp/WEB-INF/classes">
<copy overwrite="true"
todir="${basedir}/target/generated-webapp/WEB-INF/classes">
<fileset dir="${basedir}/tomcatconf">
<include name="*.in" />
</fileset>
@ -472,9 +492,10 @@
<target if="${nonoss}">
<echo>test</echo>
<replaceregexp
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
match="cloud-stack-components-specification=.*"
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true"/>
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
match="cloud-stack-components-specification=.*"
replace="cloud-stack-components-specification=components-nonoss.xml"
byline="true" />
</target>
</configuration>
</execution>
@ -488,9 +509,9 @@
<target if="${simulator}">
<echo>test</echo>
<replaceregexp
file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
match="classpath:componentContext.xml"
replace="classpath:simulatorComponentContext.xml" byline="true" />
file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
match="classpath:componentContext.xml" replace="classpath:simulatorComponentContext.xml"
byline="true" />
</target>
</configuration>
</execution>
@ -504,12 +525,14 @@
<target if="${nonoss}">
<replaceregexp
file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
match="classpath:componentContext.xml"
replace="classpath:nonossComponentContext.xml" byline="true" />
<copy overwrite="true" todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
<fileset dir="${basedir}/../plugins/network-elements/cisco-vnmc/scripts">
<include name="**/*" />
</fileset>
match="classpath:componentContext.xml" replace="classpath:nonossComponentContext.xml"
byline="true" />
<copy overwrite="true"
todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
<fileset
dir="${basedir}/../plugins/network-elements/cisco-vnmc/scripts">
<include name="**/*" />
</fileset>
</copy>
</target>
</configuration>
@ -524,9 +547,10 @@
<target if="${quickcloud}">
<echo>quickcloud</echo>
<replaceregexp
file="${basedir}/target/generated-webapp/WEB-INF/classes/applicationContext.xml"
file="${basedir}/target/generated-webapp/WEB-INF/classes/applicationContext.xml"
match="com.cloud.consoleproxy.ConsoleProxyManagerImpl"
replace="com.cloud.consoleproxy.StaticConsoleProxyManager" byline="true" />
replace="com.cloud.consoleproxy.StaticConsoleProxyManager"
byline="true" />
</target>
</configuration>
</execution>
@ -568,8 +592,8 @@
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<!--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>

14
pom.xml
View File

@ -207,20 +207,6 @@
<artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<!-- <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId>
<version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId> <version>${org.springframework.version}</version>
</dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId>
<version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId> <version>${org.springframework.version}</version>
</dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId>
<version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId> <version>${org.springframework.version}</version>
</dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId>
<version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId> <version>${org.springframework.version}</version>
</dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version> </dependency> -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>

View File

@ -99,7 +99,7 @@
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-ipc</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-events</artifactId>
@ -108,8 +108,6 @@
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<resources>
<resource>
<directory>resources</directory>