Skip to content

Commit

Permalink
Merge pull request #1 from genepattern/develop
Browse files Browse the repository at this point in the history
VisualizerLauncher_1.2.1
  • Loading branch information
Peter J Carr authored Feb 17, 2017
2 parents 6083b42 + 1ca1840 commit 21464e4
Show file tree
Hide file tree
Showing 34 changed files with 309 additions and 4,688 deletions.
14 changes: 4 additions & 10 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="lib"/>
<classpathentry kind="lib" path="lib/httpcore-4.4.4.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.10.jar"/>
<classpathentry kind="lib" path="lib/httpclient-4.5.2.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="lib/log4j-api-2.5.jar"/>
<classpathentry kind="lib" path="lib/log4j-core-2.5.jar"/>
<classpathentry kind="output" path="build/classes"/>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*~
/bin
/build
/target
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
21 changes: 21 additions & 0 deletions HOW-TO-codesign.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Code signing is not integrated into the build script. At the Broad Institute we do something like ...

1) create a zip file
cd target/VisualizerLauncher-1.2.1-SNAPSHOT-r2
zip -r VisualizerLauncher.app.zip VisualizerLauncher.app

2) copy it to remote server
scp VisualizerLauncher.app.zip <user>@<host>:~/visualizer-launcher

3) sign the code
ssh <user>@<host>
cd ~/visualizer-launcher
mkdir dist
/sysman/scratch/teixeira/macsign/macsign.sh \
-h xcode \
-a `pwd`/VisualizerLauncher.app.zip \
-d `pwd`/dist \
-i /home/unix/genepatt/.ssh/id_rsa_genepatt \
-u igvrole

4) upload this to GitHub release
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,24 @@ The application is available for download directly from the [releases](https://g
The VisualizerLauncher opens in a new application window. If for some reason it is hidden, look for the "VisualizerLauncher" java application icon in your dock. Enter the server, (e.g. http(s)://genepattern.broadinstitute.org/gp), your username, password, and the job number of your visualizer job. Click 'Submit'. The launcher will connect to the server, download the required application and data files, and launch the visualizer as a new window.

#### Building from source
Use **ant** to build the project with the default "package" target.
Use **mvn** to build the project with the defaultGoal "package"

ant
mvn
(equivalently) mvn package

This will create the runVisualizer.jar file in the ./dist directory. For more details ...
This creates packages in the ./target directory.
* (java executable) VisualizerLauncher-1.2.1-SNAPSHOT-r2-jar-with-dependencies.jar
* (Mac OS X app) VisualizerLauncher-1.2.1-SNAPSHOT-r2/VisualizerLauncher.app

ant -p
To run as a jar executable

mvn exec:exec


To run on Mac OS X

open target/VisualizerLauncher-1.2.1-SNAPSHOT-r2/VisualizerLauncher.app

For more details ... consult the pom.xml file

mvn help
2 changes: 2 additions & 0 deletions buildNumber.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#maven.buildNumber.plugin properties file
buildNumber=1
6 changes: 5 additions & 1 deletion build.xml → build_deprecated.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Ant build file -->
<!--
(deprecated) Ant build file
Keeping this around for one iteration before removing it from the repo.
We are using maven now.
-->

<project basedir="" default="package-jar" name="VisualizerLauncher">
<!-- Hook into One-Jar project -->
Expand Down
Binary file removed lib/commons-codec-1.10.jar
Binary file not shown.
Binary file removed lib/commons-logging-1.2.jar
Binary file not shown.
Binary file removed lib/httpclient-4.5.2.jar
Binary file not shown.
Binary file removed lib/httpcore-4.4.4.jar
Binary file not shown.
Binary file removed lib/log4j-api-2.5.jar
Binary file not shown.
Binary file removed lib/log4j-core-2.5.jar
Binary file not shown.
254 changes: 254 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
<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"
>
<!--
==================================================
GenePattern Visualizer Launcher Maven Project
==================================================
Usage:
# launch application (for debugging, testing)
mvn exec:exec
# package everything up for distribution
mvn package
-->

<modelVersion>4.0.0</modelVersion>
<groupId>genepattern.org</groupId>
<artifactId>VisualizerLauncher</artifactId>
<version>1.2.1</version>
<name>VisualizerLauncher</name>
<url>http://maven.apache.org</url>

<prerequisites>
<maven>3.0</maven>
</prerequisites>

<!-- dummy scm required for buildnumber-maven-plugin -->
<scm>
<connection>scm:svn:http://127.0.0.1/dummy</connection>
<developerConnection>scm:svn:https://127.0.0.1/dummy</developerConnection>
<tag>HEAD</tag>
<url>http://127.0.0.1/dummy</url>
</scm>

<build>
<!--
<defaultGoal>clean package exec:exec</defaultGoal>
-->
<defaultGoal>package</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>buildnumber</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<revisionOnScmFailure>unknownbuild</revisionOnScmFailure>
<format>{0,number}</format>
<items>
<item>buildNumber</item>
</items>
</configuration>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>

<!-- Example: how to add an additional classpath element for junit tests -->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/src/test/lib/jdom.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
-->

<!--
==================================================
maven-assembly-plugin
==================================================
Usage:
mvn clean compile assembly:single
To create an executable jar file which includes all library dependencies.
see: http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>${mainClass}</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</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>

<!--
==================================================
appbundle-maven-plugin (Mac OS X)
==================================================
To package as a Mac OS X application bundle
see: https://github.com/federkasten/appbundle-maven-plugin
-->
<plugin>
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>
<version>1.2.0</version>
<configuration>
<mainClass>${mainClass}</mainClass>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>

<!--
==================================================
exec-maven-plugin
==================================================
Run the VisualizerLauncher from the mvn command line.
Usage:
mvn -q clean package exec:exec
Note: '-q' means quiet, -X for debug output
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>run-jar</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>${jarFile}</argument>
<!--
<argument>-classpath</argument>
<classpath/>
<argument>${mainClass}</argument>
-->
</arguments>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}-${project.version}-SNAPSHOT-r${buildNumber}</finalName>
</build>

<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.build.timestamp.format>yyyy-MM-dd-HHmmss</maven.build.timestamp.format>

<mainClass>org.genepattern.desktop.VisualizerLauncher</mainClass>
<jarFile>target/${project.artifactId}-${project.version}-SNAPSHOT-r${buildNumber}-jar-with-dependencies.jar</jarFile>
</properties>

<dependencies>

<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.5</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.5</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160810</version>
</dependency>

<!-- for testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>

</dependencies>
</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 21464e4

Please sign in to comment.