I have a pom
file with assembly
plugin which uses
<descriptor>src/main/assembly/dist.xml</descriptor>
Is there any way I can add the information in dist.xml
directly in the pom
file and have only one file for Maven?
This descriptor specifies the type of assembly archive to create, the contents of the assembly, and the ways in which dependencies or its modules are bundled with an assembly. <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
The Assembly Plugin for Maven enables developers to combine project output into a single distributable archive that also contains dependencies, modules, site documentation, and other files. Your project can easily build distribution "assemblies" using one of the prefabricated assembly descriptors.
Defines the rules for matching and working with files in a given base directory. Element.
The default location of assemblies. xml is in the project root directory.
It depends on what is present in dist.xml
. If your assembly can be built with predefined descriptors and the configurations provided by the goal is sufficient, then you do not need a separate descriptor
file.
The usage page of the maven assembly plugin has a few examples which show how it can be done.
First the descriptor is marked as deprecated you should use descriptors instead. And no there is no possibility to define the descriptor within the pom.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With