b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

java版本 maven常用命令介绍(4)

电脑杂谈  发布时间:2017-12-19 04:02:28  来源:网络整理

编译插件的配置

repository目录的作用

repository的位置,在用户目录的.m2目录下。

repository目录的作用,对依赖类库的缓存。

项目打包

mvn package

启动tomcat

mvn tomcat:run

启动jetty

mvn jetty:run

转化为eclipse项目

mvn -Dwtpversion=1.5 eclipse:eclipse

这样生成wtp插件的web项目。

打开eclipse,菜单选择:file>import>general>existing projects into workspace,在对话框中选中目录,导入即可。

另外,需要在eclipse里创建一个classpath变量,名称为:M2_REPO,值为系统用户下.m2/repository目录。

Project Object Model,项目对象模型。

通过xml格式保存的pom.xml文件。

作用类似ant的build.xml文件,功能更强大。

该文件用于管理:源代码、配置文件、开发者的信息和角色、问题追踪系统、组织信息、项目授权、项目的url、项目的依赖关系等等。

一个完整的pom.xml文件,放置在项目的根目录下。

<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <!-- The Basics -->
  <groupId>...</groupId>
  <artifactId>...</artifactId>
  <version>...</version>
  <packaging>...</packaging>
  <dependencies>...</dependencies>
  <parent>...</parent>
  <dependencyManagement>...</dependencyManagement>
  <modules>...</modules>
  <properties>...</properties>

  <!-- Build Settings -->
  <build>...</build>
  <reporting>...</reporting>

  <!-- More Project Information -->
  <name>...</name>
  <description>...</description>
  <url>...</url>
  <inceptionYear>...</inceptionYear>
  <licenses>...</licenses>
  <organization>...</organization>
  <developers>...</developers>
  <contributors>...</contributors>

  <!-- Environment Settings -->
  <issueManagement>...</issueManagement>
  <ciManagement>...</ciManagement>
  <mailingLists>...</mailingLists>
  <scm>...</scm>
  <prerequisites>...</prerequisites>
  <repositories>...</repositories>
  <pluginRepositories>...</pluginRepositories>
  <distributionManagement>...</distributionManagement>
  <profiles>...</profiles>
</project>


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/sanxing/article-54380-4.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...