Get initial build to work.
Modified build to work with maven 2 Modified so it will download monasca-common jars from tarballs.openstack.org if the user is jenkins, otherwise the user is told to build and install monasca-common Had to move the source code to the new thresh directory so that a separate module could do the download before dependencies would be checked by maven Had to explicitly set the project name in the control file, not sure why Change-Id: Ic4d02478b078aad7c1f0eebda2ea2def8d9edf1a
This commit is contained in:
parent
44851750e6
commit
cdea9bdcb2
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@
|
|||||||
target/
|
target/
|
||||||
test-output/
|
test-output/
|
||||||
logs/
|
logs/
|
||||||
|
debs/
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[gerrit]
|
[gerrit]
|
||||||
host=gerrit.mon.hpcloud.net
|
host=review.openstack.org
|
||||||
port=29418
|
port=29418
|
||||||
project=maas/maas-thresh.git
|
project=stackforge/monasca-thresh
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
mon-thresh
|
monasca-thresh
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Monitoring Thresholding Engine
|
Monitoring Thresholding Engine
|
||||||
@ -29,7 +29,7 @@ Events also flow into the Threshold Engine via Kafka so the Threshold Engine kno
|
|||||||
=======
|
=======
|
||||||
# Build
|
# Build
|
||||||
|
|
||||||
Requires mon-common from https://github.com/hpcloud-mon/mon-common. Download and do mvn install
|
Requires monasca-common from https://github.com/stackforge/monasca-common. Download and do mvn install
|
||||||
|
|
||||||
```
|
```
|
||||||
mvn package
|
mvn package
|
||||||
|
71
download/download.sh
Executable file
71
download/download.sh
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
|
ME=`whoami`
|
||||||
|
echo "Running as user: $ME"
|
||||||
|
VERSION=$1
|
||||||
|
|
||||||
|
check_user() {
|
||||||
|
ME=$1
|
||||||
|
if [ "${ME}" != "jenkins" ]; then
|
||||||
|
echo "\nERROR: Download monasca-common and do a mvn install to install the monasca-commom jars\n" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO: Grep these out of the pom itself rather than have them explicitly listed
|
||||||
|
JARS="
|
||||||
|
monasca-common-util
|
||||||
|
monasca-common-model
|
||||||
|
monasca-common-persistence
|
||||||
|
monasca-common-streaming
|
||||||
|
monasca-common-kafka
|
||||||
|
monasca-common-testing
|
||||||
|
"
|
||||||
|
for JAR in $JARS; do
|
||||||
|
JARFILE=~/.m2//repository/monasca-common/${JAR}/${VERSION}/${JAR}-${VERSION}.jar
|
||||||
|
if [ ! -r "$JARFILE" ]; then
|
||||||
|
check_user ${ME}
|
||||||
|
# Download it from stackforge
|
||||||
|
FILE=`basename $JARFILE`
|
||||||
|
curl http://tarballs.openstack.org/ci/monasca-common/${FILE} > ${FILE}
|
||||||
|
# Upload into the local repository
|
||||||
|
POM=META-INF/maven/monasca-common/${JAR}/pom.xml
|
||||||
|
jar -xvf ${FILE} ${POM}
|
||||||
|
TMPFILE=pom.$$
|
||||||
|
sed -e "s/\${computedVersion}/${VERSION}/" ${POM} > ${TMPFILE}
|
||||||
|
mv ${TMPFILE} ${POM}
|
||||||
|
mvn install:install-file -Dfile=${FILE} -DgroupId=monasca-common \
|
||||||
|
-DartifactId=${JAR} -Dversion=${VERSION} -Dpackaging=jar -DpomFile=${POM}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
POM_FILE=~/.m2/repository/monasca-common/monasca-common/${VERSION}/monasca-common-${VERSION}.pom
|
||||||
|
if [ ! -r "${POM_FILE}" ]; then
|
||||||
|
check_user ${ME}
|
||||||
|
TMPDIR=pom_tmp.$$
|
||||||
|
mkdir -p ${TMPDIR}
|
||||||
|
curl https://raw.githubusercontent.com/stackforge/monasca-common/master/java/pom.xml > ${TMPDIR}/pom.xml
|
||||||
|
mvn install:install-file -DgroupId=monasca-common -DartifactId=monasca-common -Dversion=${VERSION} -Dpackaging=pom -Dfile=${TMPDIR}/pom.xml
|
||||||
|
rm -fr ${TMPDIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
TEST_JARS="
|
||||||
|
monasca-common-streaming
|
||||||
|
"
|
||||||
|
for TEST_JAR in $TEST_JARS; do
|
||||||
|
JARFILE=~/.m2//repository/monasca-common/${TEST_JAR}/${VERSION}/${TEST_JAR}-${VERSION}-tests.jar
|
||||||
|
if [ ! -r "$JARFILE" ]; then
|
||||||
|
check_user ${ME}
|
||||||
|
# Download it from stackforge
|
||||||
|
FILE=`basename $JARFILE`
|
||||||
|
curl http://tarballs.openstack.org/ci/monasca-common/${FILE} > ${FILE}
|
||||||
|
# Upload into the local repository
|
||||||
|
POM=META-INF/maven/monasca-common/${TEST_JAR}/pom.xml
|
||||||
|
jar -xvf ${FILE} ${POM}
|
||||||
|
TMPFILE=pom.$$
|
||||||
|
sed -e "s/\${computedVersion}/${VERSION}/" ${POM} > ${TMPFILE}
|
||||||
|
mv ${TMPFILE} ${POM}
|
||||||
|
mvn install:install-file -Dfile=${FILE} -DgroupId=monasca-common \
|
||||||
|
-DartifactId=${TEST_JAR} -Dversion=${VERSION} -Dpackaging=test-jar -DpomFile=${POM}
|
||||||
|
fi
|
||||||
|
done
|
40
download/pom.xml
Normal file
40
download/pom.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<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>monasca-thresh</groupId>
|
||||||
|
<artifactId>monasca-thresh-download</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<url>http://github.com/stackforge/monasca-thresh</url>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<!-- Versioning -->
|
||||||
|
<exec.args>${project.version}</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>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<executable>./download.sh</executable>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
287
pom.xml
287
pom.xml
@ -1,39 +1,38 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
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>
|
||||||
|
|
||||||
<groupId>com.hpcloud</groupId>
|
<groupId>monasca-common</groupId>
|
||||||
<artifactId>mon-thresh</artifactId>
|
<artifactId>monasca-common</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>${computedVersion}</version>
|
||||||
<url>http://github.com/hpcloud-mon/mon-thresh</url>
|
<url>http://github.com/stackforge/monasca-common</url>
|
||||||
<packaging>jar</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<!--
|
||||||
<prerequisites>
|
<prerequisites>
|
||||||
<maven>3.0</maven>
|
<maven>3.0</maven>
|
||||||
</prerequisites>
|
</prerequisites>
|
||||||
|
-->
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<mon.common.version>1.0.0-SNAPSHOT</mon.common.version>
|
<!-- Versioning -->
|
||||||
<storm.version>0.9.1-incubating</storm.version>
|
<versionNumber>1.0.0</versionNumber>
|
||||||
|
<computedVersion>${versionNumber}-SNAPSHOT</computedVersion>
|
||||||
|
|
||||||
<skipITs>true</skipITs>
|
<skipITs>true</skipITs>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<artifactNamedVersion>${project.name}-${project.version}-${timestamp}-${buildNumber}
|
|
||||||
</artifactNamedVersion>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:hpcloud-mon/mon-thresh</connection>
|
<connection>scm:git:git@github.com:stackforge/monasca-thresh</connection>
|
||||||
<developerConnection>scm:git:git@github.com:hpcloud-mon/mon-thresh</developerConnection>
|
<developerConnection>scm:git:git@github.com:stackforge/monasca-thresh</developerConnection>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<repositories>
|
<modules>
|
||||||
<repository>
|
<module>download</module>
|
||||||
<id>clojars.org</id>
|
<module>thresh</module>
|
||||||
<url>http://clojars.org/repo</url>
|
</modules>
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
@ -49,189 +48,8 @@
|
|||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<!-- Resolve dependency mismatch between Dropwizard and Storm -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>1.7.6</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
|
||||||
<version>1.7.6</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.storm</groupId>
|
|
||||||
<artifactId>storm-core</artifactId>
|
|
||||||
<version>${storm.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hpcloud</groupId>
|
|
||||||
<artifactId>mon-util</artifactId>
|
|
||||||
<version>${mon.common.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-core</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hpcloud</groupId>
|
|
||||||
<artifactId>mon-model</artifactId>
|
|
||||||
<version>${mon.common.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hpcloud</groupId>
|
|
||||||
<artifactId>mon-persistence</artifactId>
|
|
||||||
<version>${mon.common.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hpcloud</groupId>
|
|
||||||
<artifactId>mon-streaming</artifactId>
|
|
||||||
<version>${mon.common.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hpcloud</groupId>
|
|
||||||
<artifactId>mon-kafka</artifactId>
|
|
||||||
<version>${mon.common.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<version>5.1.26</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.kafka</groupId>
|
|
||||||
<artifactId>kafka_2.10</artifactId>
|
|
||||||
<version>0.8.0</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.sun.jmx</groupId>
|
|
||||||
<artifactId>jmxri</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.sun.jdmk</groupId>
|
|
||||||
<artifactId>jmxtools</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-simple</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Test dependencies -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hpcloud</groupId>
|
|
||||||
<artifactId>mon-testing</artifactId>
|
|
||||||
<version>${mon.common.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.hpcloud</groupId>
|
|
||||||
<artifactId>mon-streaming</artifactId>
|
|
||||||
<version>${mon.common.version}</version>
|
|
||||||
<type>test-jar</type>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.7</source>
|
|
||||||
<target>1.7</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.16</version>
|
|
||||||
<configuration>
|
|
||||||
<excludedGroups>performance,functional,integration,database,slow
|
|
||||||
</excludedGroups>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-failsafe-plugin</artifactId>
|
|
||||||
<version>2.16</version>
|
|
||||||
<configuration>
|
|
||||||
<groups>performance,functional,integration,database,slow</groups>
|
|
||||||
<skipTests>${skipITs}</skipTests>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>integration-test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.class</include>
|
|
||||||
</includes>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
|
||||||
<version>2.2</version>
|
|
||||||
<configuration>
|
|
||||||
<finalName>${artifactNamedVersion}</finalName>
|
|
||||||
<createDependencyReducedPom>true</createDependencyReducedPom>
|
|
||||||
<filters>
|
|
||||||
<filter>
|
|
||||||
<artifact>*:*</artifact>
|
|
||||||
<excludes>
|
|
||||||
<exclude>META-INF/*.SF</exclude>
|
|
||||||
<exclude>META-INF/*.DSA</exclude>
|
|
||||||
<exclude>META-INF/*.RSA</exclude>
|
|
||||||
</excludes>
|
|
||||||
</filter>
|
|
||||||
</filters>
|
|
||||||
<artifactSet>
|
|
||||||
<excludes>
|
|
||||||
<exclude>junit:junit</exclude>
|
|
||||||
<exclude>org.apache.storm:storm-core</exclude>
|
|
||||||
<exclude>org.hamcrest:*</exclude>
|
|
||||||
</excludes>
|
|
||||||
</artifactSet>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>shade</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<transformers>
|
|
||||||
<transformer
|
|
||||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
||||||
<mainClass>com.hpcloud.mon.ThresholdingEngine</mainClass>
|
|
||||||
</transformer>
|
|
||||||
</transformers>
|
|
||||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-scm-plugin</artifactId>
|
<artifactId>maven-scm-plugin</artifactId>
|
||||||
@ -240,75 +58,6 @@
|
|||||||
<tag>${project.version}</tag>
|
<tag>${project.version}</tag>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>buildnumber-maven-plugin</artifactId>
|
|
||||||
<version>1.2</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>create</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<doCheck>false</doCheck>
|
|
||||||
<shortRevisionLength>6</shortRevisionLength>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>jdeb</artifactId>
|
|
||||||
<groupId>org.vafer</groupId>
|
|
||||||
<version>1.0.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jdeb</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<deb>${project.basedir}/debs/binaries/${artifactNamedVersion}.deb</deb>
|
|
||||||
<dataSet>
|
|
||||||
<data>
|
|
||||||
<type>file</type>
|
|
||||||
<src>${project.build.directory}/${artifactNamedVersion}.jar
|
|
||||||
</src>
|
|
||||||
<dst>/opt/mon/mon-thresh.jar</dst>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<type>file</type>
|
|
||||||
<src>${project.basedir}/src/deb/init/mon-thresh</src>
|
|
||||||
<dst>/etc/init.d/mon-thresh</dst>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<type>file</type>
|
|
||||||
<src>${project.basedir}/src/main/resources/logback.xml</src>
|
|
||||||
<dst>/etc/mon/logback.xml</dst>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<type>file</type>
|
|
||||||
<src>
|
|
||||||
${project.basedir}/src/deb/etc/mon-thresh-config.yml-sample
|
|
||||||
</src>
|
|
||||||
<dst>/etc/mon/thresh-config.yml-sample</dst>
|
|
||||||
</data>
|
|
||||||
</dataSet>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
|
||||||
<version>2.5</version>
|
|
||||||
<configuration>
|
|
||||||
<filesets>
|
|
||||||
<fileset>
|
|
||||||
<directory>${project.basedir}/debs</directory>
|
|
||||||
</fileset>
|
|
||||||
</filesets>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
319
thresh/pom.xml
Normal file
319
thresh/pom.xml
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
<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>monasca</groupId>
|
||||||
|
<artifactId>monasca-thresh</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<url>http://github.com/stackforge/monasca-thresh</url>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<prerequisites>
|
||||||
|
<maven>3.0</maven>
|
||||||
|
</prerequisites>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<mon.common.version>1.0.0-SNAPSHOT</mon.common.version>
|
||||||
|
<storm.version>0.9.1-incubating</storm.version>
|
||||||
|
<skipITs>true</skipITs>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<artifactNamedVersion>${project.artifactId}-${project.version}-${timestamp}-${buildNumber}
|
||||||
|
</artifactNamedVersion>
|
||||||
|
<shadedJarName>${project.artifactId}-${project.version}-shaded
|
||||||
|
</shadedJarName>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<connection>scm:git:git@github.com:stackforge/monasca-thresh</connection>
|
||||||
|
<developerConnection>scm:git:git@github.com:stackforge/monasca-thresh</developerConnection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>clojars.org</id>
|
||||||
|
<url>http://clojars.org/repo</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>release-deploy-url-override</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>BUILD_NUM</name>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<computedVersion>${project.version}</computedVersion>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<!-- Resolve dependency mismatch between Dropwizard and Storm -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<version>1.7.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<version>1.7.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.storm</groupId>
|
||||||
|
<artifactId>storm-core</artifactId>
|
||||||
|
<version>${storm.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>monasca-common</groupId>
|
||||||
|
<artifactId>monasca-common-util</artifactId>
|
||||||
|
<version>${mon.common.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>monasca-common</groupId>
|
||||||
|
<artifactId>monasca-common-model</artifactId>
|
||||||
|
<version>${mon.common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>monasca-common</groupId>
|
||||||
|
<artifactId>monasca-common-persistence</artifactId>
|
||||||
|
<version>${mon.common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>monasca-common</groupId>
|
||||||
|
<artifactId>monasca-common-streaming</artifactId>
|
||||||
|
<version>${mon.common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>monasca-common</groupId>
|
||||||
|
<artifactId>monasca-common-kafka</artifactId>
|
||||||
|
<version>${mon.common.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.26</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.kafka</groupId>
|
||||||
|
<artifactId>kafka_2.9.2</artifactId>
|
||||||
|
<version>0.8.0</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.sun.jmx</groupId>
|
||||||
|
<artifactId>jmxri</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.sun.jdmk</groupId>
|
||||||
|
<artifactId>jmxtools</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Test dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>monasca-common</groupId>
|
||||||
|
<artifactId>monasca-common-testing</artifactId>
|
||||||
|
<version>${mon.common.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>monasca-common</groupId>
|
||||||
|
<artifactId>monasca-common-streaming</artifactId>
|
||||||
|
<version>${mon.common.version}</version>
|
||||||
|
<type>test-jar</type>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.7</source>
|
||||||
|
<target>1.7</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.16</version>
|
||||||
|
<configuration>
|
||||||
|
<excludedGroups>performance,functional,integration,database,slow
|
||||||
|
</excludedGroups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<version>2.16</version>
|
||||||
|
<configuration>
|
||||||
|
<groups>performance,functional,integration,database,slow</groups>
|
||||||
|
<skipTests>${skipITs}</skipTests>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>integration-test</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.class</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<configuration>
|
||||||
|
<finalName>${artifactNamedVersion}</finalName>
|
||||||
|
<createDependencyReducedPom>true</createDependencyReducedPom>
|
||||||
|
<filters>
|
||||||
|
<filter>
|
||||||
|
<artifact>*:*</artifact>
|
||||||
|
<excludes>
|
||||||
|
<exclude>META-INF/*.SF</exclude>
|
||||||
|
<exclude>META-INF/*.DSA</exclude>
|
||||||
|
<exclude>META-INF/*.RSA</exclude>
|
||||||
|
</excludes>
|
||||||
|
</filter>
|
||||||
|
</filters>
|
||||||
|
<artifactSet>
|
||||||
|
<excludes>
|
||||||
|
<exclude>junit:junit</exclude>
|
||||||
|
<exclude>org.apache.storm:storm-core</exclude>
|
||||||
|
<exclude>org.hamcrest:*</exclude>
|
||||||
|
</excludes>
|
||||||
|
</artifactSet>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<transformers>
|
||||||
|
<transformer
|
||||||
|
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
|
<mainClass>com.hpcloud.mon.ThresholdingEngine</mainClass>
|
||||||
|
</transformer>
|
||||||
|
</transformers>
|
||||||
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-scm-plugin</artifactId>
|
||||||
|
<version>1.9</version>
|
||||||
|
<configuration>
|
||||||
|
<tag>${project.version}</tag>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>create</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<doCheck>false</doCheck>
|
||||||
|
<shortRevisionLength>6</shortRevisionLength>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>jdeb</artifactId>
|
||||||
|
<groupId>org.vafer</groupId>
|
||||||
|
<version>1.0.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jdeb</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<deb>${project.basedir}/debs/binaries/${artifactNamedVersion}.deb</deb>
|
||||||
|
<dataSet>
|
||||||
|
<data>
|
||||||
|
<type>file</type>
|
||||||
|
<src>${project.build.directory}/${shadedJarName}.jar
|
||||||
|
</src>
|
||||||
|
<dst>/opt/mon/mon-thresh.jar</dst>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<type>file</type>
|
||||||
|
<src>${project.basedir}/src/deb/init/mon-thresh</src>
|
||||||
|
<dst>/etc/init.d/mon-thresh</dst>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<type>file</type>
|
||||||
|
<src>${project.basedir}/src/main/resources/logback.xml</src>
|
||||||
|
<dst>/etc/mon/logback.xml</dst>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<type>file</type>
|
||||||
|
<src>
|
||||||
|
${project.basedir}/src/deb/etc/mon-thresh-config.yml-sample
|
||||||
|
</src>
|
||||||
|
<dst>/etc/mon/thresh-config.yml-sample</dst>
|
||||||
|
</data>
|
||||||
|
</dataSet>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<configuration>
|
||||||
|
<filesets>
|
||||||
|
<fileset>
|
||||||
|
<directory>${project.basedir}/debs</directory>
|
||||||
|
</fileset>
|
||||||
|
</filesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
@ -1,9 +1,9 @@
|
|||||||
Package: [[name]]
|
Package: monasca-thresh
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: openjdk-7-jre-headless | openjdk-7-jre
|
Depends: openjdk-7-jre-headless | openjdk-7-jre
|
||||||
Version: [[version]]-[[timestamp]]-[[buildNumber]]
|
Version: [[version]]-[[timestamp]]-[[buildNumber]]
|
||||||
Maintainer: HPCloud Monitoring <hpcs-mon@hp.com>
|
Maintainer: HPCloud Monitoring <hpcs-mon@hp.com>
|
||||||
Description: Mon-Thresh
|
Description: Monasca-Thresh
|
||||||
Reads metrics and generates alarms based on alarm definitions.
|
Reads metrics and generates alarms based on alarm definitions.
|
Loading…
x
Reference in New Issue
Block a user