用maven创建jar工程:
mvn archetype:create -DgroupId=com.mycompany.app \
-DartifactId=my-app
创建war工程:
mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp
-DarchetypeArtifactId=maven-archetype-webapp
运行之后maven会给你创建helloworld。
创建eclipse工程:
mvn eclipse:eclipse
find dependency:
use http://mvnrepository.com/
to find correct groupId and artifactId.
dependency scope:
Dependency scope is used to limit the transitivity of a depedency,
and also to affect the classpath used for various build tasks.
There are 6 scopes available:
- compile
This is the default scope, used if none is specified. Compile
dependencies are available in all classpaths of a project. Furthermore,
those dependencies are propagated to dependent projects.
- provided
This is much like compile
, but
indicates you expect the JDK or a container to provide the dependency
at runtime. For example, when building a web application for the Java
Enterprise Edition, you would set the dependency on the Servlet API and
related Java EE APIs to scope provided
because the web
container provides those classes. This scope is only available on the
compilation and test classpath, and is not transitive.
- runtime
This scope indicates that the dependency is not required for
compilation, but is for execution. It is in the runtime and test
classpaths, but not the compile classpath.
- test
This scope indicates that the dependency is not required for normal use
of the application, and is only available for the test compilation and
execution phases.
- system
This scope is similar to provided
except that you have to provide the JAR which contains it explicitly.
The artifact is always available and is not looked up in a repository.
- import
(only available in Maven 2.0.9 or later)
This scope is only used on a dependency of type pom
in the <dependencyManagement>
section. It indicates that the specified POM should be replaced with the dependencies in that POM's <dependencyManagement>
section. Since they are replaced, dependencies with a scope of import
do not actually participate in limiting the transitivity of a dependency.
分享到:
相关推荐
Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令Maven 命令
maven命令详解 零起步简单的了解maven的使用
常用maven命令创建maven项目:mvn archetype:create指定 group: -DgroupId=packageName指定 artifac
maven仓库清理命令
Maven常用命令 Maven Maven学习
maven命令指南 windows系统下命令行运行
maven常用命令以及以个测试项目方便测试
只包含clean deploy、clean compile -U、clean package、clean clean、clean install
maven简介、maven安装使用、maven命令使用的详细说明(图文教程) maven简介、maven安装使用、maven命令使用的详细说明(图文教程) maven简介、maven安装使用、maven命令使用的详细说明(图文教程) maven简介、maven安装...
主要描述了maven的一些常用命令,以备您不时之需
如果在pom.xml更新不下来jar包可以试试这个方法,在pom.xml配置你要下的jar包,然后执行download.bat文件
mvn clean install compile -Dmaven.test.skip=true -fn mvn eclipse:clean mvn eclipse:eclipse mvn eclipse:myeclipse mvn clean install compile -Dmaven.test.skip=true -fn mvn install compile -Dmaven.test....
主要给大家介绍了关于调用maven命令的BAT脚本,文中给出了详细的示例代码,相信对大家的理解和学习会有一定的参考借鉴价值,有需要的朋友们可以参考借鉴,下面来一起看看吧。
主要是一些maven的常用命令
NULL 博文链接:https://mixo44.iteye.com/blog/1778853
maven常用的命令
XJar-Maven-Plugin是对的一个Maven插件封装,实现可通过Maven命令或绑定在Maven的生命周期之中执行,从而更加便捷的方式集成了 。 GitHub: : 什么是XJar XJar是基于对JAR包内部资源的加密以及扩展ClassLoader来...
jenkins实现maven项目自动部署到tomcat 实现自动部署,
主要介绍了IDEA 重新导入依赖maven 命令 reimport的相关知识,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下