Is there a way to define placeholders in a Maven assembly descriptor?

I'm not a Maven expert, so sorry if this question is a little silly.

I am using 3 descriptors in my pom.xml. The file is filtered in each of these descriptors. I would like to use a placeholder to refer to the descriptor id from within the file.

For example, if this is one of my assembly descriptors:

<assembly>
    <id>descriptorNumberTwo</id>
    ...

    <file>
        <source>src/main/assembly/run.sh</source>
        <fileMode>0755</fileMode>
        <lineEnding>unix</lineEnding>
        <filtered>true</filtered>
    </file>
    ...
</assembly>

      

I want to use ${placeholder.for.my.id}

(or something) in my run.sh to get "descriptorNumberTwo". Is it possible?

Thanks in advance!

+3


source to share





All Articles