1 问题描述
当在ubuntu下使用IDEA 13.0 maven3.3.9的时候mvn package出现问题
/usr/lib/jvm/java-7-openjdk-amd64/bin/java -Dmaven.home=/home/xubo/cloud/apache-maven-3.3.9 -Dclassworlds.conf=/home/xubo/cloud/apache-maven-3.3.9/bin/m2.conf -Didea.launcher.port=7536 -Didea.launcher.bin.path=/opt/intellij-idea-ce/bin -Dfile.encoding=UTF-8 -classpath /home/xubo/cloud/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/opt/intellij-idea-ce/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher package
-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.
Process finished with exit code 1
2 问题解决
(IDEA 13)File->setting->Build,Exe…->Build Tools->Maven->Runner->设置VM Options:
-Dmaven.multiModuleProjectDirectory=$M2_HOME
这样的话不用改变版本。
问题解决:
/usr/lib/jvm/java-7-openjdk-amd64/bin/java -Dmaven.multiModuleProjectDirectory=$M2_HOME -Dmaven.home=/home/xubo/cloud/apache-maven-3.3.9 -Dclassworlds.conf=/home/xubo/cloud/apache-maven-3.3.9/bin/m2.conf -Didea.launcher.port=7535 -Didea.launcher.bin.path=/opt/intellij-idea-ce/bin -Dfile.encoding=UTF-8 -classpath /home/xubo/cloud/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/opt/intellij-idea-ce/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SparkBWA 0.2
[INFO] ------------------------------------------------------------------------
Downloading: https://mvn.128.no/maven2/cz/adamh/utils/native-utils/1.0-SNAPSHOT/maven-Metadata.xml
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SparkBWA ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources,i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SparkBWA ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- exec-maven-plugin:1.1.1:exec (makeBwa) @ SparkBWA ---
[INFO] make: Entering directory `/home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/src/main/native'
[INFO] if [ ! -d "build" ]; then mkdir build; fi
[INFO] gcc -c -g -Wall -Wno-unused-function -O2 -fPIC -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS -I/home/xubo/cloud/jdk1.7.0/include -I/home/xubo/cloud/jdk1.7.0/include/linux bwa_jni.c -o build/bwa_jni.o -lrt -lz
[INFO] bwa_jni.c: In function ‘Java_com_github_sparkbwa_BwaJni_bwa_1jni’:
[INFO] bwa_jni.c:55:21: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
[INFO] argvTmp[i] = (*env)->GetStringUTFChars(env,string,0);
[INFO] ^
[INFO] make -C ./bwa-0.7.15
[INFO] make[1]: Entering directory `/home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/src/main/native/bwa-0.7.15'
[INFO] make[1]: Nothing to be done for `all'.
[INFO] make[1]: Leaving directory `/home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/src/main/native/bwa-0.7.15'
[INFO] if [ ! -d "build" ]; then mkdir build; fi
[INFO] cp ./bwa-0.7.15/*.o build
[INFO] gcc -shared -o build/libbwa.so build/*.o -lrt -lz
[INFO] #cp build/libbwa.so ../resources/
[INFO] cp build/libbwa.so ../../../target/classes/
[INFO] #cd build && zip -r bwa ./* && cd ..
[INFO] ================================================================================
[INFO] SparkBWA library has been built.
[INFO] Location = /home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/src/main/native/build/
[INFO] JAVA_HOME = /home/xubo/cloud/jdk1.7.0
[INFO] ================================================================================
[INFO] make: Leaving directory `/home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/src/main/native'
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SparkBWA ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources,i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SparkBWA ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SparkBWA ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ SparkBWA ---
[INFO] Building jar: /home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/target/SparkBWA-0.2.jar
[INFO]
[INFO] --- maven-shade-plugin:2.4.3:shade (default) @ SparkBWA ---
[INFO] Excluding org.apache.spark:spark-core_2.11:jar:2.0.1 from the shaded jar.
[INFO] Excluding org.apache.avro:avro-mapred:jar:hadoop2:1.7.7 from the shaded jar.
[INFO] Excluding org.apache.avro:avro-ipc:jar:1.7.7 from the shaded jar.
[INFO] Excluding org.apache.avro:avro:jar:1.7.7 from the shaded jar.
[INFO] Excluding org.apache.avro:avro-ipc:jar:tests:1.7.7 from the shaded jar.
[INFO] Excluding org.codehaus.jackson:jackson-core-asl:jar:1.9.13 from the shaded jar.
[INFO] Excluding org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13 from the shaded jar.
[INFO] Excluding com.twitter:chill_2.11:jar:0.8.0 from the shaded jar.
[INFO] Excluding com.esotericsoftware:kryo-shaded:jar:3.0.3 from the shaded jar.
[INFO] Excluding com.esotericsoftware:minlog:jar:1.3.0 from the shaded jar.
[INFO] Excluding org.objenesis:objenesis:jar:2.1 from the shaded jar.
[INFO] Excluding com.twitter:chill-java:jar:0.8.0 from the shaded jar.
[INFO] Excluding org.apache.xbean:xbean-asm5-shaded:jar:4.4 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-client:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-common:jar:2.2.0 from the shaded jar.
[INFO] Excluding commons-cli:commons-cli:jar:1.2 from the shaded jar.
[INFO] Excluding org.apache.commons:commons-math:jar:2.1 from the shaded jar.
[INFO] Excluding xmlenc:xmlenc:jar:0.52 from the shaded jar.
[INFO] Excluding commons-io:commons-io:jar:2.1 from the shaded jar.
[INFO] Excluding commons-lang:commons-lang:jar:2.5 from the shaded jar.
[INFO] Excluding commons-configuration:commons-configuration:jar:1.6 from the shaded jar.
[INFO] Excluding commons-collections:commons-collections:jar:3.2.1 from the shaded jar.
[INFO] Excluding commons-digester:commons-digester:jar:1.8 from the shaded jar.
[INFO] Excluding commons-beanutils:commons-beanutils:jar:1.7.0 from the shaded jar.
[INFO] Excluding commons-beanutils:commons-beanutils-core:jar:1.8.0 from the shaded jar.
[INFO] Excluding com.google.protobuf:protobuf-java:jar:2.5.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-auth:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.commons:commons-compress:jar:1.4.1 from the shaded jar.
[INFO] Excluding org.tukaani:xz:jar:1.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-hdfs:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.mortbay.jetty:jetty-util:jar:6.1.26 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-mapreduce-client-app:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-mapreduce-client-common:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-yarn-client:jar:2.2.0 from the shaded jar.
[INFO] Excluding com.google.inject:guice:jar:3.0 from the shaded jar.
[INFO] Excluding javax.inject:javax.inject:jar:1 from the shaded jar.
[INFO] Excluding aopalliance:aopalliance:jar:1.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-yarn-server-common:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-mapreduce-client-shuffle:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-yarn-api:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-mapreduce-client-core:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-yarn-common:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-annotations:jar:2.2.0 from the shaded jar.
[INFO] Excluding org.apache.spark:spark-launcher_2.11:jar:2.0.1 from the shaded jar.
[INFO] Excluding org.apache.spark:spark-network-common_2.11:jar:2.0.1 from the shaded jar.
[INFO] Excluding org.fusesource.leveldbjni:leveldbjni-all:jar:1.8 from the shaded jar.
[INFO] Excluding com.fasterxml.jackson.core:jackson-annotations:jar:2.6.5 from the shaded jar.
[INFO] Excluding org.apache.spark:spark-network-shuffle_2.11:jar:2.0.1 from the shaded jar.
[INFO] Excluding org.apache.spark:spark-unsafe_2.11:jar:2.0.1 from the shaded jar.
[INFO] Excluding net.java.dev.jets3t:jets3t:jar:0.7.1 from the shaded jar.
[INFO] Excluding commons-codec:commons-codec:jar:1.3 from the shaded jar.
[INFO] Excluding commons-httpclient:commons-httpclient:jar:3.1 from the shaded jar.
[INFO] Excluding org.apache.curator:curator-recipes:jar:2.4.0 from the shaded jar.
[INFO] Excluding org.apache.curator:curator-framework:jar:2.4.0 from the shaded jar.
[INFO] Excluding org.apache.curator:curator-client:jar:2.4.0 from the shaded jar.
[INFO] Excluding org.apache.zookeeper:zookeeper:jar:3.4.5 from the shaded jar.
[INFO] Excluding com.google.guava:guava:jar:14.0.1 from the shaded jar.
[INFO] Excluding javax.servlet:javax.servlet-api:jar:3.1.0 from the shaded jar.
[INFO] Excluding org.apache.commons:commons-lang3:jar:3.3.2 from the shaded jar.
[INFO] Excluding org.apache.commons:commons-math3:jar:3.4.1 from the shaded jar.
[INFO] Excluding com.google.code.findbugs:jsr305:jar:1.3.9 from the shaded jar.
[INFO] Excluding org.slf4j:slf4j-api:jar:1.7.16 from the shaded jar.
[INFO] Excluding org.slf4j:jul-to-slf4j:jar:1.7.16 from the shaded jar.
[INFO] Excluding org.slf4j:jcl-over-slf4j:jar:1.7.16 from the shaded jar.
[INFO] Excluding log4j:log4j:jar:1.2.17 from the shaded jar.
[INFO] Excluding org.slf4j:slf4j-log4j12:jar:1.7.16 from the shaded jar.
[INFO] Excluding com.ning:compress-lzf:jar:1.0.3 from the shaded jar.
[INFO] Excluding org.xerial.snappy:snappy-java:jar:1.1.2.6 from the shaded jar.
[INFO] Excluding net.jpountz.lz4:lz4:jar:1.3.0 from the shaded jar.
[INFO] Excluding org.roaringbitmap:RoaringBitmap:jar:0.5.11 from the shaded jar.
[INFO] Excluding commons-net:commons-net:jar:2.2 from the shaded jar.
[INFO] Excluding org.scala-lang:scala-library:jar:2.11.8 from the shaded jar.
[INFO] Excluding org.json4s:json4s-jackson_2.11:jar:3.2.11 from the shaded jar.
[INFO] Excluding org.json4s:json4s-core_2.11:jar:3.2.11 from the shaded jar.
[INFO] Excluding org.json4s:json4s-ast_2.11:jar:3.2.11 from the shaded jar.
[INFO] Excluding com.thoughtworks.paranamer:paranamer:jar:2.6 from the shaded jar.
[INFO] Excluding org.scala-lang:scalap:jar:2.11.0 from the shaded jar.
[INFO] Excluding org.scala-lang:scala-compiler:jar:2.11.0 from the shaded jar.
[INFO] Excluding org.scala-lang.modules:scala-parser-combinators_2.11:jar:1.0.1 from the shaded jar.
[INFO] Excluding org.glassfish.jersey.core:jersey-client:jar:2.22.2 from the shaded jar.
[INFO] Excluding javax.ws.rs:javax.ws.rs-api:jar:2.0.1 from the shaded jar.
[INFO] Excluding org.glassfish.hk2:hk2-api:jar:2.4.0-b34 from the shaded jar.
[INFO] Excluding org.glassfish.hk2:hk2-utils:jar:2.4.0-b34 from the shaded jar.
[INFO] Excluding org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34 from the shaded jar.
[INFO] Excluding org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34 from the shaded jar.
[INFO] Excluding org.glassfish.hk2:hk2-locator:jar:2.4.0-b34 from the shaded jar.
[INFO] Excluding org.javassist:javassist:jar:3.18.1-GA from the shaded jar.
[INFO] Excluding org.glassfish.jersey.core:jersey-common:jar:2.22.2 from the shaded jar.
[INFO] Excluding javax.annotation:javax.annotation-api:jar:1.2 from the shaded jar.
[INFO] Excluding org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.2 from the shaded jar.
[INFO] Excluding org.glassfish.hk2:osgi-resource-locator:jar:1.0.1 from the shaded jar.
[INFO] Excluding org.glassfish.jersey.core:jersey-server:jar:2.22.2 from the shaded jar.
[INFO] Excluding org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.2 from the shaded jar.
[INFO] Excluding javax.validation:validation-api:jar:1.1.0.Final from the shaded jar.
[INFO] Excluding org.glassfish.jersey.containers:jersey-container-servlet:jar:2.22.2 from the shaded jar.
[INFO] Excluding org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.2 from the shaded jar.
[INFO] Excluding org.apache.mesos:mesos:jar:shaded-protobuf:0.21.1 from the shaded jar.
[INFO] Excluding io.netty:netty-all:jar:4.0.29.Final from the shaded jar.
[INFO] Excluding io.netty:netty:jar:3.8.0.Final from the shaded jar.
[INFO] Excluding com.clearspring.analytics:stream:jar:2.7.0 from the shaded jar.
[INFO] Excluding io.dropwizard.metrics:metrics-core:jar:3.1.2 from the shaded jar.
[INFO] Excluding io.dropwizard.metrics:metrics-jvm:jar:3.1.2 from the shaded jar.
[INFO] Excluding io.dropwizard.metrics:metrics-json:jar:3.1.2 from the shaded jar.
[INFO] Excluding io.dropwizard.metrics:metrics-graphite:jar:3.1.2 from the shaded jar.
[INFO] Excluding com.fasterxml.jackson.core:jackson-databind:jar:2.6.5 from the shaded jar.
[INFO] Excluding com.fasterxml.jackson.core:jackson-core:jar:2.6.5 from the shaded jar.
[INFO] Excluding com.fasterxml.jackson.module:jackson-module-scala_2.11:jar:2.6.5 from the shaded jar.
[INFO] Excluding org.scala-lang:scala-reflect:jar:2.11.7 from the shaded jar.
[INFO] Excluding com.fasterxml.jackson.module:jackson-module-paranamer:jar:2.6.5 from the shaded jar.
[INFO] Excluding org.apache.ivy:ivy:jar:2.4.0 from the shaded jar.
[INFO] Excluding oro:oro:jar:2.0.8 from the shaded jar.
[INFO] Excluding net.razorvine:pyrolite:jar:4.9 from the shaded jar.
[INFO] Excluding net.sf.py4j:py4j:jar:0.10.3 from the shaded jar.
[INFO] Excluding org.apache.spark:spark-tags_2.11:jar:2.0.1 from the shaded jar.
[INFO] Excluding org.scalatest:scalatest_2.11:jar:2.2.6 from the shaded jar.
[INFO] Excluding org.scala-lang.modules:scala-xml_2.11:jar:1.0.2 from the shaded jar.
[INFO] Excluding org.spark-project.spark:unused:jar:1.0.0 from the shaded jar.
[INFO] Including cz.adamh.utils:native-utils:jar:1.0-SNAPSHOT in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/target/SparkBWA-0.2.jar with /home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/target/SparkBWA-0.2-shaded.jar
[INFO] Dependency-reduced POM written at: /home/xubo/xubo/tools/SparkBWA20170116/SparkBWA/dependency-reduced-pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.173 s
[INFO] Finished at: 2017-01-22T21:00:57+08:00
[INFO] Final Memory: 22M/173M
[INFO] ------------------------------------------------------------------------
Process finished with exit code 0