smalldoglele

Maven手动创建多模块项目


我要创建的项目名称是:unicorn,项目包含两个模块,分别是unicorn-core和unicorn-web。包的路径是com.goldpalm.tour。

  • 项目创建流程如下
    1.使用项目的命令创建unicorn项目后,删除src目录,在pom中调整packaging为pom
    mvn archetype:create -DartifactId=unicorn -DgroupId=com.goldpalm
    
    <packaging>pom</packaging>
    
    2.命令行下进入unicorn文件夹,创建unicorn-core项目。
    cd unicorn
    mvn archetype:create -DartifactId=unicorn-core -DgroupId=com.goldpalm.tour
    
    3.在unicorn目录下,创建项目unicorn-web
    mvn archetype:create -DartifactId=unicorn-web -DgroupId=com.goldpalm.tour -DarchetypeArtifactId=maven-archetype-webapp
    
    4.在eclipse中导入maven项目即可,如果需要web依赖core,可以再web中导入依赖。

分类:

技术点:

相关文章:

  • 2021-12-26
  • 2021-04-18
  • 2021-12-14
  • 2021-05-08
  • 2021-08-17
  • 2021-10-10
猜你喜欢
  • 2021-05-27
  • 2021-06-01
  • 2021-12-11
  • 2021-09-28
  • 2022-02-18
  • 2021-06-26
相关资源
相似解决方案