Commits

Aldrin Leal committed c842ece

- Fixing Docs (sorta of)
- Fixing Deployment Issues (Create / ReplaceEnvironment)
- Removing some leftovers

Comments (0)

Files changed (21)

beanstalk-maven-plugin/pom.xml

 			<id>test</id>
 			<activation>
 				<file>
-					<exists>${basedir}/test.properties
-        </exists>
+					<exists>${basedir}/test.properties</exists>
 				</file>
 			</activation>
 			<build>
 		</profile>
 	</profiles>
 
-	<reporting>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>2.3.1</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-plugin-plugin</artifactId>
-				<version>2.9</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-				<version>2.7</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jxr-plugin</artifactId>
-				<version>2.1</version>
-			</plugin>
-		</plugins>
-	</reporting>
 	<description>The beanstalk-maven-plugin is a maven plugin which is an interface for Amazon Elastic Beanstalk Service.</description>
 </project>

beanstalk-maven-plugin/src/main/java/br/com/ingenieux/mojo/beanstalk/AbstractNeedsEnvironmentMojo.java

 	@MojoParameter(expression="${beanstalk.applicationName}", defaultValue="${project.artifactId}", required=true, description="Beanstalk Application Name")
 	protected String applicationName;
 
-	@MojoParameter(expression="${beanstalk.defaultEnvironmentName}", description="Default Environment Name", defaultValue="default")
-	protected String defaultEnvironmentName;
-        
     @MojoParameter(expression="${beanstalk.cnamePrefix}", description = "cnamePrefix")
     protected String cnamePrefix;
 

beanstalk-maven-plugin/src/main/java/br/com/ingenieux/mojo/beanstalk/cmd/env/create/CreateEnvironmentCommand.java

 		}
 
 		request.setVersionLabel(context.getVersionLabel());
+		
+		if (parentMojo.isVerbose())
+			parentMojo.getLog().info("Requesting createEnvironment w/ request: " + request);
 
 		return service.createEnvironment(request);
 	}

beanstalk-maven-plugin/src/main/java/br/com/ingenieux/mojo/beanstalk/env/CreateEnvironmentMojo.java

  * limitations under the License.
  */
 
+import static org.apache.commons.lang.StringUtils.isNotBlank;
+
+import org.apache.commons.lang.Validate;
 import org.apache.maven.plugin.AbstractMojoExecutionException;
 import org.jfrog.maven.annomojo.annotations.MojoGoal;
 import org.jfrog.maven.annomojo.annotations.MojoParameter;
 @MojoGoal("create-environment")
 @MojoSince("0.1.0")
 public class CreateEnvironmentMojo extends AbstractNeedsEnvironmentMojo {
+	@MojoParameter(expression="${beanstalk.environmentName}", description="Environment Name", defaultValue="default")
+	protected String environmentName;
+        
 	/**
 	 * Application Description
 	 */
 	@MojoParameter(expression="${beanstalk.templateName}")
 	String templateName;
 
+	/**
+	 * Overrides parent in order to avoid a thrown exception as there's not an environment to lookup
+	 */
+	@Override
+	protected void configure() {
+		// Disable parent lookup - We're CREATING, mind that!
+	}
+	
 	@Override
 	protected Object executeInternal() throws AbstractMojoExecutionException {
-		CreateEnvironmentResult result = createEnvironment(cnamePrefix);
+		CreateEnvironmentResult result = createEnvironment(cnamePrefix, this.environmentName);
 
 		return result;
 	}
 
-	protected CreateEnvironmentResult createEnvironment(String cnameToCreate)
+	protected CreateEnvironmentResult createEnvironment(String cnameToCreate, String newEnvironmentName)
 	    throws AbstractMojoExecutionException {
-		String newEnvironmentName = getEnvironmentName(defaultEnvironmentName);
-
+		/*
+		 * Hey Aldrin, have you ever noticed we're getting pedantic on those validations?
+		 */
+		Validate.isTrue(isNotBlank(newEnvironmentName), "No New Environment Name Supplied");
+		
 		CreateEnvironmentContextBuilder builder = CreateEnvironmentContextBuilder
 		    .createEnvironmentContext() //
 		    .withApplicationName(applicationName)//
 
 		return command.execute(context);
 	}
-
-	protected String getEnvironmentName(String environmentName) {
-		return environmentName;
-	}
 }

beanstalk-maven-plugin/src/main/java/br/com/ingenieux/mojo/beanstalk/env/ReplaceEnvironmentMojo.java

  * 
  */
 @MojoGoal("replace-environment")
-@MojoSince("0.2.0") // Best Guess Evar
+@MojoSince("0.2.0")
+// Best Guess Evar
 public class ReplaceEnvironmentMojo extends CreateEnvironmentMojo {
 	/**
 	 * 
 	 */
 	private static final Pattern PATTERN_NUMBERED = Pattern
-	    .compile("^(.*)-(\\d+)$");
+			.compile("^(.*)-(\\d+)$");
+
+	/**
+	 * Max Environment Name
+	 */
+	private static final int MAX_ENVNAME_LEN = 23;
 
 	/**
 	 * Minutes until timeout
 	 */
-	@MojoParameter(expression="${beanstalk.timeoutMins}", defaultValue="20")
+	@MojoParameter(expression = "${beanstalk.timeoutMins}", defaultValue = "20")
 	Integer timeoutMins;
-	
+
 	@Override
 	protected EnvironmentDescription handleResults(String kind,
 			List<EnvironmentDescription> environments)
 			throws MojoExecutionException {
 		// Don't care - We're an exception to the rule, you know.
-		
+
 		return null;
 	}
 
 	@Override
 	protected Object executeInternal() throws AbstractMojoExecutionException {
 		/*
-		 * Is the desired cname not being used by other environments? If so, just
-		 * launch the environment
+		 * Is the desired cname not being used by other environments? If so,
+		 * just launch the environment
 		 */
 		if (!hasEnvironmentFor(applicationName, cnamePrefix)) {
 			if (getLog().isInfoEnabled())
 		 * Gets the current environment using this cname
 		 */
 		EnvironmentDescription curEnv = getEnvironmentFor(applicationName,
-		    cnamePrefix);
+				cnamePrefix);
 
 		/*
 		 * Decides on a cnamePrefix, and launches a new environment
 
 		if (getLog().isInfoEnabled())
 			getLog().info(
-			    "Creating a new environment on " + cnamePrefixToCreate
-			        + ".elasticbeanstalk.com");
+					"Creating a new environment on " + cnamePrefixToCreate
+							+ ".elasticbeanstalk.com");
 
 		copyOptionSettings(curEnv);
-		
-		CreateEnvironmentResult createEnvResult = createEnvironment(cnamePrefixToCreate);
+
+		String newEnvironmentName = getNewEnvironmentName(this.environmentName);
+
+		if (getLog().isInfoEnabled())
+			getLog().info("And it'll be named " + newEnvironmentName);
+
+		CreateEnvironmentResult createEnvResult = createEnvironment(
+				cnamePrefixToCreate, newEnvironmentName);
 
 		/*
 		 * Waits for completion
 		 * Swaps
 		 */
 		swapEnvironmentCNames(newEnvDesc.getEnvironmentId(),
-		    curEnv.getEnvironmentId(), cnamePrefix);
+				curEnv.getEnvironmentId(), cnamePrefix);
 
 		/*
 		 * Terminates the previous environment - and waits for it
 		return createEnvResult;
 	}
 
+	/**
+	 * Prior to Launching a New Environment, lets look and copy the most we can
+	 * 
+	 * @param curEnv
+	 *            current environment
+	 */
 	private void copyOptionSettings(EnvironmentDescription curEnv) {
+		/**
+		 * Skip if we don't have anything
+		 */
 		if (null != this.optionSettings && this.optionSettings.length > 0)
 			return;
-		
+
 		DescribeConfigurationSettingsResult configSettings = getService()
 				.describeConfigurationSettings(
 						new DescribeConfigurationSettingsRequest()
 								.withApplicationName(applicationName)
 								.withEnvironmentName(
 										curEnv.getEnvironmentName()));
-		
-		List<ConfigurationOptionSetting> newOptionSettings = new ArrayList<ConfigurationOptionSetting>(configSettings.getConfigurationSettings().get(0).getOptionSettings());
-		
-		ListIterator<ConfigurationOptionSetting> listIterator = newOptionSettings.listIterator();
-		
+
+		List<ConfigurationOptionSetting> newOptionSettings = new ArrayList<ConfigurationOptionSetting>(
+				configSettings.getConfigurationSettings().get(0)
+						.getOptionSettings());
+
+		ListIterator<ConfigurationOptionSetting> listIterator = newOptionSettings
+				.listIterator();
+
 		while (listIterator.hasNext()) {
 			ConfigurationOptionSetting curOptionSetting = listIterator.next();
-			
+
+			/*
+			 * Filters out harmful options
+			 * 
+			 * I really mean harmful - If you mention a terminated environment
+			 * settings, Elastic Beanstalk will accept, but this might lead to
+			 * inconsistent states, specially when creating / listing environments. 
+			 * 
+			 * Trust me on this one.
+			 */
 			boolean bInvalid = isBlank(curOptionSetting.getValue());
-			
-			if (! bInvalid)
-				bInvalid |= (curOptionSetting.getNamespace().equals("aws:cloudformation:template:parameter") && curOptionSetting.getOptionName().equals("AppSource"));
-			
-			if (! bInvalid)
-				bInvalid |= (curOptionSetting.getValue().contains(curEnv.getEnvironmentId()));
-			
+
+			if (!bInvalid)
+				bInvalid |= (curOptionSetting.getNamespace().equals(
+						"aws:cloudformation:template:parameter") && curOptionSetting
+						.getOptionName().equals("AppSource"));
+
+			if (!bInvalid)
+				bInvalid |= (curOptionSetting.getValue().contains(curEnv
+						.getEnvironmentId()));
+
 			if (bInvalid)
 				listIterator.remove();
 		}
-		
-		this.optionSettings = newOptionSettings.toArray(new ConfigurationOptionSetting[newOptionSettings.size()]);
+
+		/*
+		 * Then copy it back
+		 */
+		this.optionSettings = newOptionSettings
+				.toArray(new ConfigurationOptionSetting[newOptionSettings
+						.size()]);
 	}
 
 	/**
 	 * Swaps environment cnames
 	 * 
 	 * @param newEnvironmentId
-	 *          environment id
+	 *            environment id
 	 * @param curEnvironmentId
-	 *          environment id
+	 *            environment id
 	 * @param cnamePrefix
-	 * @throws AbstractMojoExecutionException 
+	 * @throws AbstractMojoExecutionException
 	 */
 	protected void swapEnvironmentCNames(String newEnvironmentId,
-	    String curEnvironmentId, String cnamePrefix) throws AbstractMojoExecutionException {
+			String curEnvironmentId, String cnamePrefix)
+			throws AbstractMojoExecutionException {
 		getLog().info(
-		    "Swapping environment cnames " + newEnvironmentId + " and "
-		        + curEnvironmentId);
+				"Swapping environment cnames " + newEnvironmentId + " and "
+						+ curEnvironmentId);
 
 		{
-			SwapCNamesContext context = SwapCNamesContextBuilder.swapCNamesContext()//
-			    .withSourceEnvironmentId(newEnvironmentId)//
-			    .withDestinationEnvironmentId(curEnvironmentId)//
-			    .build();
+			SwapCNamesContext context = SwapCNamesContextBuilder
+					.swapCNamesContext()//
+					.withSourceEnvironmentId(newEnvironmentId)//
+					.withDestinationEnvironmentId(curEnvironmentId)//
+					.build();
 			SwapCNamesCommand command = new SwapCNamesCommand(this);
 
 			command.execute(context);
 
 		{
 			WaitForEnvironmentContext context = new WaitForEnvironmentContextBuilder()
-			    .withApplicationName(applicationName)//
-			    .withStatusToWaitFor("Ready")//
-			    .withEnvironmentId(newEnvironmentId)//
-			    .withTimeoutMins(timeoutMins)//
-			    .withDomainToWaitFor(cnamePrefix).build();
+					.withApplicationName(applicationName)//
+					.withStatusToWaitFor("Ready")//
+					.withEnvironmentId(newEnvironmentId)//
+					.withTimeoutMins(timeoutMins)//
+					.withDomainToWaitFor(cnamePrefix).build();
 
-			WaitForEnvironmentCommand command = new WaitForEnvironmentCommand(this);
+			WaitForEnvironmentCommand command = new WaitForEnvironmentCommand(
+					this);
 
 			command.execute(context);
 		}
 	 * Terminates and waits for an environment
 	 * 
 	 * @param environmentId
-	 *          environment id to terminate
-	 * @throws AbstractMojoExecutionException 
+	 *            environment id to terminate
+	 * @throws AbstractMojoExecutionException
 	 */
 	protected void terminateAndWaitForEnvironment(String environmentId)
-	    throws AbstractMojoExecutionException {
+			throws AbstractMojoExecutionException {
 		{
 			getLog().info("Terminating environmentId=" + environmentId);
 
 			TerminateEnvironmentContext terminatecontext = new TerminateEnvironmentContextBuilder()
-			    .withEnvironmentId(environmentId).withTerminateResources(true)
-			    .build();
+					.withEnvironmentId(environmentId)
+					.withTerminateResources(true).build();
 			TerminateEnvironmentCommand command = new TerminateEnvironmentCommand(
-			    this);
+					this);
 
 			command.execute(terminatecontext);
 		}
 
 		{
 			WaitForEnvironmentContext context = new WaitForEnvironmentContextBuilder()
-			    .withApplicationName(applicationName)
-			    .withEnvironmentId(environmentId).withStatusToWaitFor("Terminated")
-			    .withTimeoutMins(timeoutMins).build();
+					.withApplicationName(applicationName)
+					.withEnvironmentId(environmentId)
+					.withStatusToWaitFor("Terminated")
+					.withTimeoutMins(timeoutMins).build();
 
-			WaitForEnvironmentCommand command = new WaitForEnvironmentCommand(this);
+			WaitForEnvironmentCommand command = new WaitForEnvironmentCommand(
+					this);
 
 			command.execute(context);
 		}
 	 * environment couldn't get into Ready state or there was a timeout
 	 * 
 	 * @param environmentId
-	 *          environmentId to wait for
+	 *            environmentId to wait for
 	 * @return EnvironmentDescription in Ready state
-	 * @throws AbstractMojoExecutionException 
+	 * @throws AbstractMojoExecutionException
 	 */
 	protected EnvironmentDescription waitForEnvironment(String environmentId)
-	    throws AbstractMojoExecutionException {
+			throws AbstractMojoExecutionException {
 		getLog().info(
-		    "Waiting for environmentId " + environmentId
-		        + " to get into Ready state");
+				"Waiting for environmentId " + environmentId
+						+ " to get into Ready state");
 
 		WaitForEnvironmentContext context = new WaitForEnvironmentContextBuilder()
-		    .withApplicationName(applicationName).withStatusToWaitFor("Ready")
-		    .withEnvironmentId(environmentId).withTimeoutMins(timeoutMins).build();
+				.withApplicationName(applicationName)
+				.withStatusToWaitFor("Ready").withEnvironmentId(environmentId)
+				.withTimeoutMins(timeoutMins).build();
 
 		WaitForEnvironmentCommand command = new WaitForEnvironmentCommand(this);
 
 	 * Boolean predicate for environment existence
 	 * 
 	 * @param applicationName
-	 *          application name
+	 *            application name
 	 * @param cnamePrefix
-	 *          cname prefix
+	 *            cname prefix
 	 * @return true if the application name has this cname prefix
 	 */
-	protected boolean hasEnvironmentFor(String applicationName, String cnamePrefix) {
+	protected boolean hasEnvironmentFor(String applicationName,
+			String cnamePrefix) {
 		return null != getEnvironmentFor(applicationName, cnamePrefix);
 	}
 
 	 * cnamePrefix
 	 * 
 	 * @param applicationName
-	 *          application name
+	 *            application name
 	 * @param cnamePrefix
-	 *          cname prefix
+	 *            cname prefix
 	 * @return environment description
 	 */
 	protected EnvironmentDescription getEnvironmentFor(String applicationName,
-	    String cnamePrefix) {
+			String cnamePrefix) {
 		Collection<EnvironmentDescription> environments = getEnvironmentsFor(applicationName);
-		String cnameToMatch = String.format("%s.elasticbeanstalk.com", cnamePrefix);
+		String cnameToMatch = String.format("%s.elasticbeanstalk.com",
+				cnamePrefix);
 
 		/*
 		 * Finds a matching environment
 		return null;
 	}
 
-	@Override
-	protected String getEnvironmentName(String environmentName) {
-		return getNewEnvironmentName(environmentName);
-	}
-
 	private String getNewEnvironmentName(String newEnvironmentName) {
-		String resultingEnvironmentName = newEnvironmentName;
-		String environmentRadical = resultingEnvironmentName;
+		String result = newEnvironmentName;
+		String environmentRadical = result;
 
 		int i = 0;
 
 			}
 		}
 
-		while (containsNamedEnvironment(resultingEnvironmentName))
-			resultingEnvironmentName = String
-			    .format("%s-%d", environmentRadical, i++);
+		while (containsNamedEnvironment(result))
+			result = formatAndTruncate("%s-%d", MAX_ENVNAME_LEN,
+					environmentRadical, i++);
 
-		return resultingEnvironmentName;
+		return result;
+	}
+
+	/**
+	 * Elastic Beanstalk Contains a Max EnvironmentName Limit. Lets truncate it,
+	 * shall we?
+	 * 
+	 * @param mask
+	 *            String.format Mask
+	 * @param maxLen
+	 *            Maximum Length
+	 * @param args
+	 *            String.format args
+	 * @return formatted String, or maxLen rightmost characters
+	 */
+	protected String formatAndTruncate(String mask, int maxLen, Object... args) {
+		String result = String.format(mask, args);
+
+		if (result.length() > maxLen)
+			result = result
+					.substring(result.length() - maxLen, result.length());
+
+		return result;
 	}
 
 	/**
 	 * Boolean predicate for named environment
 	 * 
 	 * @param environmentName
-	 *          environment name
+	 *            environment name
 	 * @return true if environment name exists
 	 */
 	protected boolean containsNamedEnvironment(String environmentName) {

beanstalk-maven-plugin/src/site/apt/usage.apt

   Now it is a good time to see if your app name is available, and your credentials are correct.
   
 +---+
-$ mvn beanstalk:check-availability -Dcname=test-war
+$ mvn beanstalk:check-availability -Dbeanstalk.cnamePrefix=test-war
 +---+
 
   If it is available, here is the expected output:

beanstalk-maven-plugin/src/site/site.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<project name="Beanstalk Maven Plugin">
+  <bannerRight>
+    <name>Beanstalk Maven Plugin</name>
+    <href>index.html</href>
+  </bannerRight>
+  <poweredBy>
+    <logo name="Built By Maven" href="http://maven.apache.org"
+          img="http://maven.apache.org/images/logos/maven-feather.png" />
+  </poweredBy>
+  <body>
+    <menu name="Overview">
+      <item name="Index" href="./index.html"/>
+    </menu>
+    <menu name="Guides">
+      <item name="Usage" href="beanstalk-maven-plugin/usage.html" /> 
+      <item name="Security Credentials" href="beanstalk-maven-plugin/security.html" /> 
+      <item name="Configuration and Configuration Templates" href="beanstalk-maven-plugin/configurations-and-templates.html" />
+      <item name="Setting Up for your CI Builds" href="beanstalk-maven-plugin/setup-for-ci.html" /> 
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>

beanstalk-maven-plugin/test.properties.sample

-# Test Properties
-# ====
-# In order to enable testing, modify these values and rename this file to test.properties
-#
-#
-appname=<application name>
-s3Bucket=<bucket where to store to>
-s3KeyMask=<mask for new war storage locations> # beanstalker-test/beanstalker-test-${versionLabel}.war

cloudfront-maven-plugin/pom.xml

 <?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<artifactId>beanstalker</artifactId>
 		</dependency>
 	</dependencies>
 
-	<reporting>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>2.3.1</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-plugin-plugin</artifactId>
-				<version>2.9</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-				<version>2.7</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jxr-plugin</artifactId>
-				<version>2.1</version>
-			</plugin>
-		</plugins>
-	</reporting>
 	<description>The cloudfront-maven-plugin is a plugin to automate CDN care and handling in .war-based projects. It does by specifying sets or resources to be deployed into distributions</description>
 </project>

cloudfront-maven-plugin/src/site/site.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<project name="cloudfront Maven Plugin">
+  <bannerRight>
+    <name>cloudfront Maven Plugin</name>
+    <href>index.html</href>
+  </bannerRight>
+  <poweredBy>
+    <logo name="Built By Maven" href="http://maven.apache.org"
+          img="http://maven.apache.org/images/logos/maven-feather.png" />
+  </poweredBy>
+  <body>
+    <menu ref="reports"/>
+  </body>
+</project>

mapreduce-maven-plugin/pom.xml

 <?xml version="1.0"?>
-<!-- 
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>beanstalker</artifactId>
-    <groupId>br.com.ingenieux</groupId>
-    <version>0.2.7-RC7-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
+<!-- /* * Licensed under the Apache License, Version 2.0 (the "License"); 
+	* you may not use this file except in compliance with the License. * You 
+	may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 
+	* * Unless required by applicable law or agreed to in writing, software * 
+	distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 
+	WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the 
+	License for the specific language governing permissions and * limitations 
+	under the License. */ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<artifactId>beanstalker</artifactId>
+		<groupId>br.com.ingenieux</groupId>
+		<version>0.2.7-RC7-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
 
-  <artifactId>mapreduce-maven-plugin</artifactId>
-  
-  <packaging>maven-plugin</packaging>
+	<artifactId>mapreduce-maven-plugin</artifactId>
 
-  <description>The mapreduce-maven-plugin is a maven plugin which is an interface for Amazon Elastic MapReduce Service.</description>
+	<packaging>maven-plugin</packaging>
 
-  <scm>
-    <connection>scm:hg:http://bitbucket.org/aldrinleal/beanstalker</connection>
-    <developerConnection>scm:hg:https://bitbucket.org/aldrinleal/beanstalker</developerConnection>
-  </scm>
+	<description>The mapreduce-maven-plugin is a maven plugin which is an interface for Amazon Elastic MapReduce Service.</description>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-    </dependency>
-    <dependency>
-    	<groupId>br.com.ingenieux</groupId>
-    	<artifactId>beanstalker-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.plugin-testing</groupId>
-      <artifactId>maven-plugin-testing-harness</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+	<scm>
+		<connection>scm:hg:http://bitbucket.org/aldrinleal/beanstalker</connection>
+		<developerConnection>scm:hg:https://bitbucket.org/aldrinleal/beanstalker</developerConnection>
+	</scm>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <forkMode>none</forkMode>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-project-info-reports-plugin</artifactId>
-        <version>2.3.1</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-plugin-plugin</artifactId>
-        <version>2.6</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.7</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jxr-plugin</artifactId>
-        <version>2.1</version>
-      </plugin>
-    </plugins>
-  </reporting>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-plugin-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>br.com.ingenieux</groupId>
+			<artifactId>beanstalker-common</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven.plugin-testing</groupId>
+			<artifactId>maven-plugin-testing-harness</artifactId>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
 </project>

mapreduce-maven-plugin/src/site/site.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<project name="mapreduce Maven Plugin">
+  <bannerRight>
+    <name>mapreduce Maven Plugin</name>
+    <href>index.html</href>
+  </bannerRight>
+  <poweredBy>
+    <logo name="Built By Maven" href="http://maven.apache.org"
+          img="http://maven.apache.org/images/logos/maven-feather.png" />
+  </poweredBy>
+  <body>
+    <menu ref="reports"/>
+  </body>
+</project>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-site-plugin</artifactId>
-					<version>3.0-beta-3</version>
+					<version>3.2</version>
 				</plugin>
 				<plugin>
 					<groupId>br.com.ingenieux</groupId>
 				<artifactId>maven-project-info-reports-plugin</artifactId>
 				<version>2.3.1</version>
 			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>2.3.1</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-plugin-plugin</artifactId>
+				<version>2.9</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<version>2.7</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jxr-plugin</artifactId>
+				<version>2.1</version>
+			</plugin>
 		</plugins>
 	</reporting>
 </project>

simpledb-maven-plugin/pom.xml

 		</dependency>
 	</dependencies>
 
-	<reporting>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>2.3.1</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-plugin-plugin</artifactId>
-				<version>2.9</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-				<version>2.7</version>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jxr-plugin</artifactId>
-				<version>2.1</version>
-			</plugin>
-		</plugins>
-	</reporting>
-
 	<description>The simpledb-maven-plugin is a plugin to automate SimpleDB care and handling, in particular for integration testing. It lets you automate domain creation, loading, deletion and dumping.</description>
 </project>

simpledb-maven-plugin/src/site/site.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<project name="simpledb Maven Plugin">
+  <bannerRight>
+    <name>simpledb Maven Plugin</name>
+    <href>index.html</href>
+  </bannerRight>
+  <poweredBy>
+    <logo name="Built By Maven" href="http://maven.apache.org"
+          img="http://maven.apache.org/images/logos/maven-feather.png" />
+  </poweredBy>
+  <body>
+    <menu ref="reports"/>
+  </body>
+</project>
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="Beanstalk Maven Plugin">
+<project name="ingenieux Beanstalker">
   <bannerRight>
     <name>ingenieux Beanstalker</name>
     <href>index.html</href>
       <item name="mapreduce-maven-plugin" href="mapreduce-maven-plugin" />
       <item name="simpledb-maven-plugin" href="simpledb-maven-plugin" /> 
     </menu>
-    <menu name="Other">
-      <item name="Usage" href="beanstalk-maven-plugin/usage.html" /> 
-      <item name="Security Credentials" href="beanstalk-maven-plugin/security.html" /> 
-      <item name="Configuration and Configuration Templates" href="beanstalk-maven-plugin/configurations-and-templates.html" />
-      <item name="Setting Up for your CI Builds" href="beanstalk-maven-plugin/setup-for-ci.html" /> 
-    </menu>
-    <menu ref="reports"/>
   </body>
 </project>
 

test-war/pom.xml

-<?xml version="1.0"?>
-<!-- /* * Licensed under the Apache License, Version 2.0 (the "License"); 
-  * you may not use this file except in compliance with the License. * You 
-  may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 
-  * * Unless required by applicable law or agreed to in writing, software * 
-  distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 
-  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the 
-  License for the specific language governing permissions and * limitations 
-  under the License. */ -->
-<project
-  xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>beanstalker</artifactId>
-    <groupId>br.com.ingenieux</groupId>
-    <version>0.2.5-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-  <artifactId>test-war</artifactId>
-  <packaging>war</packaging>
-
-  <properties>
-    <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
-    <beanstalk.versionLabel>${maven.build.timestamp}</beanstalk.versionLabel>
-  </properties>
-
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-
-    <plugins>
-      <plugin>
-        <groupId>br.com.ingenieux</groupId>
-        <artifactId>beanstalk-maven-plugin</artifactId>
-       <configuration>
-          <applicationName>beanstalker-test</applicationName>
-          <s3Bucket>ingenieux-beanstalk-apps</s3Bucket>
-          <s3Key>${project.artifactId}/${project.build.finalName}-${maven.build.timestamp}.war</s3Key>
-          <configurationTemplate>default</configurationTemplate>
-          <templateName>default</templateName>
-          <configurationTemplates>
-            <configurationTemplate>
-              <id>default</id>
-              <optionSettings>
-                <optionSetting>
-                  <namespace>aws:elasticbeanstalk:application</namespace>
-                  <optionName>Application Healthcheck URL</optionName>
-                  <value>/health.html</value>
-                </optionSetting>
-                <optionSetting>
-                  <namespace>aws:autoscaling:launchconfiguration</namespace>
-                  <optionName>EC2KeyName</optionName>
-                  <value>w7desktop</value>
-                </optionSetting>
-              </optionSettings>
-            </configurationTemplate>
-          </configurationTemplates>
-        </configuration>
-        <executions>
-          <execution>
-            <id>pre-integration-test</id>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>upload-source-bundle</goal>
-              <goal>create-application-version</goal>
-              <goal>replace-environment</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>post-integration-test</id>
-            <phase>post-integration-test</phase>
-            <goals>
-              <goal>terminate-environment</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>

test-war/src/main/resources/version.properties

-app.version=${beanstalk.versionLabel}

test-war/src/main/webapp/WEB-INF/web.xml

-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-<!-- 
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<web-app>
-  <display-name>Archetype Created Web Application</display-name>
-</web-app>

test-war/src/main/webapp/health.html

-<!-- 
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<html>
-  <body>
-  Hello, World!
-  </body>
-</html>

test-war/src/main/webapp/index.jsp

-<%-- 
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
---%>
-<%@page import="java.util.*" %>
-<html>
-<body>
-
-<%
-Properties p = new Properties();
-p.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("version.properties"));
-
-String appVersion = p.getProperty("app.version");
-%>
-
-<h2>Hello World! I'm version <%= appVersion %></h2>
-
-<h2>Properties:</h2>
-<pre>
-<%
-Properties systemProperties = System.getProperties();
-
-for (Object kObj : systemProperties.keySet()) {
-  String k = "" + kObj;
-  out.println(k + "=" + systemProperties.getProperty(k) + "<br/>"); 
-}
-%>
-</pre>
-
-<h3>Environment:</h3>
-<pre>
-<%
-Map<String, String> environment = System.getenv();
-
-for (Map.Entry<String, String> entry : environment.entrySet()) {
-  out.println(String.format("%s=%s<br/>", entry.getKey(), entry.getValue())); 
-}
-%>
-</pre>
-
-</body>
-</html>