How to ask maven to create maven-metadata.xml and not maven-metadata-local.xml?
Asked Answered
W

0

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>
Wiggins answered 20/9, 2015 at 6:40 Comment(4)
I have no experience on what you're doing, but have you tried anything with resources:copy-resources?Anaya
@Anaya The Resources plugin is probably not going to help here. Artifacts are not resources.Clearcole
Why don't you use mvn deploy to deploy your artifacts to an external repository?Clearcole
@GeroldBroser hmmm.. it is a bit tricky with aws s3. but i will look into itWiggins

© 2022 - 2024 — McMap. All rights reserved.