protected void executeWithArtifacts()

in src/main/java/org/apache/sling/maven/projectsupport/AttachBundleListMojo.java [58:83]


    protected void executeWithArtifacts() throws MojoExecutionException, MojoFailureException {
        FileWriter fw = null;
        try {
            this.outputFile.getParentFile().mkdirs();
            fw = new FileWriter(outputFile);
            writer.write(fw, getInitializedBundleList());
            projectHelper.attachArtifact(project, AttachPartialBundleListMojo.TYPE, AttachPartialBundleListMojo.CLASSIFIER, outputFile);
        } catch (IOException e) {
            throw new MojoExecutionException("Unable to output effective bundle list", e);
        } finally {
            if (fw != null) {
                try {
                    fw.close();
                } catch (IOException e) {
                }
            }
        }
        this.getLog().info("Attaching bundle list configuration");
        try {
            this.attachConfigurations();
        } catch (final IOException ioe) {
            throw new MojoExecutionException("Unable to attach configuration.", ioe);
        } catch (final ArchiverException ioe) {
            throw new MojoExecutionException("Unable to attach configuration.", ioe);
        }
    }