protected abstract File fixBundleVersion()

in src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleDeployMojo.java [78:107]


    protected abstract File fixBundleVersion(File jarFile)
            throws MojoExecutionException;

    /**
     * Execute this Mojo
     */
    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);
        }
    }