This project is a Maven Wagon for OpenStack Swift. In order to publish artifacts to an swift container, the user (as identified by their username and password) must have access to the container.
To publish Maven artifacts to swift a build extension must be defined in a project's pom.xml
. The latest version of the wagon can be found on the swift-maven
page in Maven Central.
<project>
...
<build>
...
<extensions>
...
<extension>
<groupId>com.aerse</groupId>
<artifactId>swift-maven</artifactId>
<version>1.1</version>
</extension>
...
</extensions>
...
</build>
...
</project>
Once the build extension is configured distribution management repositories can be defined in the pom.xml
with an swift://
scheme.
<project>
...
<distributionManagement>
<repository>
<id>container-name-snapshot</id>
<url>swift://<host>/v3</url>
</repository>
<snapshotRepository>
<id>container-name-release</id>
<name><container name></name>
<url>swift://<host>/v3</url>
</snapshotRepository>
</distributionManagement>
...
</project>
Finally the ~/.m2/settings.xml
must be updated to include username and password for the account.
<settings>
...
<servers>
...
<server>
<id>container-name-release</id>
<username>0123456789ABCDEFGHIJ</username>
<password>0123456789abcdefghijklmnopqrstuvwxyzABCD</password>
</server>
<server>
<id>container-name-snapshot</id>
<username>0123456789ABCDEFGHIJ</username>
<password>0123456789abcdefghijklmnopqrstuvwxyzABCD</password>
</server>
...
</servers>
...
</settings>