You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Darío Cutillas (Jira)" <ji...@apache.org> on 2020/02/25 15:33:00 UTC

[jira] [Created] (MASSEMBLY-928) Allow declaring items within .

Darío Cutillas created MASSEMBLY-928:
----------------------------------------

             Summary: Allow declaring <file> items within <dependencySets>.
                 Key: MASSEMBLY-928
                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-928
             Project: Maven Assembly Plugin
          Issue Type: New Feature
          Components: dependencySet
            Reporter: Darío Cutillas


I'd like to be able to express copying of files within the {{<dependencySets>}} of an assembly descriptor.

Consider the following use-case:

A maven module {{A}} of a multi-module project has dependencies {{B}}, {{C}}.

A can use the maven-assembly-plugin to perform custom packaging of the dependencies {{B}} and {{C}} by means of the {{dependencySets}} element. For example, it could be creating a bundle with {{B}} and {{C}} unpacked in a folder matching the dependency artifactId by using the {{artifact.artifactId}} property (which is only available within the {{dependencySet}}).

But as part of the packaging, we want to be able to generate and filtered file, whose content depends on the dependency artifactId, for each of the included dependencies, with the filename matching the artifact name.

Today I only see two possibilities:

* The file needs to have been packed in the specific dependency. This is not good because the file might not make sense outside {{A}} or {{B}} and {{C}} could be dependencies that are not own by our multi-module.
* A separated assembly descriptor needs to be created and multiple executions have to be specified. This requires creating per-dependency {{<filter>}} files and does not scale well.

Instead I'd like to have the possibility of writing an assembly descriptor such as:

{code:xml}
<dependencySets>
  <dependencySet>
  ..
    <files>
      <file>
        <source>my-template</source>
        <destName>${artifact.artifactId}</destName>
        <filtering>true</filtering>
      </file>
    </files>
  ..
  </dependencySet>
</dependencySets>
{code}

And that filtering would expand also the {{<dependencySet>>}} specific properties such as {{${artifact.artifactId}}} in {{my-template}}.





--
This message was sent by Atlassian Jira
(v8.3.4#803005)