Maven原型骨架及常见问题
1
2
|
org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Unable to find resource 'archetype-resources/__rootArtifactId__-aggregator/../__rootArtifactId__-common/pom.xml' |
1
2
3
|
< modules > < module >xyz-aggregator</ module > </ modules > |
1
2
3
4
|
< modules > < module >../xyz-common</ module > < module >../xyz-web</ module > </ modules > |
└── generated-sources
└── archetype
├── pom.xml
└── src
└── main
└── resources
├── archetype-resources
│ ├── __rootArtifactId__-aggregator
│ │ └── pom.xml
│ ├── __rootArtifactId__-common
│ │ ├── pom.xml
│ │ └── src
│ ├── __rootArtifactId__-web
│ │ ├── pom.xml
│ │ └── src
│ ├── pom.xml
│ └── quick-start.bat
└── META-INF
└── maven
├── archetype.xml
└── archetype-metadata.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
<? xml version = "1.0" encoding = "UTF-8" ?>< archetype-descriptor name = "basic" > < fileSets > < fileSet filtered = "true" encoding = "UTF-8" > < directory ></ directory > < includes > < include >README.txt</ include > </ includes > </ fileSet > < fileSet filtered = "true" encoding = "UTF-8" > < directory ></ directory > < includes > < include >quick-start.bat</ include > </ includes > </ fileSet > < fileSet filtered = "true" packaged = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-common/src/main/java</ directory > < includes > < include >**/*.java</ include > </ includes > </ fileSet > < fileSet packaged = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-common/src/main/java</ directory > < includes > < include >**/*.wsdl</ include > </ includes > </ fileSet > < fileSet filtered = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-common/src/main/resources</ directory > < includes > < include >**/*.xml</ include > </ includes > </ fileSet > < fileSet encoding = "UTF-8" > < directory >__rootArtifactId__-common/src/META-INF</ directory > < includes > < include >**/*.MF</ include > </ includes > </ fileSet > < fileSet filtered = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-common</ directory > < includes > < include >pom.xml</ include > </ includes > </ fileSet > < fileSet filtered = "true" packaged = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-web/src/main/java</ directory > < includes > < include >**/*.java</ include > </ includes > </ fileSet > < fileSet filtered = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-web/src/main/webapp</ directory > < includes > < include >**/*.vm</ include > < include >**/*.xml</ include > < include >**/*.txt</ include > </ includes > </ fileSet > < fileSet filtered = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-web/src/main/resources</ directory > < includes > < include >**/*.xml</ include > < include >**/*.properties</ include > </ includes > </ fileSet > < fileSet encoding = "UTF-8" > < directory >__rootArtifactId__-web/src/main/webapp</ directory > < includes > < include >**/*.jpg</ include > < include >**/*.db</ include > < include >**/*.MF</ include > < include >**/*.png</ include > < include >**/*.js</ include > < include >**/*.htm</ include > < include >**/*.gif</ include > < include >**/*.css</ include > </ includes > </ fileSet > < fileSet filtered = "true" encoding = "UTF-8" > < directory >__rootArtifactId__-web</ directory > < includes > < include >pom.xml</ include > </ includes > </ fileSet > </ fileSets > < modules > < module id = "${rootArtifactId}-aggregator" dir = "__rootArtifactId__-aggregator" name = "${rootArtifactId}-aggregator" > < fileSets > </ fileSets > </ module > </ modules > </ archetype-descriptor > |
1
2
3
|
< fileSet filtered = "true" packaged = "false" encoding = "UTF-8" > < directory >__rootArtifactId__-web/src/main/java/__packageInPathFormat__/foo</ directory > </ fileSet > |
1
2
3
4
5
6
7
|
< servers > < server > < id >my-snapshot</ id > < username >admin</ username > < password >admin123</ password > </ server > </ servers > |
1
2
3
4
|
mvn deploy:deploy-file \ -DgroupId=com.xyz -DartifactId=xyz-archetype -Dversion=1.0-SNAPSHOT \ -Dpackaging=maven-archetype -Dfile=xyz-archetype-1.0-SNAPSHOT.jar \ -DrepositoryId=my-snapshot -Durl=http://127.0.0.1:8989/nexus/content/repositories/snapshots/ |
1
2
3
4
5
6
|
< repository > < snapshots /> < id >my-snapshot</ id > < name >my-snapshot</ name > </ repository > |
1
2
3
4
|
mvn archetype:generate -B \ -DarchetypeCatalog=remote -DarchetypeRepository=my-snapshot \ -DarchetypeGroupId=com.xyz -DarchetypeArtifactId=xyz-archetype -DarchetypeVersion=1.0-SNAPSHOT \ -DgroupId=com.abc -DartifactId=abc |
Maven原型骨架及常见问题的更多相关文章
- idea中配置maven的骨架本地下载方式
由于我们使用maven的骨架创建的时候,maven需要联网进行骨架的下载,如果断网了,则骨架不能正常下载,为了防止这种情况,我们可以配置本地下载,当已经联网下载过一次后,以后每次进行下载都会从本地下载 ...
- maven自定义骨架
Maven 的 archetype 技术,为新建标准化的工程框架提供了方便.为自定义一套工程框架标准,可参考以下步骤操作: 1,创建一个项目的原型 2,在项目根目录执行命令:mvn archetype ...
- 【Maven实战技巧】「插件使用专题」Maven-Archetype插件创建自定义maven项目骨架
技术推荐 自定义Archetype Maven骨架/以当前项目为模板创建maven骨架,可以参考http://maven.apache.org/archetype/maven-archetype-pl ...
- Intellj新增maven项目骨架
我们经常用maven骨架构建项目,本来普通的几个archetype就够用的,但是近来要来时开发liferay项目 相关的项目骨架Intellj IDEA就没有内置,所以就想添加进去, 有两个办法可以 ...
- 定制Maven原型生成项目
1自定义原型 1.1创建原型项目 要定制自己的原型,首先就要创建原型项目来进行定制: mvnarchetype:create -DgroupId=com.cdai.arche -DartifactId ...
- Maven - 实例-3-自动创建Maven目录骨架
archetype插件用于创建符合maven规定的目录骨架 方式一:根据提示设置相关参数 guowli@5CG450158J MINGW64 /d/Anliven-Running/Zen/Eclips ...
- Maven项目骨架搭建
1. 如何使用Maven的archetype快速生成一个新项目 2. Maven之自定义archetype生成项目骨架(一) 3. 使用maven3 创建自定义的archetype 4. 使用mave ...
- 创建Maven项目骨架并使用
1.archetype是什么? archetype 字面意思是 原型.可以理解为archetype相当于一个脚手架/模板,通过这个脚手架/模板我们可以快速的创建出一个项目. 比如下图中的这些就是mav ...
- MAVEN 自定义骨架
1)根据原由的骨架先创建出一个骨架模板,例如创建一个web框架可以先通过命令 mvn archetype:generate -DarchetypeCatalog=internal 创建出一个web的 ...
随机推荐
- AtCoder Beginner Contest 071 D - Coloring Dominoes
Problem Statement We have a board with a 2×N grid. Snuke covered the board with N dominoes without o ...
- poj1753 高斯消元
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37055 Accepted: 16125 Descr ...
- [bzoj4824][Cqoi2017]老C的键盘
来自FallDream的博客,未经允许,请勿转载,谢谢. 老 C 是个程序员. 作为一个优秀的程序员,老 C 拥有一个别具一格的键盘,据说这样可以大幅提升写程序的速度,还能让写出来的程序在某种 ...
- [Project] Simulate HTTP Post Request to obtain data from Web Page by using Python Scrapy Framework
1. Background Though it's always difficult to give child a perfect name, parent never give up trying ...
- kafka快速入门
一.kafka简介 kafka,ActiveMQ,RabbitMQ是当今最流行的分布式消息中间件,其中kafka在性能及吞吐量方面是三者中的佼佼者,不过最近查阅官网时,官方与它的定义为一个分布式流媒体 ...
- C语言设计第一次作业
1 (1)题目:求圆面积和周长 (2)流程图: (3)测试数据及运行结果: (4)实验分析:暂时没问题. 2 (1)题目:输入一个四位年份,判断其是否是闰年.闰年的判别条件是该年年份能被4整除但不能被 ...
- .net如何引用System.Drawing.Drawing2D 命名空间和System.Drawing.Image及其相关概念
其实这个很简单,直接在引用那里单击右键选择添加框架,然后找到System.Drawing就OK了, 其实并没有网上所说的那样需要下载什么Drawing.BLL. 首先Syetem.Drawing.Dr ...
- SQL Server数据库账号密码变更后导致vCenter Server无法访问数据库
SQL Server数据库账号密码变更后导致vCenter Server无法访问数据库 1.1状况描述: 若SQL Server数据库的账号(这里以sa为例)密码发生了变更,那么连接数据的客户端vCe ...
- Python小代码_14_交换 2 个变量的 3 种方式
a = 4 b = 5 #第一种 c = a a = b b = c print(a, b) #输出结果 #5 4 #第二种 a = a + b b = a - b a = a - b print(a ...
- 小知识点 取消button动作 和取巧按钮高亮
如果让按钮在点击时不变暗 进行下面设置: 如果使butten失去动画效果进行下面设置:(一般用于图片+文字,效果等于可以加图片班的label,当然label不能加图片)