cloudfront:updateoriginbucket

Full name:

org.kuali.maven.plugins:maven-cloudfront-plugin:1.0.24-SNAPSHOT:updateoriginbucket

Description:

This mojo updates a bucket serving as an origin for a Cloud Front distribution. It generates an html directory listing for each "directory" in the bucket and stores the html under a key in the bucket such that a regular http request for a directory returns the html instead of the XML for "object does not exist" Amazon would normally return. For example: The url "http://www.mybucket.com/foo/bar" returns an html page containing a listing of all the files and directories under "foo/bar" in the bucket.

If a directory contains an object with a key that is the same as the default object, the plugin copies the object to a key representing the directory structure. For example, the url "http://www.mybucket.com/foo/bar/index.html" represents an object in an S3 bucket under the key "foo/bar/index.html". This plugin will copy the object from the key "foo/bar/index.html" to the key "foo/bar/". This causes the url "http://www.mybucket.com/foo/bar/" to return the same content as the url "http://www.mybucket.com/foo/bar/index.html"

It also generates an html directory listing at the root of the bucket hierarchy and places that html into the bucket as the default object, unless a default object already exists.

Attributes:

  • Requires a Maven project to be executed.

Required Parameters

Name Type Since Description
bucket String - The name of the bucket to update.
forceMojoExecution boolean - Setting this parameter to true will force the execution of this mojo, even if it would get skipped usually.
Default value is: false.

Optional Parameters

Name Type Since Description
accessKeyId String - Amazon AWS Access Key Id. See also serverId.
browseHtml String - The html for browsing a directory will be created under this key
Default value is: browse.html.
cacheControl String - This controls the caching behavior for CloudFront. By default, CloudFront edge locations cache content from an S3 bucket for 24 hours. That interval is shortened to 1 hour for the html indexes generated by this plugin.
Default value is: max-age=3600, must-revalidate.
copyDefaultObjectWithDelimiter boolean - If true, "foo/bar/index.html" will get copied to "foo/bar/"
Default value is: true.
copyDefaultObjectWithoutDelimiter boolean - If true, "foo/bar/index.html" will get copied to "foo/bar". This is defaulted to false because the relative pathing in the html generated by the maven-site-plugin does not render correctly from a url without the trailing slash.
Default value is: false.
css String - The stylesheet to use for the directory listing
Default value is: http://s3browse.ks.kuali.org/css/style.css.
dateFormat String - When displaying the last modified timestamp use this format
Default value is: EEE, dd MMM yyyy HH:mm:ss z.
defaultObject String - The key containing the default object for the Cloud Front distribution. If this object already exists, the plugin will not modify it. If it does not exist, this plugin will generate an html directory listing and place it into the bucket under this key.
Default value is: index.html.
delimiter String - The delimiter used to organize keys into a hierarchy.
Default value is: /.
directoryImage String - Image representing a directory
Default value is: http://s3browse.ks.kuali.org/images/folder.png.
encoding String - The encoding to use when reading/writing files. If not specified this defaults to the platform specific encoding of whatever machine the build is running on.
Default value is: ${project.build.sourceEncoding}.
fileImage String - Image representing a file
Default value is: http://s3browse.ks.kuali.org/images/page_white.png.
maxKeys Integer - Maximum number of keys to return per query.
organizationGroupId String - The groupId for the organization
Default value is: org.kuali.
prefix String - Only update the bucket hierarchy underneath this prefix.
recurse boolean - If true, the complete hierarchy underneath prefix will be recursively updated. If false, only the directory corresponding to the prefix will be updated along with the path back to the root of the bucket
Default value is: true.
secretAccessKey String - Amazon AWS Secret Access Key. See also serverId.
serverId String - This is the id of the server from settings.xml containing Amazon AWS credentials.
skip boolean - When true, skip the execution of this mojo.
Default value is: false.
timezone String - When displaying the last modified timestamp, use this timezone
Default value is: GMT.
updateChildModules boolean - (no description)
Default value is: false.

Parameter Details

accessKeyId:

Amazon AWS Access Key Id. See also serverId.
  • Type: java.lang.String
  • Required: No
  • Expression: ${accessKeyId}

browseHtml:

The html for browsing a directory will be created under this key
  • Type: java.lang.String
  • Required: No
  • Expression: ${browseHtml}
  • Default: browse.html

bucket:

The name of the bucket to update.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${bucket}

cacheControl:

This controls the caching behavior for CloudFront. By default, CloudFront edge locations cache content from an S3 bucket for 24 hours. That interval is shortened to 1 hour for the html indexes generated by this plugin.
  • Type: java.lang.String
  • Required: No
  • Expression: ${cacheControl}
  • Default: max-age=3600, must-revalidate

copyDefaultObjectWithDelimiter:

If true, "foo/bar/index.html" will get copied to "foo/bar/"
  • Type: boolean
  • Required: No
  • Expression: ${copyDefaultObjectWithDelimiter}
  • Default: true

copyDefaultObjectWithoutDelimiter:

If true, "foo/bar/index.html" will get copied to "foo/bar". This is defaulted to false because the relative pathing in the html generated by the maven-site-plugin does not render correctly from a url without the trailing slash.
  • Type: boolean
  • Required: No
  • Expression: ${copyDefaultObjectWithoutDelimiter}
  • Default: false

css:

The stylesheet to use for the directory listing
  • Type: java.lang.String
  • Required: No
  • Expression: ${css}
  • Default: http://s3browse.ks.kuali.org/css/style.css

dateFormat:

When displaying the last modified timestamp use this format
  • Type: java.lang.String
  • Required: No
  • Expression: ${dateFormat}
  • Default: EEE, dd MMM yyyy HH:mm:ss z

defaultObject:

The key containing the default object for the Cloud Front distribution. If this object already exists, the plugin will not modify it. If it does not exist, this plugin will generate an html directory listing and place it into the bucket under this key.
  • Type: java.lang.String
  • Required: No
  • Expression: ${defaultObject}
  • Default: index.html

delimiter:

The delimiter used to organize keys into a hierarchy.
  • Type: java.lang.String
  • Required: No
  • Expression: ${delimiter}
  • Default: /

directoryImage:

Image representing a directory
  • Type: java.lang.String
  • Required: No
  • Expression: ${directoryImage}
  • Default: http://s3browse.ks.kuali.org/images/folder.png

encoding:

The encoding to use when reading/writing files. If not specified this defaults to the platform specific encoding of whatever machine the build is running on.
  • Type: java.lang.String
  • Required: No
  • Expression: ${encoding}
  • Default: ${project.build.sourceEncoding}

fileImage:

Image representing a file
  • Type: java.lang.String
  • Required: No
  • Expression: ${fileImage}
  • Default: http://s3browse.ks.kuali.org/images/page_white.png

forceMojoExecution:

Setting this parameter to true will force the execution of this mojo, even if it would get skipped usually.
  • Type: boolean
  • Required: Yes
  • Expression: ${forceMojoExecution}
  • Default: false

maxKeys:

Maximum number of keys to return per query.
  • Type: java.lang.Integer
  • Required: No
  • Expression: ${maxKeys}

organizationGroupId:

The groupId for the organization
  • Type: java.lang.String
  • Required: No
  • Expression: ${organizationGroupId}
  • Default: org.kuali

prefix:

Only update the bucket hierarchy underneath this prefix.
  • Type: java.lang.String
  • Required: No
  • Expression: ${prefix}

recurse:

If true, the complete hierarchy underneath prefix will be recursively updated. If false, only the directory corresponding to the prefix will be updated along with the path back to the root of the bucket
  • Type: boolean
  • Required: No
  • Expression: ${recurse}
  • Default: true

secretAccessKey:

Amazon AWS Secret Access Key. See also serverId.
  • Type: java.lang.String
  • Required: No
  • Expression: ${secretAccessKey}

serverId:

This is the id of the server from settings.xml containing Amazon AWS credentials.
  • Type: java.lang.String
  • Required: No
  • Expression: ${serverId}

skip:

When true, skip the execution of this mojo.
  • Type: boolean
  • Required: No
  • Default: false

timezone:

When displaying the last modified timestamp, use this timezone
  • Type: java.lang.String
  • Required: No
  • Expression: ${timezone}
  • Default: GMT

updateChildModules:

(no description)
  • Type: boolean
  • Required: No
  • Expression: ${updateChildModules}
  • Default: false