public void execute()

in src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleDeployMojo.java [84:103]


    public void execute() throws MojoExecutionException {
        // only upload if packaging as an osgi-bundle
        File jarFile = new File(getJarFileName());
        String bundleName = getBundleSymbolicName(jarFile);
        if (bundleName == null) {
            this.getLog().info(jarFile + " is not an OSGi Bundle, not uploading");
            return;
        }

        // optionally fix up the bundle version
        jarFile = fixBundleVersion(jarFile);

        getLog().info("Deploying Bundle " + bundleName + "(" + jarFile + ") to " + obr);
        try (CloseableHttpClient httpClient = getHttpClient()) {
            this.post(httpClient, this.obr, jarFile);
            getLog().info("Bundle deployed");
        } catch (IOException ex) {
            throw new MojoExecutionException("Deployment on " + this.obr + " failed, cause: " + ex.getMessage(), ex);
        }
    }