1.run As->maven Build, enter package in goals, don't choose Select, my card is dead.
Run Record:
[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-------------------------------------------------------t E S t S-------------------------------------------------------Running org.xubo.maven.MavenLearning.AppTestTests run:1, failures:0, errors:0, skipped:0, Time elapsed:0.039 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\eclipse432\ Mavenlearning\target\mavenlearning-0.0.1-snapshot.jar[info]--------------------------------------------------- ---------------------[INFO] BUILD Success[info]----------------------------------------------------------------- -------[INFO] Total time:3.110 s[info] finished At:2016-05-09t20:39:49+08:00[info] Final Memory:13m/166m[info]------------------------------------------------------------------------
After Packaget, the corresponding package can be found in target.
2.scope:
1, test range refers to the testing scope is valid, in the compilation and packaging will not use this dependency 2, compile scope refers to the compilation scope is valid, in the compilation and packaging will be dependent on the storage of 3, provided dependency: the process of compiling and testing is valid, the final generation of the war package will not be added, such as: Servlet-api, because the Servlet-api,tomcat and other Web servers already exist, if the packaging will conflict 4, runtime depends on the run time, at compile time does not rely on the default dependency range is compile
Maven learns the MAVEN package run and scope understanding under Eclipse 5