jcaddel / maven-s3-wagon

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

Not able to download jars from AWS S3 private repository #29

Open Reshmakoganti opened 7 years ago

Reshmakoganti commented 7 years ago

Hello Dev team,

We are working on an maven application which needs to talk to private repository which is on S3 and download all the needed jars in ./m2 repository.

We are using the following version of maven and S3 Wagon.

Maven 2.2.1 Wagon : org.Kuali.maven.wagons ->maven-s3-wagon->1.1.14

We also provided S3's access Key and secret key in settings.xml.

We get the following Transfer error, but if we physically create the directory in .m2 repo, we are able to download the needed jars from Private S3.

Can you please help us in resolving this issue and let us know if there is any S3 Wagon compatible version for Maven 2.2.1?

Your help is much appreciated. Thank you in advance.

directory C:\kuali-app\kuali-app\src\main\resources excludes [] includes [] [INFO] skip non existing resourceDirectory C:\kuali-app\kuali-app\src\main\resources [DEBUG] org.sb.kuali:kuali-app:jar:0.0.1-SNAPSHOT (selected for null) [DEBUG] junit:junit:jar:3.8.1:test (selected for test) [INFO] snapshot org.sb.kuali:kuali-test:0.0.1-SNAPSHOT: checking for updates from maven-s3-repo [DEBUG] Connecting to repository: 'maven-s3-repo' with url: 's3://kuali-test'. [INFO] Logged in - kuali-test [INFO] Downloading: s3://kuali-test/org/sb/kuali/kuali-test/0.0.1-SNAPSHOT/maven-metadata.xml [ERROR] Transfer error: java.io.FileNotFoundException: C:\Users\Reshma.m2\repository\org\sb\kuali\kuali-test\0.0.1-SNAPSHOT\maven-metadata-maven-s3-repo.xml.tmp (The system cannot find the path specified) java.io.FileNotFoundException: C:\Users\Reshma.m2\repository\org\sb\kuali\kuali-test\0.0.1-SNAPSHOT\maven-metadata-maven-s3-repo.xml.tmp (The system cannot find the path specified) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:221) at java.io.FileOutputStream.(FileOutputStream.java:171) at org.kuali.maven.wagon.TransferProgressFileOutputStream.(TransferProgressFileOutputStream.java:35) at org.kuali.maven.wagon.S3Wagon.getResource(S3Wagon.java:189) at org.kuali.maven.wagon.AbstractWagon.get(AbstractWagon.java:178) at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:546) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:443) at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve(DefaultRepositoryMetadataManager.java:97) at org.apache.maven.artifact.transform.AbstractVersionTransformation.resolveVersion(AbstractVersionTransformation.java:65) at org.apache.maven.artifact.transform.SnapshotTransformation.transformForResolve(SnapshotTransformation.java:63) at org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForResolve(DefaultArtifactTransformationManager.java:55) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:145) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251) at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:163) at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedArtifact(MavenMetadataSource.java:94) at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:387) at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:74) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:316) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:304) at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1499) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:442) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] Logged off - kuali-test [INFO] Transfers: 1 Time: 435ms Amount: 0.0k Throughput: 0.0 kB/s [WARNING] repository metadata for: 'snapshot org.sb.kuali:kuali-test:0.0.1-SNAPSHOT' could not be retrieved from repository: maven-s3-repo due to an error: Transfer of resource C:\Users\Reshma.m2\repository\org\sb\kuali\kuali-test\0.0.1-SNAPSHOT\maven-metadata-maven-s3-repo.xml.tmpfailed [DEBUG] Exception org.apache.maven.wagon.TransferFailedException: Transfer of resource C:\Users\Reshma.m2\repository\org\sb\kuali\kuali-test\0.0.1-SNAPSHOT\maven-metadata-maven-s3-repo.xml.tmpfailed at org.kuali.maven.wagon.AbstractWagon.get(AbstractWagon.java:189) at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:546) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:443) at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve(DefaultRepositoryMetadataManager.java:97) at org.apache.maven.artifact.transform.AbstractVersionTransformation.resolveVersion(AbstractVersionTransformation.java:65) at org.apache.maven.artifact.transform.SnapshotTransformation.transformForResolve(SnapshotTransformation.java:63)


POM File <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0 org.sb.kuali kuali-app 0.0.1-SNAPSHOT jar kuali-app http://maven.apache.org UTF-8 maven-s3-repo AWS Release Repository s3://kuali-test
<repositories>
    <repository>
        <id>maven-s3-repo</id>
        <name>S3 Release Repository</name>
        <url>s3://kuali-test</url>
    </repository>
</repositories>

<build>
    <extensions>
        <extension>
            <!-- <groupId>org.springframework.build</groupId>
            <artifactId>aws-maven</artifactId>
            <version>5.0.0.RELEASE</version> -->
            <groupId>org.kuali.maven.wagons</groupId>
            <artifactId>maven-s3-wagon</artifactId>
            <version>1.1.14</version>
        </extension>
    </extensions>
</build>
junit junit 3.8.1 test org.sb.kuali kuali-test 0.0.1-SNAPSHOT gov.nih.nci.coppa coppa-commons 1.3.21 gov.nih.nci.iso21090 iso-datatypes-extensions gov.nih.nci.coppa nci-commons-ctrp-core