Tuesday, 18 November 2014

How to push maven artifacts to s3 bucket

I have written here about pushing third party artifacts to remote repository . Now, I will share here details about pushing artifacts to s3.

If we use default maven wagon connector to push artifacts to s3 buckett, we would come across below issue.

No connector available to access repository  <repository_name> (<repository_url>) of type default using the available factories WagonRepositoryConnectorFactory -> [Help 1]


To overcome this, we should use below code-snippet within <build> tags.

        <extensions>
            <extension>
                <groupId>org.springframework.build</groupId>
                <artifactId>aws-maven</artifactId>
                <version>${aws-maven.version}</version>
            </extension>
        </extensions>


Now, what does this code snippet do?

This means, adding the artifact "aws-maven" in the class path of maven build, so that aws-maven wagon connector will push artifacts to s3 bucket.