Azure Blob Upload Maven Plugin

A Maven Plugin for Publishing Files to Azure Blob Storage

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.deviceinsight.azure
ArtifactId

ArtifactId

azure-blob-upload-maven-plugin
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Azure Blob Upload Maven Plugin
A Maven Plugin for Publishing Files to Azure Blob Storage
Project URL

Project URL

https://github.com/deviceinsight/azure-blob-upload-maven-plugin
Project Organization

Project Organization

Device Insight GmbH
Source Code Management

Source Code Management

https://github.com/deviceinsight/azure-blob-upload-maven-plugin.git

Download azure-blob-upload-maven-plugin

How to add to project

<plugin>
    <groupId>com.deviceinsight.azure</groupId>
    <artifactId>azure-blob-upload-maven-plugin</artifactId>
    <version>2.1.0</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 2.0
com.microsoft.azure : azure-storage jar 5.0.0
org.apache.maven.shared : file-management jar 3.0.0

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5

Project Modules

There are no modules declared in this project.

General

Use this Maven plugin to recursivly upload the contents of a directory to an Azure blob storage container. This is for example useful if you use the "Static website" feature for serving web resources.

Usage

This plugin is available on Maven Central.

Using it interactively:

mvn com.deviceinsight.azure:azure-blob-upload-maven-plugin:2.0.0:upload \
    -DconnectionString='DefaultEndpointsProtocol=https;AccountName=test;AccountKey=xxx;EndpointSuffix=core.windows.net' \
    -DcontainerName=testcontainer \
    -DrootDir=/tmp/contents

rootDir is the local directory you want to upload. connectionString is the Azure connection string. containerName is the container in the storage acount that you want to upload into.

Using it in your pom.xml:

<dependency>
    <groupId>com.deviceinsight</groupId>
    <artifactId>azure-blob-upload-maven-plugin</artifactId>
    <version>2.0.0</version>
</dependency>
<build>
  <plugins>
    ...
    <plugin>
      <groupId>com.deviceinsight.azure</groupId>
      <artifactId>azure-blob-upload-maven-plugin</artifactId>
      <version>2.0.0</version>
      <executions>
        <execution>
          <id>upload</id>
          <phase>deploy</phase>
          <goals>
            <goal>upload</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <connectionString>DefaultEndpointsProtocol=https;AccountName=someaccountname;AccountKey=somekey;EndpointSuffix=core.windows.net</connectionString>
        <rootDir>somedir</rootDir>
        <containerName>somecontainer</containerName>
      </configuration>
    </plugin>
  </plugins>
</build>

Excluding files from upload:

<configuration>
  <excludes>
    <exclude>extensions/**/*</exclude>
    <exclude>**/*.json</exclude>
  </excludes>
</configuration>

Only including certain files also works:

<configuration>
  <includes>
    <include>**/*.html</include>
  </includes>
</configuration>

Releasing

The plugin can be released using:

mvn deploy -Prelease
com.deviceinsight.azure

Device Insight

Versions

Version
2.1.0
2.0.0
1.1.0
1.0.0