我有一个原型项目,它在archetype-resources中有一个assembly.xml。这一切都很好,直到我不得不改变这个
<unpack>false</unpack>
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<dependencyset>
中的。
出于某种原因,clean install
会出错:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.1:integration-
test (default-integration-test) on project jetxyz:
[ERROR] Archetype IT 'basic' failed: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Encountered "?}." at line 15, column 110 of archetype-resources/assembly.xml
[ERROR] Was expecting one of:
[ERROR] "}" ...
[ERROR] <DOT> ...
当我在实际项目assembly.xml上使用相同的更改时,这很合适,仅在原型项目中提供问题。这很奇怪。我期待Maven根本不担心原型资源。
修改
outputFileNameMapping的默认值为${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}
。我所做的就是将version
更改为baseVersion
。 dependencySet