7

For some reasons (not the concern of this post) amazon S3 is not a perfect host for maven repository. so i am building my maven application in a local machine and at some points in time (like every two days or so) i copy the whole hierarchy to amazon S3 with aws s3 cp command. say i copy the com folder which is like :

com
-raysis
--rayProduct
---1.0-SNAPSHOT
----rayray.jar

the problem is the metadata file that has been created is maven-metadata-local.xml (since i have built it locally it seems reasonable) but when i upload it to S3 and trying to get it with maven, it complains that there is no maven-metadata.xml. so how can i force (or ask gracefully) maven to create maven-metadata.xml instead/along-side of maven-metadata-local.xml? since there is no location specific data inside maven metadata, it seems not to be problem prone move.

Note: i am trying to load the dependency from S3 with following dependency( i have added the repository too):

<dependency>
    <groupId>com.raysis</groupId>
    <artifactId>sense-lib</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
carlspring
  • 31,231
  • 29
  • 115
  • 197
MoienGK
  • 4,544
  • 11
  • 58
  • 92
  • I have no experience on what you're doing, but have you tried anything with [resources:copy-resources](http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html)? – watery Sep 20 '15 at 07:58
  • @watery The Resources plugin is probably not going to help here. Artifacts are not resources. – Gerold Broser Sep 20 '15 at 11:30
  • 1
    Why don't you use `mvn deploy` to deploy your artifacts to an external repository? – Gerold Broser Sep 20 '15 at 11:40
  • @GeroldBroser hmmm.. it is a bit tricky with aws s3. but i will look into it – MoienGK Sep 20 '15 at 13:29

0 Answers0