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 <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to information regarding copyright ownership. The ASF licenses this file to you under
you under the Apache License, Version 2.0 (the "License"); you may not use the Apache License, Version 2.0 (the "License"); you may not use this file except
this file except in compliance with the License. You may obtain a copy of in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required Unless required by applicable law or agreed to in writing, software distributed under
by applicable law or agreed to in writing, software distributed under the the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
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
OF ANY KIND, either express or implied. See the License for the specific governing permissions and limitations under the License. -->
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" <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"> 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> <modelVersion>4.0.0</modelVersion>
@ -44,7 +43,7 @@
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-api-limit-account-based</artifactId> <artifactId>cloud-plugin-api-limit-account-based</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-api-discovery</artifactId> <artifactId>cloud-plugin-api-discovery</artifactId>
@ -121,9 +120,9 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-hypervisor-ovm</artifactId> <artifactId>cloud-plugin-hypervisor-ovm</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
@ -178,96 +177,96 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-ipc</artifactId> <artifactId>cloud-framework-ipc</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-rest</artifactId> <artifactId>cloud-framework-rest</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-api</artifactId> <artifactId>cloud-engine-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-components-api</artifactId> <artifactId>cloud-engine-components-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-compute</artifactId> <artifactId>cloud-engine-compute</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-network</artifactId> <artifactId>cloud-engine-network</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-orchestration</artifactId> <artifactId>cloud-engine-orchestration</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-schema</artifactId> <artifactId>cloud-engine-schema</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage</artifactId> <artifactId>cloud-engine-storage</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-cache</artifactId> <artifactId>cloud-engine-storage-cache</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-image</artifactId> <artifactId>cloud-engine-storage-image</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-datamotion</artifactId> <artifactId>cloud-engine-storage-datamotion</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-snapshot</artifactId> <artifactId>cloud-engine-storage-snapshot</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-volume</artifactId> <artifactId>cloud-engine-storage-volume</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-volume-default</artifactId> <artifactId>cloud-plugin-storage-volume-default</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-default</artifactId> <artifactId>cloud-plugin-storage-image-default</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-s3</artifactId> <artifactId>cloud-plugin-storage-image-s3</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-image-swift</artifactId> <artifactId>cloud-plugin-storage-image-swift</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
@ -293,6 +292,20 @@
<build> <build>
<defaultGoal>install</defaultGoal> <defaultGoal>install</defaultGoal>
<plugins> <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> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
@ -300,6 +313,15 @@
<configuration> <configuration>
<webXml>./target/generated-webapp/WEB-INF/web.xml</webXml> <webXml>./target/generated-webapp/WEB-INF/web.xml</webXml>
<warSourceDirectory>./target/generated-webapp</warSourceDirectory> <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> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -336,9 +358,8 @@
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version> <version>1.7</version>
<executions> <executions>
<!-- Copy the systemvm in the package phase as it is generated <!-- Copy the systemvm in the package phase as it is generated by console-proxy
by console-proxy in the package phase. in the package phase. -->
-->
<execution> <execution>
<id>copy-systemvm</id> <id>copy-systemvm</id>
<phase>process-resources</phase> <phase>process-resources</phase>
@ -364,21 +385,21 @@
</goals> </goals>
<configuration> <configuration>
<target> <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" /> <fileset dir="${basedir}/../scripts" />
</copy> </copy>
<!-- CLOUDSTACK-1304 --> <!-- CLOUDSTACK-1304 -->
<chmod perm="755" > <chmod perm="755">
<fileset dir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts" /> <fileset
dir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts" />
</chmod> </chmod>
<copy <copy todir="${basedir}/target/generated-webapp/WEB-INF/">
todir="${basedir}/target/generated-webapp/WEB-INF/">
<fileset dir="${basedir}/WEB-INF/"> <fileset dir="${basedir}/WEB-INF/">
<include name="web.xml" /> <include name="web.xml" />
</fileset> </fileset>
</copy> </copy>
<copy <copy todir="${basedir}/target/generated-webapp/WEB-INF/classes">
todir="${basedir}/target/generated-webapp/WEB-INF/classes">
<fileset dir="${basedir}/WEB-INF/classes"> <fileset dir="${basedir}/WEB-INF/classes">
<include name="resources/**/*" /> <include name="resources/**/*" />
</fileset> </fileset>
@ -393,14 +414,13 @@
</fileset> </fileset>
<globmapper from="*.in" to="*" /> <globmapper from="*.in" to="*" />
<filterchain> <filterchain>
<filterreader <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
classname="org.apache.tools.ant.filters.ReplaceTokens"> <param type="propertiesfile" value="${cs.replace.properties}" />
<param type="propertiesfile"
value="${cs.replace.properties}" />
</filterreader> </filterreader>
</filterchain> </filterchain>
</copy> </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"> <fileset dir="${basedir}/tomcatconf">
<include name="*.in" /> <include name="*.in" />
</fileset> </fileset>
@ -472,9 +492,10 @@
<target if="${nonoss}"> <target if="${nonoss}">
<echo>test</echo> <echo>test</echo>
<replaceregexp <replaceregexp
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties" file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
match="cloud-stack-components-specification=.*" match="cloud-stack-components-specification=.*"
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true"/> replace="cloud-stack-components-specification=components-nonoss.xml"
byline="true" />
</target> </target>
</configuration> </configuration>
</execution> </execution>
@ -488,9 +509,9 @@
<target if="${simulator}"> <target if="${simulator}">
<echo>test</echo> <echo>test</echo>
<replaceregexp <replaceregexp
file="${basedir}/target/generated-webapp/WEB-INF/web.xml" file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
match="classpath:componentContext.xml" match="classpath:componentContext.xml" replace="classpath:simulatorComponentContext.xml"
replace="classpath:simulatorComponentContext.xml" byline="true" /> byline="true" />
</target> </target>
</configuration> </configuration>
</execution> </execution>
@ -504,12 +525,14 @@
<target if="${nonoss}"> <target if="${nonoss}">
<replaceregexp <replaceregexp
file="${basedir}/target/generated-webapp/WEB-INF/web.xml" file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
match="classpath:componentContext.xml" match="classpath:componentContext.xml" replace="classpath:nonossComponentContext.xml"
replace="classpath:nonossComponentContext.xml" byline="true" /> byline="true" />
<copy overwrite="true" todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts"> <copy overwrite="true"
<fileset dir="${basedir}/../plugins/network-elements/cisco-vnmc/scripts"> todir="${basedir}/target/generated-webapp/WEB-INF/classes/scripts">
<include name="**/*" /> <fileset
</fileset> dir="${basedir}/../plugins/network-elements/cisco-vnmc/scripts">
<include name="**/*" />
</fileset>
</copy> </copy>
</target> </target>
</configuration> </configuration>
@ -524,9 +547,10 @@
<target if="${quickcloud}"> <target if="${quickcloud}">
<echo>quickcloud</echo> <echo>quickcloud</echo>
<replaceregexp <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" match="com.cloud.consoleproxy.ConsoleProxyManagerImpl"
replace="com.cloud.consoleproxy.StaticConsoleProxyManager" byline="true" /> replace="com.cloud.consoleproxy.StaticConsoleProxyManager"
byline="true" />
</target> </target>
</configuration> </configuration>
</execution> </execution>
@ -568,8 +592,8 @@
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings <!--This plugin's configuration is used to store Eclipse m2e settings only.
only. It has no influence on the Maven build itself. --> It has no influence on the Maven build itself. -->
<plugin> <plugin>
<groupId>org.eclipse.m2e</groupId> <groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId> <artifactId>lifecycle-mapping</artifactId>

14
pom.xml
View File

@ -207,20 +207,6 @@
<artifactId>spring-web</artifactId> <artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version> <version>${org.springframework.version}</version>
</dependency> </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> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId> <artifactId>mockito-all</artifactId>

View File

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