CloudStorageMaven icon indicating copy to clipboard operation
CloudStorageMaven copied to clipboard

Use different build system

Open justinIs opened this issue 5 years ago • 1 comments

I have an android library in which I use bazel to compile and generate an aar. I'd like to host the aar on s3 as a maven repository.

Would it be possible to use CloudStorageMaven without maven building the aar for me? I'd like to just specify the location of my aar and have maven take it from there.

Is that possible at all?

justinIs avatar Jun 25 '19 20:06 justinIs

Yes, use the s3-upload goal as described in the README. Note that IIUC, you'll need some properties or environment vars defined to access AWS:

<properties>
    <aws.region>yourbucket-region</aws.region>
    <aws.accessKeyid>access_key</aws.accessKeyid>
    <aws.secretKey>access_secret</aws.secretKey>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>com.gkatzioura.maven.cloud</groupId>
            <artifactId>s3-storage-wagon</artifactId>
            <version>2.0</version>
            <executions>
                <execution>
                    <id>upload-multiple-files</id>
                    <phase>package</phase>
                    <goals>
                        <goal>s3-upload</goal>
                    </goals>
                    <configuration>
                        <bucket>yourbucketname</bucket>
                        <path>/path/to/directory/with/files</path>
                        <key>prefixforfiles</key>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Then you can use maven only to deploy the respective module. For example, with: mvn deploy -pl :your-module. Does this answer your question?

Pitxyoki avatar Jun 26 '19 16:06 Pitxyoki