Code Monkey home page Code Monkey logo

cym2's Introduction

What is it?

Despite the confusing project name, which doesn't actually mean anything, CYM2 is a small set of Maven extensions that I have developed during time to serve other OSS projects.

Maven plugins

s3upload - Maven s3upload Plugin

A plugin that uploads arbitrary files in project to AWS S3. I often upload website static contents to CloudFront with this plugin.

uberjar - Maven uberjar Plugin

This plugin was created long time ago to build uberjar artifact easily. However the same result can be achieved decently with Maven Assembly Plugin so I haven't touched it for a while.

flatsite - Maven Flatsite Plugin

Flatsite is a Maven plugin that generates site using customized Velocity template. This plugin gives user full control of template and allows to create arbitrary structure of website. As a trade off, it can't be used to generate standard Maven reports.

Maven extension

awss3, AWS S3 Maven wagon

This extension allows user to upload artifact or generated Maven site to Amazon S3. There are other open source projects out there for the same purpose, but at the time I was looking for such extension, none of the existing providers upload Maven site correctly, they all seem to target artifact upload. And surprisingly, none of them is implemented with AWS Java SDK, thus complicated.

The CYM2 version of AWS S3 wagon takes advantage of AWS Java SDK, has literally nothing but two short classes and does everything I need. It works well for all my other open source projects so far so I can't see a reason not to open source it.

Check out this blog to learn a little bit more.

cym2's People

Contributors

dependabot[bot] avatar jiaqi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

carrot-garden

cym2's Issues

Multi module site deploy

When running site:deploy in a multi module project, the files get prepended with at .// when uploading.

Which is causing the files not to be exposed via the S3 bucket.

Project structure
My project structure is like this.

pom.xml
modules/module1/pom.xml
modules/module2/pom.xml

Steps to reproduce.

  1. Create a maven structure like above
  2. Run mvn site:site site:deploy with the s3 wagon
  3. Open the site from the AWS console, or directly on the s3 web bucket

Log output from the wagon
When running mvn site:deploy from the parent pom

Putting child element /<checkout>/<projectname>/target/site/apidocs/deprecated-list.html to .//apidocs/deprecated-list.html
Mime type of .//apidocs/deprecated-list.html is text/html according to build-in types
Uploading file /<checkout>/<projectname>/target/site/apidocs/deprecated-list.html to  key <projectname>/.//apidocs/deprecated-list.html in S3 bucket <bucketname>
Uploading: .//apidocs/deprecated-list.html to s3://<bucketname>/<projectname>/

When running mvn site:deploy directly from one of the modules, this works fine.

Putting child element /<checkout>/<projectname>/modules/model/target/site/apidocs/deprecated-list.html to modules/model/apidocs/deprecated-list.html
Mime type of modules/model/apidocs/deprecated-list.html is text/html according to build-in types
Uploading file /<checkout>/<projectname>/modules/model/target/site/apidocs/deprecated-list.html to  key <projectname>/modules/model/apidocs/deprecated-list.html in S3 bucket <bucketname>
Uploading: modules/model/apidocs/deprecated-list.html to s3://<bucketname>/<projectname>/

Notice the .// in the path on the multi module site:deploy

Error messages

I get theese error messages when trying to access the files.

This get transfered to s3, so the URL contains /.// in the keys, which is causing this error when clicking on the link in the S3 console.

<Error><Code>SignatureDoesNotMatch</Code>
...
</Error>

In the S3 website i get this error on all resources in the /./ folder.

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>22883093DA04FFC9</RequestId>
<HostId>
X3LJmBjka/2RBwtcEFZg1i26LZxFJn7a7v8aoG3CL+FmhiKODNuOjYMINA35lmYm
</HostId>
</Error>

update new files only?

Jiaqi:

I am curious if your plugin does update new files only?

in other words, if source & target file has same time stamp,
will your wagon run upload anyway?

thanks

Andrei.

All the files are private

Hi tried this plugin, but all the file are uploaded as "private" and not "public".
Is there a way to specify I want all the files and directories public? (I am uploading a site for documentation purpose)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.