You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2024/02/11 13:49:46 UTC
(maven-assembly-plugin) branch MASSEMBLY-1018 created (now 41eb755a)
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a change to branch MASSEMBLY-1018
in repository https://gitbox.apache.org/repos/asf/maven-assembly-plugin.git
at 41eb755a [MASSEMBLY-1018] Fix examples about useStrictFiltering
This branch includes the following new commits:
new 41eb755a [MASSEMBLY-1018] Fix examples about useStrictFiltering
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-assembly-plugin) 01/01: [MASSEMBLY-1018] Fix examples about useStrictFiltering
Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch MASSEMBLY-1018
in repository https://gitbox.apache.org/repos/asf/maven-assembly-plugin.git
commit 41eb755a12b7752958639c91a66b74086df9e3f8
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sun Feb 11 14:49:31 2024 +0100
[MASSEMBLY-1018] Fix examples about useStrictFiltering
---
src/site/apt/advanced-descriptor-topics.apt.vm | 34 +++++++++++---------------
1 file changed, 14 insertions(+), 20 deletions(-)
diff --git a/src/site/apt/advanced-descriptor-topics.apt.vm b/src/site/apt/advanced-descriptor-topics.apt.vm
index 8eb25a25..8b096c00 100644
--- a/src/site/apt/advanced-descriptor-topics.apt.vm
+++ b/src/site/apt/advanced-descriptor-topics.apt.vm
@@ -229,7 +229,7 @@ Advanced Assembly-Descriptor Topics
[...]
<fileSets>
<fileSet>
- <directory>${project.basedir}</directory>
+ <directory>\${project.basedir}</directory>
<outputDirectory></outputDirectory>
<excludes>
<exclude>%regex[(?!.*src/).*target.*]</exclude>
@@ -252,44 +252,38 @@ Advanced Assembly-Descriptor Topics
At times, you want to build in a set of sanity checks when creating your
assembly, to ensure that what goes into the assembly artifact is what you
intended. One way you can do this is by enabling <<<useStrictFiltering>>> on
- your <<<dependencySets>>>, <<<moduleSets>>>, and <<<fileSets>>>.
+ your <<<dependencySets>>>.
<<<useStrictFiltering>>> is a flag that tells the assembly plugin to track
each include/exclude pattern to make sure it's used during creation of the
assembly. This way, if the assembly-descriptor author intended for a particular
- file or artifact to be present, he can add an include/exclude pattern to the
- descriptor to ensure that file/artifact is present, and then set the
+ artifact to be present, he can add an include/exclude pattern to the
+ descriptor to ensure that artifact is present, and then set the
<<<useStrictFiltering>>> flag. If the pattern isn't used to match at least one
- file during assembly creation, the build will fail and the user will receive a
+ artifact during assembly creation, the build will fail and the user will receive a
message notifying him of the unused patterns.
-** Example: Ensuring the LICENSE.txt file is included in a jar
-
- In this example, we want to make sure that our project jar contains the
- project's open source license language, in order to be compliant with our
- software foundation's policies.
+** Example:
+---
<assembly xmlns="http://maven.apache.org/ASSEMBLY/${mdoVersion}"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/${mdoVersion} http://maven.apache.org/xsd/assembly-${mdoVersion}.xsd">
[...]
- <fileSets>
- <fileSet>
- <useStrictFiltering>true</useStrictFiltering>
- <outputDirectory>META-INF</outputDirectory>
+ <dependencySets>
+ <dependencySet>
<includes>
- <include>LICENSE.txt</include>
+ <include>commons-logging:commons-logging</include>
</includes>
- </fileSet>
- [...]
- </fileSets>
+ <useStrictFiltering>true</useStrictFiltering>
+ </dependencySet>
+ </dependencySets>
[...]
</assembly>
+---
- If a developer inadvertently removes the LICENSE.txt from the project
- directory, the assembly plugin should refuse to build this assembly.
+ If <<commons-logging>> artifact will not present on the project dependencies list,
+ the assembly plugin should refuse to build this assembly.
* Using an Alternative Assembly Base Directory