Deploying Maven dependencies to S3: No connector available

后端 未结 4 2140
慢半拍i
慢半拍i 2021-02-20 16:40

I\'m trying to use Amazon S3 to host my Maven artifacts. I\'ve added the following to my pom.xml:



        
4条回答
  •  情歌与酒
    2021-02-20 17:08

    I couldn't get rid of the exception No connector available to access repository maven.xxx.com-snapshot (s3://maven.xxx.com/snapshot) of type default using the available factories WagonRepositoryConnectorFactory. The reason is, that I'm using a remote / stand-alone POM and Maven seems to try to load that first and only add extensions afterwards. That's why the error is happening.

    So, I needed to fall back to HTTP(S). However, I don't want to make my artifacts public, which rules out S3's static website hosting. Instead I'm using http://www.s3auth.com, which provides HTTP basic auth and is working great.

    The only thing to watch out for:

    • You upload via the S3 wagon — so you need those credentials in your settings.xml.
    • You download via HTTP — so you need the basic auth credentials in your settings.xml as well.
    • Therefore, I've created unique IDs for the S3 release + snapshot reference and unique IDs for the HTTP release + snapshot references.

    Unfortunately, it doesn't support HTTPS at the moment, which is a major drawback.

提交回复
热议问题