private File generateEjbClient()

in src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java [389:420]


    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.configureReproducibleBuild(outputTimestamp);

        try {

            IncludesExcludes ie = new IncludesExcludes(
                    clientIncludes, clientExcludes, DEFAULT_INCLUDES_LIST, DEFAULT_CLIENT_EXCLUDES_LIST);

            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;
    }