Maven learns two errors for Maven install and test under Eclipse 4

Source: Internet
Author: User


Error One:

1.eclipse, when Maven test, error:

-dmaven.multimoduleprojectdirectory= $M 2_home)

2. Workaround:

You can set up an environment variable m2_home point to your MAVEN installation directory m2_home=d:\apps\apache-maven-3.3.1 and then in window->preference->java->installed Jres->edit Setting the-dmaven.multimoduleprojectdirectory= $M in the default VM arguments 2_home

3. Re-run:

Reported error 2


Error 2:

Maven  No compiler is provided in this environment. Perhaps is running on a JRE rather than a JDK?
Workaround:

Select JDK Version (1.7) in window->preference->java->installed jres->execution environments


Operation Result:

[INFO] Scanning for projects ...                                                                         [INFO] [INFO]------------------------------------------------------------------------[INFO] Building mavenlearning 0.0.1 -snapshot[info]------------------------------------------------------------------------[INFO] [INFO]--- Maven-resources-plugin:2.6:resources (default-resources) @ mavenlearning---[INFO] Using ' UTF-8 ' encoding to copy Filtered resources. [INFO] Skip non existing resourcedirectory d:\all\eclipse432\mavenlearning\src\main\resources[info] [INFO]--- Maven-compiler-plugin:3.1:compile (default-compile) @ mavenlearning---[INFO] nothing to Compile-all classes is up to D Ate[info] [INFO]---maven-resources-plugin:2.6:testresources (default-testresources) @ mavenlearning---[info] Using ' UTF-8 ' encoding to copy filtered resources. [INFO] Skip non existing resourcedirectory d:\all\eclipse432\mavenlearning\src\test\resources[info] [INFO]--- Maven-compiler-plugin:3.1:testcOmpile (default-testcompile) @ mavenlearning---[info] Nothing to Compile-all classes is up to date[info] [INFO]---MA Ven-surefire-plugin:2.12.4:test (default-test) @ mavenlearning---[INFO] Surefire report directory:d:\all\eclipse432\ Mavenlearning\target\surefire-reports[info] downloading:https://repo.maven.apache.org/maven2/org/apache/maven/ Surefire/surefire-junit4/2.12.4/surefire-junit4-2.12.4.pom[info] downloaded:https://repo.maven.apache.org/ Maven2/org/apache/maven/surefire/surefire-junit4/2.12.4/surefire-junit4-2.12.4.pom (3 KB at 0.6 KB/sec) [INFO] downloading:https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.12.4/ Surefire-junit4-2.12.4.jar[info] Downloaded:https://repo.maven.apache.org/maven2/org/apache/maven/surefire/ Surefire-junit4/2.12.4/surefire-junit4-2.12.4.jar (Notoginseng KB at 32.4 kb/sec)------------------------------------------- ------------T E s t s-------------------------------------------------------Running Org.xubo.maven.MavenLearnIng. Apptesttests Run:1, failures:0, errors:0, skipped:0, Time elapsed:0.051 secresults:tests run:1, failures:0, Errors : 0, Skipped:0[info] [info]---maven-jar-plugin:2.4:jar (default-jar) @ mavenlearning---[info] Building jar:d:\all\ecl Ipse432\mavenlearning\target\mavenlearning-0.0.1-snapshot.jar[info] [INFO]---maven-install-plugin:2.4:install ( Default-install) @ mavenlearning---[INFO] installing D:\all\eclipse432\MavenLearning\target\ Mavenlearning-0.0.1-snapshot.jar to D:\1win7\java\apache-maven-3.3.9-bin\Repository\org\xubo\maven\MavenLearning \0.0.1-snapshot\mavenlearning-0.0.1-snapshot.jar[info] Installing D:\all\eclipse432\MavenLearning\pom.xml to D:\ 1win7\java\apache-maven-3.3.9-bin\repository\org\xubo\maven\mavenlearning\0.0.1-snapshot\ Mavenlearning-0.0.1-snapshot.pom[info]------------------------------------------------------------------------ [INFO] BUILD Success[info]------------------------------------------------------------------------[INFO] Total time:12.3S[info] finished at:2016-05-09t20:28:03+08:00[info] Final Memory:13m/166m[info]--------------------------------- ---------------------------------------


Reference

"1" http://fxb4632242.iteye.com/blog/2193945

"2" http://zhidao.baidu.com/link?url=jJVj6dw_0be5PdZrDR6m0PBjNhL3C6RbgfP89boI1mSbl2_ Eq0qck4jp5aqeuxbdbbz50kbj3lexff5khymzi_nh_sj1vadnm-p3jkxmjy7

Maven learns two errors for Maven install and test under Eclipse 4

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.