Naveen kumar
Naveen kumar

Reputation: 41

How can we get project version from pom.xml in assembly plugin

How can we get project version from pom.xml in assembly plugin, as {version} and {project.version} seem not working in assembly-plugin xml

<id>zip</id>
<includeBaseDirectory>true</includeBaseDirectory>

<formats>
    <format>zip</format>
</formats>  
<fileSets>
    <fileSet>
        <directory>${project.basedir}/src/root/config</directory>
        <outputDirectory>{version}/config</outputDirectory>
    </fileSet>
    <fileSet>
        <directory>${project.basedir}/common/lib</directory>
        <outputDirectory>{version}/bin/JAVA</outputDirectory>
    </fileSet>
</fileSets>

Upvotes: 2

Views: 911

Answers (1)

Naveen kumar
Naveen kumar

Reputation: 41

${project.version} worked, was missing $

Upvotes: 1

Related Questions