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



##########
File path: 
src/test/java/org/apache/maven/plugins/ear/it/AbstractEarPluginIT.java
##########
@@ -119,61 +128,72 @@ protected File executeMojo( final String projectName, 
final Properties propertie
     protected File executeMojo( final String projectName, final Properties 
properties )
         throws VerificationException, IOException
     {
-        return executeMojo( projectName, properties, true );
+        return executeMojo( projectName, properties, true, true );
     }
 
     /**
-     * Executes the specified projects and asserts the given artifacts. Assert 
the deployment descriptors are valid
-     * 
+     * Executes the specified projects and asserts the given artifacts. 
Asserts the deployment descriptors are valid.
+     * Asserts Class-Path entry of manifest of EAR modules.
+     *
      * @param projectName the project to test
+     * @param earModuleName the name of 1st level EAR module in multi-module 
project or null if project is single-module
      * @param expectedArtifacts the list of artifacts to be found in the EAR 
archive
      * @param artifactsDirectory whether the artifact is an exploded 
artifactsDirectory or not
+     * @param moduleArtifacts the list of artifacts representing EAR modules 
which manifest needs to be asserted or
+     *                        {@code null} if there is no need to validate 
Class-Path entry of EAR modules manifests
+     * @param moduleArtifactsDirectory whether the artifact from {@code 
moduleArtifacts} list is an exploded or not.
+     *                                 Can be {@code null} if {@code 
moduleArtifacts} is {@code null}
+     * @param expectedClassPathElements the list of elements of Class-Path 
entry of manifest. Rows should match
+     *                                  modules passed in {@code 
moduleArtifacts} parameter. Can be {@code null} if
+     *                                  {@code moduleArtifacts} is {@code null}
+     * @param cleanBeforeExecute call clean plugin before execution
      * @return the base directory of the project
      */
-    protected File doTestProject( final String projectName, final String[] 
expectedArtifacts,
-                                  final boolean[] artifactsDirectory )
+    protected File doTestProject( final String projectName, final String 
earModuleName,
+                                  final String[] expectedArtifacts, boolean[] 
artifactsDirectory,
+                                  final String[] moduleArtifacts, boolean[] 
moduleArtifactsDirectory,
+                                  final String[][] expectedClassPathElements,
+                                  final boolean cleanBeforeExecute )
         throws VerificationException, IOException
     {
-        final File baseDir = executeMojo( projectName, new Properties() );
-        assertEarArchive( baseDir, projectName );
-        assertEarDirectory( baseDir, projectName );
-        
-        assertArchiveContent( baseDir, projectName, expectedArtifacts, 
artifactsDirectory );
-        
-        assertDeploymentDescriptors( baseDir, projectName );
-        
-        return baseDir;
+        final File baseDir = executeMojo( projectName, new Properties(), true, 
cleanBeforeExecute );
+
+        final File earModuleDir = getEarModuleDirectory( baseDir, 
earModuleName );
+        assertEarArchive( earModuleDir, projectName );
+        assertEarDirectory( earModuleDir, projectName );
+        assertArchiveContent( earModuleDir, projectName, expectedArtifacts, 
artifactsDirectory );
+        assertDeploymentDescriptors( earModuleDir, projectName );
+        assertClassPathElements( earModuleDir, projectName, moduleArtifacts, 
moduleArtifactsDirectory, expectedClassPathElements );
 
+        return baseDir;
     }
 
     /**
-     * Executes the specified projects and asserts the given artifacts as 
artifacts (non directory)
-     * 
+     * Executes the specified projects and asserts the given artifacts. Assert 
the deployment descriptors are valid

Review comment:
       Added in 97bd177




----------------------------------------------------------------
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:
[email protected]


Reply via email to