Permalink
Browse files

project template with crunch-incubator dependencies

  • Loading branch information...
0 parents commit 22587c86714315cebf8cf20b14a23e8470dbf1d0 Dmitriy Lyubimov committed Oct 23, 2012
@@ -0,0 +1,3 @@
+*/.*
+*/target/
+*~
@@ -0,0 +1,195 @@
+<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/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.rcrunch</groupId>
+ <artifactId>rcrunch-parent</artifactId>
+ <version>0.1.0-incubating-SNAPSHOT</version>
+ <name>RCrunch :: Parent </name>
+
+ <packaging>pom</packaging>
+
+ <repositories>
+
+ <!-- this is specifically for rJava R distribution jars only which are
+ not currently pulished in maven public repos afaik. -->
+ <repository>
+ <id>dlyubimov-maven-repo-releases</id>
+ <url>https://github.com/dlyubimov/dlyubimov-maven-repo/raw/master/releases</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ </repositories>
+
+
+ <distributionManagement>
+ <repository>
+ <id>dlyubimov-maven-repo-releases</id>
+ <name>releases</name>
+ <url>https://github.com/dlyubimov/dlyubimov-maven-repo/releases</url>
+ </repository>
+ <snapshotRepository>
+ <id>dlyubimov-maven-repo-snapshots</id>
+ <name>snapshots</name>
+ <url>https://github.com/dlyubimov/dlyubimov-maven-repo/snapshots</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+
+ <modules>
+ <module>rcrunch-core</module>
+ <!-- module>rcrunch-examples</module -->
+ </modules>
+
+ <scm>
+ <!-- for this to work with release plugin, origin must be configured
+ to the current remote. i also did not find a way to use gitosis urls with
+ this. damn maven scm. -->
+ <developerConnection>scm:git:file://${basedir}</developerConnection>
+ </scm>
+
+
+ <profiles>
+ <profile>
+ <id>compiler</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <properties>
+ <crunch-version>0.4.0-incubating-SNAPSHOT</crunch-version>
+ <rJava-version>0.9-3</rJava-version>
+ </properties>
+ </profile>
+
+ </profiles>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </pluginManagement>
+
+ </build>
+
+
+ <dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <version>${project.version}</version>
+ <artifactId>core</artifactId>
+ </dependency>
+
+ <!-- 3rd party modules -->
+
+ <!-- Apache Crunch -->
+ <dependency>
+ <groupId>org.apache.crunch</groupId>
+ <artifactId>crunch</artifactId>
+ <version>${crunch-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.crunch</groupId>
+ <artifactId>crunch</artifactId>
+ <version>${crunch-version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.crunch</groupId>
+ <artifactId>crunch</artifactId>
+ <version>${crunch-version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+
+
+ <!-- R stuff -->
+ <dependency>
+ <groupId>org.r-project</groupId>
+ <artifactId>jri</artifactId>
+ <version>${rJava-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.r-project</groupId>
+ <artifactId>jriengine</artifactId>
+ <version>${rJava-version}</version>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.11</version>
+ </dependency>
+
+ </dependencies>
+
+ </dependencyManagement>
+
+</project>
+
@@ -0,0 +1,16 @@
+Package:
+Version:
+Date:
+Title: Crunch R
+License: Apache (==2.0)
+Authors@R: c(person("Dmitriy", "Lyubimov", role = c("aut","cre"),
+ email = "dlyubimov@apache.org")
+ )
+Author: Dmitriy Lyubimov
+Maintainer: Dmitriy Lyubimov <dlyubimov@apache.org>
+SystemRequirements: java
+Depends: R (>= 2.14.0), rJava
+Description: R bridge to Apache Crunch, Hadoop's hdfs and Mahout's DRM formats
+URL: https://github.com/dlyubimov/RCrunch
+BugReports: https://github.com/dlyubimov/RCrunch
+
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# compiles R stuff.
+# had problems with putting this into
+# maven antrun.
+# param #1 -> R pkg version
+# param #2 -> build version
+# param #3 -> output pkgdir
+
+if [ $# -ne 4 ]; then
+ echo 'usage: genDescription.sh <r-package> <maven-version> <R pkg input dir> <output-generated-sources-path>'
+ exit 1
+fi
+
+test ! -f "`which R`" && { echo "Cannot find R. is R installed? In the path?"; exit 1; }
+
+pkgName=$1
+mver=$2
+pkgdir=$3
+outdir=$4
+descrFile=$outdir/DESCRIPTION
+
+d=`date +%F`
+
+h=`date +%Y%m%d%H%M%S`
+
+# strip -SNAPSHOT things that create problems
+rver=`sed "s/-SNAPSHOT\$/-$h/" <<< $mver`
+
+echo $ver
+
+sed "s/^Version:/& ${rver}/" DESCRIPTION.tmpl | sed "s/^Date:/& ${d}/" | \
+sed "s/^Package:/& ${pkgName}/" > "$descrFile"
+
+# also while we are at it, try to generate manuals using roxygen2 package
+# and copy the entire thing
+
+R --vanilla <<EOF
+
+# copy stuff
+files2copy <- list.files("${pkgdir}",full.names=T, include.dirs=T)
+file.copy(from=files2copy,to="${outdir}", recursive=T)
+
+# gen docs
+library("roxygen2")
+roxygenize(package.dir="${outdir}")
+
+EOF
Oops, something went wrong.

0 comments on commit 22587c8

Please sign in to comment.