开发者

Variables not expanded in Maven plugin

In my maven plugin I have the following:

<dependencySets>
    <dependencySet>
            <scope>runtime</scope>
            <outputDirectory>/dir/${project.parent.artifactId}-${project.version}/${project.artifactId}/lib</outputDirectory>
    </dependencySet>
</dependencySets>

When mvn clean package开发者_如何学运维 is run, the outputDirectory is literally dir/${project.parent.artifactId}-${project.version}/... That is, the variables aren't being expanded. I am not getting any kind of variable not found message (nor should I). What could cause variables not to be expanded?


Can you check if the following works? Essentially, removing the project prefix from the variable names, since maven2 is not strict about this.

<outputDirectory>/dir/${parent.artifactId}-${version}/${artifactId}/lib</outputDirectory>

You may also want to check if you are using the last maven assembly plugin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜