mabrarov commented on a change in pull request #19:
URL: https://github.com/apache/maven-ear-plugin/pull/19#discussion_r501128701
##########
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##########
@@ -946,4 +946,31 @@ private void deleteOutdatedResources( final
Collection<String> outdatedResources
}
}
}
+
+ /**
+ * Searches JAR module in the list of classpath elements.
+ *
+ * @param classPathElements classpath elements to search among.
+ * @param module module to find among classpath elements defined by {@code
classPathElements}
+ * @return -1 if {@code module} was not found in {@code classPathElements}
or index of item of
+ * {@code classPathElements} which matches {@code module}
+ */
+ private int findModuleInClassPathElements( final List<String>
classPathElements, final JarModule module )
+ {
+ if ( classPathElements.isEmpty() )
+ {
+ return -1;
+ }
+ int moduleClassPathIndex = classPathElements.indexOf(
module.getBundleFileName() );
+ if ( moduleClassPathIndex != -1 )
+ {
+ return moduleClassPathIndex;
+ }
+ return classPathElements.indexOf( getArtifactFileName( module ) );
+ }
+
+ private String getArtifactFileName( final EarModule module )
Review comment:
Inlined in 97bd177
##########
File path: src/main/java/org/apache/maven/plugins/ear/EarMojo.java
##########
@@ -946,4 +946,31 @@ private void deleteOutdatedResources( final
Collection<String> outdatedResources
}
}
}
+
+ /**
+ * Searches JAR module in the list of classpath elements.
+ *
+ * @param classPathElements classpath elements to search among.
Review comment:
Removed period 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]