1.Maven优势
1)项目自动化编译部署
开发项目过程:
上述过程是重复的.maven可以最大化的消除重复,简化了重复的过程,这只是要一个简单的命令.
2)项目jar包的依赖管理
3)项目的插件管理
2.Maven介绍
maven是一个基于项目对象模型(POM,maven项目的一个总的配置文件)构建和管理的工具,可以方便的编译代码、进行依赖管理、插件集成,
有利于项目过程规范化、自动化、高效化.
3.安装Maven
1)官网下载安装包https://maven.apache.org/download.cgi 下载与当前操作系统相对应的二进制包(bin包),并解压到安装目录.
注意:maven-3.3及以上版本需要JDK 1.7以上的支持.
2)环境变量配置MAVEN_HOME
3)验证是否安装成功 mvn -v
4.maven项目约定
项目约定主要是规范开发人员编程,统一项目风格,简化操作.
指自己有固定的文件目录及对应目录的文件输出和文件配置的输出.
约定大于配置 => 简化配置
Maven项目结构:
5.Maven的核心知识
项目骨架:项目骨架是根据maven项目约定的规则来创建项目目录结构和资源文件.
构建项目命令:
mvn archetype:generate //archetype [‘ɑ?k?ta?p]:原型 ;generate [‘d?en?re?t]:生成,产生
-DgroupId=组织名称
-DartifactId=项目名称
-Dversion=版本号
-Dpackage=包路径
实例:
打开CMD,这里统一将项目放到F:\mavenDemo目录下,切换到F:\mavenDemo,执行如下命令:
C:\Users\chj03>F:
F:\>cd mavenDemo
F:\mavenDemo> //cls清屏 ;dir <path>列出path路径下的文件及目录 ;
创建maven项目:
1)与用户交互的方式创建:
通过网络:
// maven从官网下载项目骨架目录
F:\mavenDemo>mvn archetype:generate //与用户交互式创建maven项目
[INFO]Scanningfor projects...
...
Choose a number or apply filter (format:[groupId:]artifactId,case sensitive contains):777: //通过
maven-archetype-quickstart(777)创建普通的maven项目,这是默认的Choose org.apache.maven.archetypes:maven-archetype-quickstart version://选择maven-archetype-quickstart version的版本,直接回车,
1:1.0-alpha-1
2:1.0-alpha-2
3:1.0-alpha-3
4:1.0-alpha-4
5:1.0
6:1.1
Choose a number:6://回车
...
Define value for property ‘groupId‘:: com.chenjun.demo //组织名称
Define value for property ‘artifactId‘:: maven-01 //项目名称
Define value for property ‘version‘:1.0-SNAPSHOT::1.0-SNAPSHOT //版本号
Define value for property ‘package‘: com.chenjun.demo:: com.chenjun.demo //包的路径
Confirm properties configuration: //确认上述输入是否正确,确定无误输入Y并回车
groupId: com.chenjun.demo
artifactId: maven-01
version:1.0-SNAPSHOT
package: com.chenjun.demo
Y:: Y
[INFO]----------------------------------------------------------------------------
[INFO]Using following parameters for creating project from Old(1.x)Archetype: maven-archetype-quickstart:1.1
[INFO]----------------------------------------------------------------------------
[INFO]Parameter: groupId,Value: com.chenjun.demo
[INFO]Parameter: packageName,Value: com.chenjun.demo
[INFO]Parameter: package,Value: com.chenjun.demo
[INFO]Parameter: artifactId,Value: maven-01
[INFO]Parameter: basedir,Value: F:\mavenDemo
[INFO]Parameter: version,Value:1.0-SNAPSHOT
[INFO] project created from Old(1.x)Archetypein dir: F:\mavenDemo\maven-01
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS //表示创建成功
[INFO]------------------------------------------------------------------------
[INFO]Total time:59:57 min
[INFO]Finished at:2016-05-13T12:27:21+08:00
[INFO]FinalMemory:12M/129M
[INFO]------------------------------------------------------------------------
通过插件:
//骨架目录结构不通过远程创建,通过插件内部目录结构创建,快速
F:\mavenDemo\train>mvn archetype:generate -DarchetypeCatalog=internal //走本地骨架的目录
[INFO]Scanningfor projects...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO]BuildingMavenStubProject(No POM)1
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]>>> maven-archetype-plugin:2.4:generate (default-cli)> generate-sources @ standalone-pom >>>
[INFO]
[INFO]<<< maven-archetype-plugin:2.4:generate (default-cli)< generate-sources @ standalone-pom <<<
[INFO]
[INFO]--- maven-archetype-plugin:2.4:generate (default-cli)@ standalone-pom ---
[INFO]Generating project inInteractive mode
[INFO]No archetype defined.Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: internal -> org.apache.maven.archetypes:maven-archetype-archetype (An archetype which contains a sample archetype.)
2: internal -> org.apache.maven.archetypes:maven-archetype-j2ee-simple (An archetype which contains a simplifed sample J2EE application.)
3: internal -> org.apache.maven.archetypes:maven-archetype-plugin (An archetype which contains a sample Maven plugin.)
4: internal -> org.apache.maven.archetypes:maven-archetype-plugin-site (An archetype which contains a sample Maven plugin site.
This archetype can be layered upon an existing Maven plugin project.)
5: internal -> org.apache.maven.archetypes:maven-archetype-portlet (An archetype which contains a sample JSR-268Portlet.)
6: internal -> org.apache.maven.archetypes:maven-archetype-profiles ()
7: internal -> org.apache.maven.archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)
8: internal -> org.apache.maven.archetypes:maven-archetype-site (An archetype which contains a sample Maven site which demonstrates
some of the supported document types like APT,XDoc, and FML and demonstrates how
to i18n your site.This archetype can be layered upon an existing Maven project.)
9: internal -> org.apache.maven.archetypes:maven-archetype-site-simple (An archetype which contains a sample Maven site.)
10: internal -> org.apache.maven.archetypes:maven-archetype-webapp (An archetype which contains a sample MavenWebapp project.)
Choose a number or apply filter (format:[groupId:]artifactId,case sensitive contains):7: //默认,回车
Define value for property ‘groupId‘:: com.sohu.train //组织名称
Define value for property ‘artifactId‘:: maven-01 //项目名称
Define value for property ‘version‘:1.0-SNAPSHOT::1.0-SNAPSHOT //版本号
Define value for property ‘package‘: com.sohu.train:: com.sohu.train //包的路径
Confirm properties configuration:
groupId: com.sohu.train
artifactId: maven-01
version:1.0-SNAPSHOT
package: com.sohu.train
Y:: Y
[INFO]----------------------------------------------------------------------------
[INFO]Using following parameters for creating project from Old(1.x)Archetype: maven-archetype-quickstart:1.1
[INFO]----------------------------------------------------------------------------
[INFO]Parameter: groupId,Value: com.sohu.train
[INFO]Parameter: packageName,Value: com.sohu.train
[INFO]Parameter: package,Value: com.sohu.train
[INFO]Parameter: artifactId,Value: maven-01
[INFO]Parameter: basedir,Value: F:\mavenDemo\train
[INFO]Parameter: version,Value:1.0-SNAPSHOT
[INFO] project created from Old(1.x)Archetypein dir: F:\mavenDemo\train\maven-01
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS //创建成功
[INFO]------------------------------------------------------------------------
[INFO]Total time:01:34 min
[INFO]Finished at:2016-05-13T12:48:39+08:00
[INFO]FinalMemory:13M/154M
[INFO]------------------------------------------------------------------------
查看maven项目结构:
F:\mavenDemo\train>tree //TREE
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
└─maven-01 //maven项目
└─src
├─main
│└─java
│└─com
│└─sohu
│└─train
└─test
└─java
└─com
└─sohu
└─train
2)直接创建maven项目:
F:\mavenDemo\train>mvn archetype:generate -DarchetypeCatalog=internal -DgroupId=com.sohu.train -DartifactId=maven-02-Dversion=1.0-SNAPSHOT -Dpackage=com.sohu.train
[INFO]Scanningfor projects...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO]BuildingMavenStubProject(No POM)1
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]>>> maven-archetype-plugin:2.4:generate (default-cli)> generate-sources @ standalone-pom >>>
[INFO]
[INFO]<<< maven-archetype-plugin:2.4:generate (default-cli)< generate-sources @ standalone-pom <<<
[INFO]
[INFO]--- maven-archetype-plugin:2.4:generate (default-cli)@ standalone-pom ---
[INFO]Generating project inInteractive mode
[INFO]No archetype defined.Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: internal -> org.apache.maven.archetypes:maven-archetype-archetype (An archetype which contains a sample archetype.)
2: internal -> org.apache.maven.archetypes:maven-archetype-j2ee-simple (An archetype which contains a simplifed sample J2EE application.)
3: internal -> org.apache.maven.archetypes:maven-archetype-plugin (An archetype which contains a sample Maven plugin.)
4: internal -> org.apache.maven.archetypes:maven-archetype-plugin-site (An archetype which contains a sample Maven plugin site.
This archetype can be layered upon an existing Maven plugin project.)
5: internal -> org.apache.maven.archetypes:maven-archetype-portlet (An archetype which contains a sample JSR-268Portlet.)
6: internal -> org.apache.maven.archetypes:maven-archetype-profiles ()
7: internal -> org.apache.maven.archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)
8: internal -> org.apache.maven.archetypes:maven-archetype-site (An archetype which contains a sample Maven site which demonstrates
some of the supported document types like APT,XDoc, and FML and demonstrates how
to i18n your site.This archetype can be layered upon an existing Maven project.)
9: internal -> org.apache.maven.archetypes:maven-archetype-site-simple (An archetype which contains a sample Maven site.)
10: internal -> org.apache.maven.archetypes:maven-archetype-webapp (An archetype which contains a sample MavenWebapp project.)
Choose a number or apply filter (format:[groupId:]artifactId,case sensitive contains):7: //使用第7个模板创建maven项目,默认,回车
[INFO]Using property: groupId = com.sohu.train
[INFO]Using property: artifactId = maven-02
[INFO]Using property: version =1.0-SNAPSHOT
[INFO]Using property: package = com.sohu.train
Confirm properties configuration:
groupId: com.sohu.train
artifactId: maven-02
version:1.0-SNAPSHOT
package: com.sohu.train
Y:: Y //确认
[INFO]----------------------------------------------------------------------------
[INFO]Using following parameters for creating project from Old(1.x)Archetype: maven-archetype-quickstart:1.1
[INFO]----------------------------------------------------------------------------
[INFO]Parameter: groupId,Value: com.sohu.train
[INFO]Parameter: packageName,Value: com.sohu.train
[INFO]Parameter: package,Value: com.sohu.train
[INFO]Parameter: artifactId,Value: maven-02
[INFO]Parameter: basedir,Value: F:\mavenDemo\train
[INFO]Parameter: version,Value:1.0-SNAPSHOT
[INFO] project created from Old(1.x)Archetypein dir: F:\mavenDemo\train\maven-02
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS //创建成功
[INFO]------------------------------------------------------------------------
[INFO]Total time:33.704 s
[INFO]Finished at:2016-05-13T13:02:49+08:00
[INFO]FinalMemory:13M/154M
[INFO]------------------------------------------------------------------------
查看maven项目结构:
F:\mavenDemo\train>TREE
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
├─maven-01
│└─src
│├─main
││└─java
││└─com
││└─sohu
││└─train
│└─test
│└─java
│└─com
│└─sohu
│└─train
└─maven-02 //发现多了一个maven项目
└─src
├─main
│└─java
│└─com
│└─sohu
│└─train
└─test
└─java
└─com
└─sohu
└─train
6.maven常用命令
mvn archetype:generate //构建项目
mvn clean //项目清理,删除target(编译好的字节码文件和测试报告)
mvn compile //项目源代码的编译
mvn test //项目单元测试的编译
mvn package //项目打包
- mvn install //将jar包安装到本地仓库
注意:在使用mvn命令时(除构建命令外)需要进入maven项目的根目录下.
F:\mavenDemo\train\maven-01>tree /f //查看当前目录下的项目结构
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
│ pom.xml
│
└─src
├─main
│└─java
│└─com
│└─sohu
│└─train
│App.java //源文件
│
└─test
└─java
└─com
└─sohu
└─train
AppTest.java //单元测试文件
项目源代码编译:mvn compile
F:\mavenDemo\train\maven-01>mvn compile
[INFO]Scanningfor projects...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO]Building maven-011.0-SNAPSHOT
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]--- maven-resources-plugin:2.6:resources (default-resources)@ maven-01---
...
[INFO]Changes detected - recompiling the module!
[INFO]Compiling1 source file to F:\mavenDemo\train\maven-01\target\classes //完成了对一个源文件的编译,编译好的文件所在的目录
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO]Total time:13.545 s
[INFO]Finished at:2016-05-13T13:27:11+08:00
[INFO]FinalMemory:12M/124M
[INFO]------------------------------------------------------------------------
F:\mavenDemo\train\maven-01>tree /f
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
│ pom.xml
│
├─src
│├─main
││└─java
││└─com
││└─sohu
││└─train
││App.java
││
│└─test
│└─java
│└─com
│└─sohu
│└─train
│AppTest.java
│
└─target //发现多个一个target文件夹...//target [‘tɑ?g?t]:目标
├─classes
│└─com
│└─sohu
│└─train
│App.class //对源代码文件(App.java)编译后的文件
│
└─maven-status
└─maven-compiler-plugin //使用到的maven插件
└─compile
└─default-compile
createdFiles.lst
inputFiles.lst
项目清理:mvn clean
F:\mavenDemo\train\maven-01>mvn clean //对之前编译过的文件进行清除
[INFO]Scanningfor projects...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO]Building maven-011.0-SNAPSHOT
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]--- maven-clean-plugin:2.5:clean (default-clean)@ maven-01---
[INFO]Deleting F:\mavenDemo\train\maven-01\target
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO]Total time:0.441 s
[INFO]Finished at:2016-05-13T13:36:47+08:00
[INFO]FinalMemory:6M/121M
[INFO]------------------------------------------------------------------------
F:\mavenDemo\train\maven-01>tree /f //target文件夹已经被清除
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
│ pom.xml
│
└─src
├─main
│└─java
│└─com
│└─sohu
│└─train
│App.java
│
└─test
└─java
└─com
└─sohu
└─train
AppTest.java
项目单元测试:mvn test
F:\mavenDemo\train\maven-01>mvn test
[INFO]Scanningfor projects...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO]Building maven-011.0-SNAPSHOT
[INFO]------------------------------------------------------------------------
...
[INFO]
[INFO]--- maven-resources-plugin:2.6:resources (default-resources)@ maven-01---
[INFO]Using‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\mavenDemo\train\maven-01\src\main\resources
[INFO]
[INFO]--- maven-compiler-plugin:3.1:compile (default-compile)@ maven-01---
[INFO]Changes detected - recompiling the module!
[INFO]Compiling1 source file to F:\mavenDemo\train\maven-01\target\classes
[INFO]
[INFO]--- maven-resources-plugin:2.6:testResources (default-testResources)@ maven-01---
[INFO]Using‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\mavenDemo\train\maven-01\src\test\resources
[INFO]
[INFO]--- maven-compiler-plugin:3.1:testCompile (default-testCompile)@ maven-01---
[INFO]Changes detected - recompiling the module!
[INFO]Compiling1 source file to F:\mavenDemo\train\maven-01\target\test-classes
[INFO]
[INFO]--- maven-surefire-plugin:2.12.4:test (default-test)@ maven-01---
...
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.sohu.train.AppTest
Tests run:1,Failures:0,Errors:0,Skipped:0,Time elapsed:0.007 sec
Results:
Tests run:1,Failures:0,Errors:0,Skipped:0
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO]Total time:20.556 s
[INFO]Finished at:2016-05-13T13:41:16+08:00
[INFO]FinalMemory:15M/160M
[INFO]------------------------------------------------------------------------
F:\mavenDemo\train\maven-01>tree /f
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
│ pom.xml
│
├─src
│├─main
││└─java
││└─com
││└─sohu
││└─train
││App.java
││
│└─test
│└─java
│└─com
│└─sohu
│└─train
│AppTest.java
│
└─target //生成一个target目录,并未执行 mvn compile 命令
├─classes
│└─com
│└─sohu
│└─train
│App.class
│
├─maven-status
│└─maven-compiler-plugin //用到的插件
│├─compile
││└─default-compile
││ createdFiles.lst
││ inputFiles.lst
││
│└─testCompile
│└─default-testCompile
│ createdFiles.lst
│ inputFiles.lst
│
├─surefire-reports //单元测试生成的报告
│ com.sohu.train.AppTest.txt
│ TEST-com.sohu.train.AppTest.xml
│
└─test-classes //完成单元测试的编译,即编译AppTest.java文件
└─com
└─sohu
└─train
AppTest.class
记得清理:mvn clean
查看 :tree /f
对项目的打包:mvn package
F:\mavenDemo\train\maven-01>mvn package
[INFO]Scanningfor projects...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO]Building maven-011.0-SNAPSHOT
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]--- maven-resources-plugin:2.6:resources (default-resources)@ maven-01---
[INFO]Using‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\mavenDemo\train\maven-01\src\main\resources
[INFO]
[INFO]--- maven-compiler-plugin:3.1:compile (default-compile)@ maven-01---
[INFO]Changes detected - recompiling the module!
[INFO]Compiling1 source file to F:\mavenDemo\train\maven-01\target\classes
[INFO]
[INFO]--- maven-resources-plugin:2.6:testResources (default-testResources)@ maven-01---
[INFO]Using‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\mavenDemo\train\maven-01\src\test\resources
[INFO]
[INFO]--- maven-compiler-plugin:3.1:testCompile (default-testCompile)@ maven-01---
[INFO]Changes detected - recompiling the module!
[INFO]Compiling1 source file to F:\mavenDemo\train\maven-01\target\test-classes
[INFO]
[INFO]--- maven-surefire-plugin:2.12.4:test (default-test)@ maven-01---
[INFO]Surefire report directory: F:\mavenDemo\train\maven-01\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.sohu.train.AppTest
Tests run:1,Failures:0,Errors:0,Skipped:0,Time elapsed:0.007 sec
Results:
Tests run:1,Failures:0,Errors:0,Skipped:0
[INFO]
[INFO]--- maven-jar-plugin:2.4:jar (default-jar)@ maven-01---
Downloading: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
Downloaded: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar(37 KB at 17.7 KB/sec)
[INFO]Building jar: F:\mavenDemo\train\maven-01\target\maven-01-1.0-SNAPSHOT.jar
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO]Total time:5.625 s
[INFO]Finished at:2016-05-13T13:52:43+08:00
[INFO]FinalMemory:19M/225M
[INFO]------------------------------------------------------------------------
F:\mavenDemo\train\maven-01>tree /f
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
│ pom.xml
│
├─src
│├─main
││└─java
││└─com
││└─sohu
││└─train
││App.java
││
│└─test
│└─java
│└─com
│└─sohu
│└─train
│AppTest.java
│
└─target
│ maven-01-1.0-SNAPSHOT.jar //生成jar包.;创建maven项目的时候约定的一个规则,maven-01是定义好的项目名称,1.0-SNAPSHOT是定义好的版本号;
│
├─classes
│└─com
│└─sohu
│└─train
│App.class
│
├─maven-archiver
│ pom.properties
│
├─maven-status
│└─maven-compiler-plugin
│├─compile
││└─default-compile
││ createdFiles.lst
││ inputFiles.lst
││
│└─testCompile
│└─default-testCompile
│ createdFiles.lst
│ inputFiles.lst
│
├─surefire-reports
│ com.sohu.train.AppTest.txt
│ TEST-com.sohu.train.AppTest.xml
│
└─test-classes
└─com
└─sohu
└─train
AppTest.class
安装jar包到本地仓库:mvn install
F:\mavenDemo\train\maven-01>tree /f
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
│.classpath
│.project
│ pom.xml
│
├─.settings
│ org.eclipse.core.resources.prefs
│ org.eclipse.jdt.core.prefs
│ org.eclipse.m2e.core.prefs
│
└─src
├─main
│└─java
│└─com
│└─sohu
│└─train
│App.java
│
└─test
└─java
└─com
└─sohu
└─train
AppTest.java
F:\mavenDemo\train\maven-01>mvn install
[INFO]Scanningfor projects...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO]Building maven-011.0-SNAPSHOT
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]--- maven-resources-plugin:2.6:resources (default-resources)@ maven-01---
[INFO]Using‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\mavenDemo\train\maven-01\src\main\resources
[INFO]
[INFO]--- maven-compiler-plugin:3.1:compile (default-compile)@ maven-01---
[INFO]Changes detected - recompiling the module!
[INFO]Compiling1 source file to F:\mavenDemo\train\maven-01\target\classes
[INFO]
[INFO]--- maven-resources-plugin:2.6:testResources (default-testResources)@ maven-01---
[INFO]Using‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\mavenDemo\train\maven-01\src\test\resources
[INFO]
[INFO]--- maven-compiler-plugin:3.1:testCompile (default-testCompile)@ maven-01---
[INFO]Changes detected - recompiling the module!
[INFO]Compiling1 source file to F:\mavenDemo\train\maven-01\target\test-classes
[INFO]
[INFO]--- maven-surefire-plugin:2.12.4:test (default-test)@ maven-01---
[INFO]Surefire report directory: F:\mavenDemo\train\maven-01\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.sohu.train.AppTest
Tests run:1,Failures:0,Errors:0,Skipped:0,Time elapsed:0.011 sec
Results:
Tests run:1,Failures:0,Errors:0,Skipped:0
[INFO]
[INFO]--- maven-jar-plugin:2.4:jar (default-jar)@ maven-01---
[INFO]Building jar: F:\mavenDemo\train\maven-01\target\maven-01-1.0-SNAPSHOT.jar
[INFO]
[INFO]--- maven-install-plugin:2.4:install (default-install)@ maven-01---
[INFO]Installing F:\mavenDemo\train\maven-01\target\maven-01-1.0-SNAPSHOT.jar to E:\mavenRepository\com\sohu\train\maven-01\1.0-SNAPSHOT\maven-01-1.0-SNAPSHOT.jar //
安装jar包到本地仓库[INFO]Installing F:\mavenDemo\train\maven-01\pom.xml to E:\mavenRepository\com\sohu\train\maven-01\1.0-SNAPSHOT\maven-01-1.0-SNAPSHOT.pom
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO]Total time:3.429 s
[INFO]Finished at:2016-05-13T23:07:51+08:00
[INFO]FinalMemory:14M/225M
[INFO]------------------------------------------------------------------------
F:\mavenDemo\train\maven-01>tree /f
卷Spark的文件夹 PATH 列表
卷序列号为0007-FD09
F:.
│.classpath
│.project
│ pom.xml
│
├─.settings
│ org.eclipse.core.resources.prefs
│ org.eclipse.jdt.core.prefs
│ org.eclipse.m2e.core.prefs
│
├─src
│├─main
││└─java
││└─com
││└─sohu
││└─train
││App.java
││
│└─test
│└─java
│└─com
│└─sohu
│└─train
│AppTest.java
│
└─target
│ maven-01-1.0-SNAPSHOT.jar
│
├─classes
│└─com
│└─sohu
│└─train
│App.class
│
├─maven-archiver
│ pom.properties
│
├─maven-status
│└─maven-compiler-plugin
│├─compile
││└─default-compile
││ createdFiles.lst
││ inputFiles.lst
││
│└─testCompile
│└─default-testCompile
│ createdFiles.lst
│ inputFiles.lst
│
├─surefire-reports
│ com.sohu.train.AppTest.txt
│ TEST-com.sohu.train.AppTest.xml
│
└─test-classes
└─com
└─sohu
└─train
AppTest.class