in src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java [388:421]
private File generateEjbClient() throws MojoExecutionException {
File clientJarFile = EjbHelper.getJarFile(outputDirectory, jarName, getClientClassifier());
getLog().info("Building EJB client " + clientJarFile.getPath());
MavenArchiver clientArchiver = new MavenArchiver();
clientArchiver.setArchiver(clientJarArchiver);
clientArchiver.setCreatedBy("Maven EJB Plugin", "org.apache.maven.plugins", "maven-ejb-plugin");
clientArchiver.setOutputFile(clientJarFile);
// configure for Reproducible Builds based on outputTimestamp value
clientArchiver.configureReproducible(outputTimestamp);
try {
List<String> defaultExcludes = DEFAULT_CLIENT_EXCLUDES_LIST;
List<String> defaultIncludes = DEFAULT_INCLUDES_LIST;
IncludesExcludes ie =
new IncludesExcludes(clientIncludes, clientExcludes, defaultIncludes, defaultExcludes);
clientArchiver.getArchiver().addDirectory(sourceDirectory, ie.resultingIncludes(), ie.resultingExcludes());
clientArchiver.createArchive(session, project, archive);
} catch (ArchiverException | ManifestException | IOException | DependencyResolutionRequiredException e) {
throw new MojoExecutionException(
"There was a problem creating the EJB client archive: " + e.getMessage(), e);
}
return clientJarFile;
}