Skip to content

Commit

Permalink
[ADAM-1006] Split uberjar out to adam-assembly submodule.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnothaft committed Jul 6, 2016
1 parent b425977 commit 96e31c2
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 35 deletions.
202 changes: 202 additions & 0 deletions adam-assembly/pom.xml
@@ -0,0 +1,202 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>org.bdgenomics.adam</groupId>
<artifactId>adam-parent_2.10</artifactId>
<version>0.19.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>adam-assembly_2.10</artifactId>
<packaging>jar</packaging>
<name>ADAM_2.10: Assembly</name>
<properties>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<executions>
<execution>
<id>filter-src</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- disable surefire -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- enable scalatest -->
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>ADAMTestSuite.txt</filereports>
<!--
As explained here: http://stackoverflow.com/questions/1660441/java-flag-to-enable-extended-serialization-debugging-info
The second option allows us better debugging for serialization-based errors.
-->
<argLine>-Xmx1024m -Dsun.io.serialization.extendedDebugInfo=true</argLine>
<stdout>F</stdout>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/scala</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/scala</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.bdgenomics.adam</groupId>
<artifactId>adam-cli_2.10</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.scoverage</groupId>
<artifactId>maven-scoverage-plugin</artifactId>
<version>${scoverage.version}</version>
<executions>
<execution>
<id>test</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<tagsToExclude>org.bdgenomics.adam.util.NetworkConnected,org.bdgenomics.adam.util.S3Test</tagsToExclude>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>network-connected</id>
<activation>
<property>
<name>networkconnected</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<configuration>
<tagsToExclude>org.bdgenomics.adam.util.S3Test</tagsToExclude>
<tagsToInclude>org.bdgenomics.adam.util.NetworkConnected</tagsToInclude>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
30 changes: 0 additions & 30 deletions adam-cli/pom.xml
Expand Up @@ -40,36 +40,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- disable surefire -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
6 changes: 3 additions & 3 deletions bin/adam-submit
Expand Up @@ -57,17 +57,17 @@ ADAM_CLI_JAR=
if [ -d "$SCRIPT_DIR/repo" ]; then
ASSEMBLY_DIR="$SCRIPT_DIR/repo"
else
ASSEMBLY_DIR="$SCRIPT_DIR/adam-cli/target"
ASSEMBLY_DIR="$SCRIPT_DIR/adam-assembly/target"
fi

num_jars="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam-cli_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc | wc -l)"
num_jars="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam-assembly_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc | wc -l)"
if [ "$num_jars" -eq "0" ]; then
echo "Failed to find ADAM cli assembly in $ASSEMBLY_DIR." 1>&2
echo "You need to build ADAM before running this program." 1>&2
exit 1
fi

ASSEMBLY_JARS="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam-cli_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc || true)"
ASSEMBLY_JARS="$(ls -1 "$ASSEMBLY_DIR" | grep "^adam-assembly_[0-9A-Za-z\.-]*\.jar$" | grep -v javadoc || true)"
if [ "$num_jars" -gt "1" ]; then
echo "Found multiple ADAM cli assembly jars in $ASSEMBLY_DIR:" 1>&2
echo "$ASSEMBLY_JARS" 1>&2
Expand Down
4 changes: 2 additions & 2 deletions distribution/src/main/assembly/assembly.xml
Expand Up @@ -45,9 +45,9 @@
<outputDirectory>javadocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../adam-cli/target</directory>
<directory>../adam-assembly/target</directory>
<includes>
<include>adam-cli_*.jar</include>
<include>adam-assembly_*.jar</include>
</includes>
<outputDirectory>repo</outputDirectory>
<directoryMode>0755</directoryMode>
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Expand Up @@ -36,6 +36,7 @@
<module>adam-core</module>
<module>adam-apis</module>
<module>adam-cli</module>
<module>adam-assembly</module>
</modules>

<licenses>
Expand Down Expand Up @@ -346,6 +347,11 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bdgenomics.adam</groupId>
<artifactId>adam-cli_2.10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.bdgenomics.adam</groupId>
<artifactId>adam-apis_2.10</artifactId>
Expand Down Expand Up @@ -566,6 +572,7 @@
<module>adam-core</module>
<module>adam-apis</module>
<module>adam-cli</module>
<module>adam-assembly</module>
<!-- distribution should be last -->
<module>distribution</module>
</modules>
Expand Down

0 comments on commit 96e31c2

Please sign in to comment.