jcaddel / maven-s3-wagon

Multi-threaded wagon to connect Maven with Amazon S3
123 stars 50 forks source link

Acl not working #3

Closed ghost closed 12 years ago

ghost commented 12 years ago

I dont know why by acl settings are ignored in my setttings.xml file. Although clearly it must be user as the username and password is.

Ive tried various things and maven --debug does not print the acl debug in the code.

Any tips ?

Settings.xml snippet

    <server>
        <id>awsaccount</id>
        <configuration>
            <acl>Private</acl>
        </configuration>

        <username>AXXXXXXXXXXXXXXXA</username>
        <password>XXXXXXXXXXXXXXXXXXXXXXXX</password>
    </server>

pom.xml snippet

 <extensions>
        <!-- Deploy to S3 extension -->
        <extension>
            <groupId>org.kuali.maven.wagons</groupId>
            <artifactId>maven-s3-wagon</artifactId>
            <version>1.1.10</version>
        </extension>
    </extensions>

    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>wagon-maven-plugin</artifactId>
            <version>1.0-beta-3</version>

            <executions>
                <execution>
                    <id>awsaccount</id>
                    <phase>deploy</phase>
                    <goals>
                        <goal>upload</goal>
                    </goals>
                    <configuration>
                        <serverId>awsaccount</serverId>
                        <includes>**</includes>
                        <excludes>pom.xml</excludes>
                        <fromDir>src/main/resources</fromDir>
                        <url>s3://MYBUCKET/simontest</url>
                    </configuration>
                </execution>
            </executions>
        </plugin>
jcaddel commented 12 years ago

Might try adding <acl> to the configuration for the wagon-maven-plugin? Not entirely sure exactly how Maven passes configuration details around.

If you do a regular mvn deploy (ie don't use the wagon-maven-plugin) is Maven able to upload artifacts with the correct permissions set?

ghost commented 12 years ago
  1. Having in the configuration of wagon-maven-plugin does not work. ( tried this before infact)
  2. Moving the deploy url to distribution manager does pay attention to the acl :)

So it works the way prescribed probably. Im trying to read up on how config data is passed in my free time.

ghost commented 12 years ago

I looked into this read up on plugins and looked at the "wagon-maven-plugin" source. From what I can tell "wagon-maven-plugin" is hiding everything and only giving minimal info [1] line erm that goes

    wagon.connect( repository, wagonManager.getAuthenticationInfo( repository.getId() ) );

so I dont think there is away. I do wonder if it is possible to retrieve "filePermissions" from sever settings [2] OK thats a no I think

I think this is just not possible... In fact I think while using wagon-maven-plugin passing any settings is just not possible (unless in url)

[1] http://svn.codehaus.org/mojo/tags/wagon-maven-plugin-1.0-beta-3/src/main/java/org/codehaus/mojo/wagon/shared/WagonUtils.java

[2] http://maven.apache.org/settings.html#Servers

jcaddel commented 12 years ago

Does not appear to be a built in way to pass the <acl> config info to the wagon-maven-plugin.

Would probably not be difficult to patch the wagon-maven-plugin in a way that makes it possible for that plugin to accept "extra" configuration information like the <acl> parameter, but doing so is outside the scope of the maven-s3-wagon