NCBI-Hackathons / seqr

Creative Commons Zero v1.0 Universal
12 stars 2 forks source link

Don't know enough about Maven to get it to build #11

Closed crashfrog closed 9 years ago

crashfrog commented 9 years ago
$ mvn clean install ; java -jar /Users/justin.payne/scripts/dev/seqr/target/seqr-4.10.4-SNAPSHOT.jar
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for gov.nih.nlm.ncbi.seqr:seqr:jar:4.10.4-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 28, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 13, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building seqr-application 4.10.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ seqr ---
[INFO] Deleting /Users/justin.payne/scripts/dev/seqr/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ seqr ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/justin.payne/scripts/dev/seqr/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ seqr ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to /Users/justin.payne/scripts/dev/seqr/target/classes
[WARNING] /Users/justin.payne/scripts/dev/seqr/src/main/gov/nih/nlm/ncbi/seqr/Output.java: /Users/justin.payne/scripts/dev/seqr/src/main/gov/nih/nlm/ncbi/seqr/Output.java uses unchecked or unsafe operations.
[WARNING] /Users/justin.payne/scripts/dev/seqr/src/main/gov/nih/nlm/ncbi/seqr/Output.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ seqr ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/justin.payne/scripts/dev/seqr/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ seqr ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ seqr ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ seqr ---
[INFO] Building jar: /Users/justin.payne/scripts/dev/seqr/target/seqr-4.10.4-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (copy-dependencies) @ seqr ---
[INFO] Copying log4j-1.2.17.jar to /Users/justin.payne/scripts/dev/seqr/target/log4j-1.2.17.jar
[INFO] Copying jetty-jmx-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-jmx-8.1.10.v20130312.jar
[INFO] Copying protobuf-java-2.5.0.jar to /Users/justin.payne/scripts/dev/seqr/target/protobuf-java-2.5.0.jar
[INFO] Copying concurrentlinkedhashmap-lru-1.2.jar to /Users/justin.payne/scripts/dev/seqr/target/concurrentlinkedhashmap-lru-1.2.jar
[INFO] Copying commons-io-2.3.jar to /Users/justin.payne/scripts/dev/seqr/target/commons-io-2.3.jar
[INFO] Copying wstx-asl-3.2.7.jar to /Users/justin.payne/scripts/dev/seqr/target/wstx-asl-3.2.7.jar
[INFO] Copying asm-commons-4.1.jar to /Users/justin.payne/scripts/dev/seqr/target/asm-commons-4.1.jar
[INFO] Copying lucene-expressions-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-expressions-4.10.4.jar
[INFO] Copying httpcore-4.3.jar to /Users/justin.payne/scripts/dev/seqr/target/httpcore-4.3.jar
[INFO] Copying lucene-misc-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-misc-4.10.4.jar
[INFO] Copying lucene-codecs-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-codecs-4.10.4.jar
[INFO] Copying jetty-webapp-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-webapp-8.1.10.v20130312.jar
[INFO] Copying httpmime-4.3.1.jar to /Users/justin.payne/scripts/dev/seqr/target/httpmime-4.3.1.jar
[INFO] Copying org.restlet-2.1.1.jar to /Users/justin.payne/scripts/dev/seqr/target/org.restlet-2.1.1.jar
[INFO] Copying slf4j-api-1.7.1.jar to /Users/justin.payne/scripts/dev/seqr/target/slf4j-api-1.7.1.jar
[INFO] Copying lucene-analyzers-kuromoji-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-analyzers-kuromoji-4.10.4.jar
[INFO] Copying gson-2.3.1.jar to /Users/justin.payne/scripts/dev/seqr/target/gson-2.3.1.jar
[INFO] Copying hadoop-common-2.2.0.jar to /Users/justin.payne/scripts/dev/seqr/target/hadoop-common-2.2.0.jar
[INFO] Copying jetty-continuation-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-continuation-8.1.10.v20130312.jar
[INFO] Copying jetty-xml-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-xml-8.1.10.v20130312.jar
[INFO] Copying hadoop-hdfs-2.2.0.jar to /Users/justin.payne/scripts/dev/seqr/target/hadoop-hdfs-2.2.0.jar
[INFO] Copying jetty-server-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-server-8.1.10.v20130312.jar
[INFO] Copying maven-artifact-3.0.3.jar to /Users/justin.payne/scripts/dev/seqr/target/maven-artifact-3.0.3.jar
[INFO] Copying commons-fileupload-1.2.1.jar to /Users/justin.payne/scripts/dev/seqr/target/commons-fileupload-1.2.1.jar
[INFO] Copying javax.servlet-3.0.0.v201112011016.jar to /Users/justin.payne/scripts/dev/seqr/target/javax.servlet-3.0.0.v201112011016.jar
[INFO] Copying jackson-mapper-asl-1.9.13.jar to /Users/justin.payne/scripts/dev/seqr/target/jackson-mapper-asl-1.9.13.jar
[INFO] Copying commons-codec-1.9.jar to /Users/justin.payne/scripts/dev/seqr/target/commons-codec-1.9.jar
[INFO] Copying log4j-core-2.2.jar to /Users/justin.payne/scripts/dev/seqr/target/log4j-core-2.2.jar
[INFO] Copying hadoop-auth-2.2.0.jar to /Users/justin.payne/scripts/dev/seqr/target/hadoop-auth-2.2.0.jar
[INFO] Copying jackson-core-asl-1.9.13.jar to /Users/justin.payne/scripts/dev/seqr/target/jackson-core-asl-1.9.13.jar
[INFO] Copying jetty-http-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-http-8.1.10.v20130312.jar
[INFO] Copying lucene-core-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-core-4.10.4.jar
[INFO] Copying dom4j-1.6.1.jar to /Users/justin.payne/scripts/dev/seqr/target/dom4j-1.6.1.jar
[INFO] Copying biojava-core-4.1.0.jar to /Users/justin.payne/scripts/dev/seqr/target/biojava-core-4.1.0.jar
[INFO] Copying hadoop-annotations-2.2.0.jar to /Users/justin.payne/scripts/dev/seqr/target/hadoop-annotations-2.2.0.jar
[INFO] Copying org.restlet.ext.servlet-2.1.1.jar to /Users/justin.payne/scripts/dev/seqr/target/org.restlet.ext.servlet-2.1.1.jar
[INFO] Copying commons-configuration-1.6.jar to /Users/justin.payne/scripts/dev/seqr/target/commons-configuration-1.6.jar
[INFO] Copying noggit-0.5.jar to /Users/justin.payne/scripts/dev/seqr/target/noggit-0.5.jar
[INFO] Copying slf4j-log4j12-1.7.1.jar to /Users/justin.payne/scripts/dev/seqr/target/slf4j-log4j12-1.7.1.jar
[INFO] Copying jetty-util-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-util-8.1.10.v20130312.jar
[INFO] Copying commons-lang-2.6.jar to /Users/justin.payne/scripts/dev/seqr/target/commons-lang-2.6.jar
[INFO] Copying httpclient-4.3.1.jar to /Users/justin.payne/scripts/dev/seqr/target/httpclient-4.3.1.jar
[INFO] Copying jetty-servlet-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-servlet-8.1.10.v20130312.jar
[INFO] Copying junit-3.8.1.jar to /Users/justin.payne/scripts/dev/seqr/target/junit-3.8.1.jar
[INFO] Copying zookeeper-3.4.6.jar to /Users/justin.payne/scripts/dev/seqr/target/zookeeper-3.4.6.jar
[INFO] Copying asm-4.1.jar to /Users/justin.payne/scripts/dev/seqr/target/asm-4.1.jar
[INFO] Copying json-simple-1.1.jar to /Users/justin.payne/scripts/dev/seqr/target/json-simple-1.1.jar
[INFO] Copying antlr-runtime-3.5.jar to /Users/justin.payne/scripts/dev/seqr/target/antlr-runtime-3.5.jar
[INFO] Copying hppc-0.5.2.jar to /Users/justin.payne/scripts/dev/seqr/target/hppc-0.5.2.jar
[INFO] Copying commons-cli-1.2.jar to /Users/justin.payne/scripts/dev/seqr/target/commons-cli-1.2.jar
[INFO] Copying guava-14.0.1.jar to /Users/justin.payne/scripts/dev/seqr/target/guava-14.0.1.jar
[INFO] Copying lucene-spatial-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-spatial-4.10.4.jar
[INFO] Copying lucene-analyzers-common-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-analyzers-common-4.10.4.jar
[INFO] Copying solr-core-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/solr-core-4.10.4.jar
[INFO] Copying joda-time-2.2.jar to /Users/justin.payne/scripts/dev/seqr/target/joda-time-2.2.jar
[INFO] Copying argparse4j-0.6.0.jar to /Users/justin.payne/scripts/dev/seqr/target/argparse4j-0.6.0.jar
[INFO] Copying jetty-io-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-io-8.1.10.v20130312.jar
[INFO] Copying jetty-security-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-security-8.1.10.v20130312.jar
[INFO] Copying lucene-join-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-join-4.10.4.jar
[INFO] Copying jetty-deploy-8.1.10.v20130312.jar to /Users/justin.payne/scripts/dev/seqr/target/jetty-deploy-8.1.10.v20130312.jar
[INFO] Copying plexus-utils-2.0.6.jar to /Users/justin.payne/scripts/dev/seqr/target/plexus-utils-2.0.6.jar
[INFO] Copying lucene-queryparser-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-queryparser-4.10.4.jar
[INFO] Copying solr-solrj-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/solr-solrj-4.10.4.jar
[INFO] Copying lucene-suggest-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-suggest-4.10.4.jar
[INFO] Copying commons-logging-1.1.3.jar to /Users/justin.payne/scripts/dev/seqr/target/commons-logging-1.1.3.jar
[INFO] Copying lucene-grouping-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-grouping-4.10.4.jar
[INFO] Copying log4j-slf4j-impl-2.2.jar to /Users/justin.payne/scripts/dev/seqr/target/log4j-slf4j-impl-2.2.jar
[INFO] Copying log4j-api-2.2.jar to /Users/justin.payne/scripts/dev/seqr/target/log4j-api-2.2.jar
[INFO] Copying lucene-memory-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-memory-4.10.4.jar
[INFO] Copying lucene-highlighter-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-highlighter-4.10.4.jar
[INFO] Copying lucene-queries-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-queries-4.10.4.jar
[INFO] Copying lucene-analyzers-phonetic-4.10.4.jar to /Users/justin.payne/scripts/dev/seqr/target/lucene-analyzers-phonetic-4.10.4.jar
[INFO] Copying spatial4j-0.4.1.jar to /Users/justin.payne/scripts/dev/seqr/target/spatial4j-0.4.1.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ seqr ---
[INFO] Installing /Users/justin.payne/scripts/dev/seqr/target/seqr-4.10.4-SNAPSHOT.jar to /Users/justin.payne/.m2/repository/gov/nih/nlm/ncbi/seqr/seqr/4.10.4-SNAPSHOT/seqr-4.10.4-SNAPSHOT.jar
[INFO] Installing /Users/justin.payne/scripts/dev/seqr/pom.xml to /Users/justin.payne/.m2/repository/gov/nih/nlm/ncbi/seqr/seqr/4.10.4-SNAPSHOT/seqr-4.10.4-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.926 s
[INFO] Finished at: 2015-08-05T18:10:36-04:00
[INFO] Final Memory: 29M/223M
[INFO] ------------------------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: net/sourceforge/argparse4j/inf/ArgumentParserException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
    at java.lang.Class.getMethod0(Class.java:3010)
    at java.lang.Class.getMethod(Class.java:1776)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: net.sourceforge.argparse4j.inf.ArgumentParserException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more
nyetsche commented 9 years ago

maven built just fine, you're combining two commands with $ mvn clean install ; java -jar /Users/justin.payne/scripts/dev/seqr/target/seqr-4.10.4-SNAPSHOT.jar.

But the second one says despite the success it couldn't find the argparse4j library/class. Not in your pom.xml?

crashfrog commented 9 years ago

But the second one says despite the success it couldn't find the argparse4j library/class. Not in your pom.xml?

It's there, and mvn was able to download the dependency; I'm just not sure why it's not being put on the classpath with the others. My Google-fu on this is weak; it seems like even the simplest Maven project requires absurdly complicated configuration and I don't even know where to start.

I'm hoping Lianyi can take a look at it, it seems like he's quite a bit more familiar with Maven projects than I am.

lianyi commented 9 years ago

I'll take a look

lianyi commented 9 years ago

I just fixed it in the master branch. Also added the tokenizer to src, add the resources and delete the empty submodule input/output since they are now in /src.

[INFO] Compiling 8 source files to C:\Users\hanl\Documents\IdeaProjects\seqr\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.587s
[INFO] Finished at: Thu Aug 06 10:56:06 EDT 2015
[INFO] Final Memory: 23M/309M
crashfrog commented 9 years ago

Did you actually get that jar to run? Because I got

no main manifest attribute, in /Users/justin.payne/scripts/dev/seqr/target/seqr-4.10.4-SNAPSHOT.jar

averagehat commented 9 years ago

You should be able to build as of #13

crashfrog commented 9 years ago

Ok, I'm getting a runnable jar now. Thanks!