maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [maven-ear-plugin] mabrarov commented on a change in pull request #10: [MEAR-283] Reproducible builds with skinnyWars option
Date Mon, 07 Sep 2020 19:21:11 GMT

mabrarov commented on a change in pull request #10:
URL: https://github.com/apache/maven-ear-plugin/pull/10#discussion_r484548752



##########
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##########
@@ -284,7 +285,33 @@ public void execute()
         // Initializes ear modules
         super.execute();
 
+        final File earFile;
+        final MavenArchiver archiver;
+        final Date reproducibleLastModifiedDate;
+        try
+        {
+            earFile = getEarFile( outputDirectory, finalName, classifier );
+            archiver = new EarMavenArchiver( getModules() );
+            final JarArchiver theJarArchiver = getJarArchiver();
+            getLog().debug( "Jar archiver implementation [" + theJarArchiver.getClass().getName()
+ "]" );
+            archiver.setArchiver( theJarArchiver );
+            archiver.setOutputFile( earFile );
+
+            archiver.setCreatedBy( "Maven EAR Plugin", "org.apache.maven.plugins", "maven-ear-plugin"
);
+
+            // configure for Reproducible Builds based on outputTimestamp value
+            reproducibleLastModifiedDate = archiver.configureReproducible( outputTimestamp
);
+        }
+        catch ( Exception e )

Review comment:
       This is original code - refer to line 425 in changed file or to line 410 in original
file. We have to handle exceptions in the same way here to keep exception contract.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message