elharo commented on code in PR #1350:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/1350#discussion_r3853054441


##########
src/main/java/org/apache/maven/plugins/assembly/filter/AbstractLineAggregatingHandler.java:
##########
@@ -65,11 +65,11 @@ OutputStream newAggregationOutputStream(final Path path) 
throws IOException {
 
     @Override
     public void finalizeArchiveCreation(final Archiver archiver) {
-        // this will prompt the isSelected() call, below, for all resources 
added to the archive.
-        // FIXME: This needs to be corrected in the AbstractArchiver, where
-        // runArchiveFinalizers() is called before regular resources are 
added...
-        // which is done because the manifest needs to be added first, and the
-        // manifest-creation component is a finalizer in the assembly plugin...
+        // The archiver runs its finalizers before it scans the resources that 
have
+        // been added so far (see AbstractArchiver.createArchive()), because 
the
+        // manifest has to be added first. Iterating the added resources up 
front
+        // applies the file selectors of every added resource collection, which

Review Comment:
   This is a really borked design. Iteration should be side effect free.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to