Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

Update maven to create fat jar in the package phase. #94

Merged
merged 1 commit into from
Jun 5, 2015
Merged
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
20 changes: 4 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Getting started
* To use this code, build the client using `Apache Maven`_::

cd dataflow-java
mvn compile
mvn bundle:bundle
mvn package

* Then, follow the Google Genomics `# instructions`_ to generate a valid
``client_secrets.json`` file.
Expand All @@ -36,7 +35,7 @@ Getting started
Project ID and Google Cloud Storage bucket you made in the first step.
This command runs the VariantSimilarity pipeline (which runs PCoA on a dataset)::

java -cp target/google-genomics-dataflow*.jar \
java -cp target/google-genomics-dataflow*-runnable.jar \
com.google.cloud.genomics.dataflow.pipelines.VariantSimilarity \
--project=your-project-id \
--output=gs://your-bucket/output/localtest.txt \
Expand All @@ -48,7 +47,7 @@ Getting started
* To deploy your pipeline (which runs on Google Compute Engine), some additional
command line arguments are required::

java -cp target/google-genomics-dataflow*.jar \
java -cp target/google-genomics-dataflow*-runnable.jar \
com.google.cloud.genomics.dataflow.pipelines.VariantSimilarity \
--runner=BlockingDataflowPipelineRunner \
--project=your-project-id \
Expand Down Expand Up @@ -115,7 +114,7 @@ utils:

Maven artifact
--------------
This code is also deployed as a Maven artifact through Sonatype. The
This code is also deployed as Maven artifacts through Sonatype, including both a normal jar and a runnable jar containing all dependencies (a fat jar). The
`utils-java readme <https://github.com/googlegenomics/utils-java#releasing-new-versions>`_
has detailed instructions on how to deploy new versions.

Expand All @@ -136,17 +135,6 @@ You can find the latest version in

For an example pipeline that depends on this code in another GitHub repository, see https://github.com/googlegenomics/codelabs/tree/master/Java/PlatinumGenomes-variant-transformation.

Updating the prebuilt jar
-------------------------

The prebuilt jar is currently generated by hand (`but we plan to change this <https://github.com/googlegenomics/dataflow-java/issues/49>`_) whenever the code seems stable and has enough new features to warrant the effort.

To update the jar, bundle and copy to a new location::

cd dataflow-java
mvn clean compile bundle:bundle
cp target/google-genomics-dataflow*.jar google-genomics-dataflow.jar

Project status
--------------

Expand Down
Binary file removed google-genomics-dataflow.jar
Binary file not shown.
26 changes: 15 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,17 +255,21 @@
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.4.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- Embed all dependencies -->
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
</instructions>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>runnable</shadedClassifierName>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
Expand Down