Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jcollectd and hadoop-collectd mavenized #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.settings
.classpath
.project
target
*~
76 changes: 38 additions & 38 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<project name="hadoop-collectd" default="dist" basedir=".">
<project name="hadoop-collectd" default="dist" basedir=".">
<property file="${user.home}/.hadoop-collectd-build.properties"/>
<property environment="env"/>
<property environment="env"/>

<property name="hadoop"
value="../../../hadoop-core-trunk"/>
<property name="hadoop.jar"
value="${basedir}/../../../hadoop-core-trunk"/>
<property name="hadoop.jar"
location="${hadoop}/build/hadoop-metrics-0.21.0-dev.jar"/>
<property name="logging.jar"
<property name="logging.jar"
location="${hadoop}/build/ivy/lib/Hadoop/common/commons-logging-1.0.4.jar"/>
<property name="collectd.jar"
location="../jcollectd/target/lib/collectd.jar"/>
<property name="collectd.jar"
location="${basedir}/../jcollectd/target/lib/collectd.jar"/>

<path id="hd.classpath">
<path location="${hadoop.jar}"/>
<path location="${collectd.jar}"/>
<path location="${logging.jar}"/>
</path>
<target name="init">
<mkdir dir="build/classes"/>
</target>
<target name="compile" depends="init">
<javac srcdir="src/core"
destdir="build/classes"
debug="true"
source="1.6"
target="1.6"
classpathref="hd.classpath"/>
</target>
<target name="dist" depends="compile">
<jar jarfile="build/hadoop-collectd.jar">
<fileset dir="." includes="*.properties"/>
<fileset dir="build/classes" includes="**/*.class">
<exclude name="**/test/*"/>
</fileset>
</jar>
</target>
<target name="clean">
<delete dir="build"/>
</target>
<path id="hd.classpath">
<path location="${hadoop.jar}"/>
<path location="${collectd.jar}"/>
<path location="${logging.jar}"/>
</path>

<target name="init">
<mkdir dir="${basedir}/target/classes"/>
</target>

<target name="compile" depends="init">
<javac srcdir="${basedir}/src/main/java"
destdir="${basedir}/target/classes"
debug="true"
source="1.6"
target="1.6"
classpathref="hd.classpath"/>
</target>

<target name="dist" depends="compile">
<jar jarfile="${basedir}/target/hadoop-collectd.jar">
<fileset dir="${basedir}/src/main/resources" includes="*.properties"/>
<fileset dir="${basedir}/target/classes" includes="**/*.class">
<exclude name="**/test/*"/>
</fileset>
</jar>
</target>

<target name="clean">
<delete dir="target"/>
</target>
</project>
130 changes: 130 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<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.hyperic.hypcomm</groupId>
<artifactId>hadoop-collectd</artifactId>
<version>0.0.1-SNAPSHOT</version>

<name>hadoop-collectd</name>
<description>A Hadoop metrics.spi.MetricContext for sending metric data to collectd.</description>
<url>https://github.com/hyperic/hadoop-collectd</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>

<hadoop.version>0.20.2-cdh3u1</hadoop.version>
</properties>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/hyperic/hadoop-collectd</url>
<connection>scm:git:git://github.com/hyperic/hadoop-collectd.git</connection>
</scm>
<issueManagement>
<system>github</system>
<url>https://github.com/hyperic/hadoop-collectd/issues</url>
</issueManagement>
<!--
<distributionManagement>
<repository>
<uniqueVersion>true</uniqueVersion>
<id>googlecode</id>
<url>svn:https://hadoop-collectd.googlecode.com/svn/maven2/</url>
</repository>
</distributionManagement>
-->

<repositories>
<repository>
<id>cloudera</id>
<name>Cloudera Repository</name>
<url>https://repository.cloudera.com/content/groups/public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>jasper</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.hyperic.hypcomm</groupId>
<artifactId>jcollectd</artifactId>
<version>0.2.0-SNAPSHOT</version>
</dependency>

<!-- Testing -->
<!--
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>[4.8.2,5.0.0)</version>
<scope>test</scope>
</dependency>
-->
</dependencies>

<build>
<plugins>
<!-- use specified java version -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showWarnings>true</showWarnings>
</configuration>
</plugin>

<!-- assemble running 'mvn package' -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${mainClass}</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>