Get initial build to work

Add .gitreview.

Change to work with maven 2 by invoking a shell script that downloads
maven 3 and then invokes it.

Change-Id: Ic5f2436594cd9d574441c7ce55b10c4ce827930a
This commit is contained in:
Craig Bryant 2014-07-15 14:57:24 -06:00
parent b36867cd4f
commit 2c30ec93f2
5 changed files with 73 additions and 12 deletions

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=stackforge/monasca-common

View File

@ -3,25 +3,24 @@
`mon-common` is a collection of sub-projects containing reusable application and platform code for building monitoring related services. `mon-common` is a collection of sub-projects containing reusable application and platform code for building monitoring related services.
### Build Instructions ### Build Instructions
Download and do mvn install from within the java directory. Download and do mvn install.
``` ```
cd java
mvn clean install mvn clean install
``` ```
### Application Specific Sub-Projects ### Application Specific Sub-Projects
* [mon-model](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-model) - Common domain and event models for monitoring services. * [mon-model](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-model) - Common domain and event models for monitoring services.
### Platform Sub-Projects ### Platform Sub-Projects
* [mon-dropwizard](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-dropwizard) - Utilities for building and testing dropwizard services. * [mon-dropwizard](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-dropwizard) - Utilities for building and testing dropwizard services.
* [mon-kafka](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-kafka) - Various utilities for working with Kafka. * [mon-kafka](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-kafka) - Various utilities for working with Kafka.
* [mon-persistence](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-persistence) - Persistence related infrastructure and utilities. * [mon-persistence](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-persistence) - Persistence related infrastructure and utilities.
* [mon-service](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-service) - Simple service abstractions and utilities. * [mon-service](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-service) - Simple service abstractions and utilities.
* [mon-streaming](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-streaming) - Streaming related utilities. * [mon-streaming](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-streaming) - Streaming related utilities.
* [mon-testing](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-testing) - A set of testing related dependencies. * [mon-testing](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-testing) - A set of testing related dependencies.
* [mon-util](https://git.hpcloud.net/mon/mon-common/tree/master/java/mon-util) - Various utilities such as for serialization, dependency injection, date and time, invocation retries, concurrency, etc. * [mon-util](https://git.hpcloud.netstackforge/monasca-common/tree/master/mon-util) - Various utilities such as for serialization, dependency injection, date and time, invocation retries, concurrency, etc.
### Deploying to Nexus ### Deploying to Nexus

View File

@ -23,8 +23,8 @@
</properties> </properties>
<scm> <scm>
<connection>scm:git:git@github.com:hpcloud-mon/mon-common</connection> <connection>scm:git:git@github.com:stackforge/monasca-common</connection>
<developerConnection>scm:git:git@github.com:hpcloud-mon/mon-common</developerConnection> <developerConnection>scm:git:git@github.com:stackforge/monasca-common</developerConnection>
</scm> </scm>
<modules> <modules>

41
pom.xml Normal file
View File

@ -0,0 +1,41 @@
<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>
<groupId>com.hpcloud</groupId>
<artifactId>mon-common</artifactId>
<version>1.0.0</version>
<url>http://github.com/stackforge/monasca-common</url>
<packaging>pom</packaging>
<properties>
<!-- Versioning -->
<exec.args>${sun.java.command}</exec.args>
<skipITs>true</skipITs>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>package-execution</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>run_maven.sh</executable>
</configuration>
</plugin>
</plugins>
</build>
</project>

17
run_maven.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Download maven 3 if the system maven isn't maven 3
VERSION=`mvn -v | grep "Apache Maven 3"`
if [ -z "${VERSION}" ]; then
curl http://archive.apache.org/dist/maven/binaries/apache-maven-3.2.1-bin.tar.gz > apache-maven-3.2.1-bin.tar.gz
tar -xvzf apache-maven-3.2.1-bin.tar.gz
MVN=${PWD}/apache-maven-3.2.1/bin/mvn
else
MVN=mvn
fi
# Get rid of the java property name containing the args
shift
# Invoke the maven 3 on the real pom.xml
( cd java; ${MVN} $* )
rm -fr apache-maven-3.2.1*