santik commented on a change in pull request #9:
URL: https://github.com/apache/maven-ear-plugin/pull/9#discussion_r494092160



##########
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##########
@@ -289,12 +296,25 @@ public void execute()
         final File earFile;
         final MavenArchiver archiver;
         final Date reproducibleLastModifiedDate;
+        File ddFile = new File( getWorkDirectory(), APPLICATION_XML_URI );
         try
         {
             earFile = getEarFile( outputDirectory, finalName, classifier );
             archiver = new EarMavenArchiver( getModules() );
-            getLog().debug( "Jar archiver implementation [" + 
jarArchiver.getClass().getName() + "]" );
-            archiver.setArchiver( jarArchiver );
+            JarArchiver theArchiver;
+            if ( ddFile.exists() )
+            {
+                final EarArchiver earArchiver = getEarArchiver();
+                earArchiver.setAppxml( ddFile );
+                theArchiver = earArchiver;
+            }
+            else
+            {
+                theArchiver = getJarArchiver();

Review comment:
       file is not required for the jar archiver, but required for ear




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to